diff options
author | Arthur Kepner <akepner@sgi.com> | 2006-10-17 05:22:35 +0200 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-10-17 05:22:35 +0200 |
commit | 1f5c23e2c10d642a23aa3ebb449670a5184b6aab (patch) | |
tree | b1cc700a843c7c6f4cc11bd5244c8fb503b8dfb1 /drivers/infiniband/hw/mthca/mthca_cq.c | |
parent | IB/ipath: Initialize diagpkt file on device init only (diff) | |
download | linux-1f5c23e2c10d642a23aa3ebb449670a5184b6aab.tar.xz linux-1f5c23e2c10d642a23aa3ebb449670a5184b6aab.zip |
IB/mthca: Use mmiowb after doorbell ring
We discovered a problem when running IPoIB applications on multiple
CPUs on an Altix system. Many messages such as:
ib_mthca 0002:01:00.0: SQ 000014 full (19941644 head, 19941707 tail, 64 max, 0 nreq)
appear in syslog, and the driver wedges up.
Apparently this is because writes to the doorbells from different CPUs
reach the device out of order. The following patch adds mmiowb() calls
after doorbell rings to ensure the doorbell writes are ordered.
Signed-off-by: Arthur Kepner <akepner@sgi.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_cq.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_cq.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c index e393681ba7d4..149b36901239 100644 --- a/drivers/infiniband/hw/mthca/mthca_cq.c +++ b/drivers/infiniband/hw/mthca/mthca_cq.c @@ -39,6 +39,8 @@ #include <linux/init.h> #include <linux/hardirq.h> +#include <asm/io.h> + #include <rdma/ib_pack.h> #include "mthca_dev.h" @@ -210,6 +212,11 @@ static inline void update_cons_index(struct mthca_dev *dev, struct mthca_cq *cq, mthca_write64(doorbell, dev->kar + MTHCA_CQ_DOORBELL, MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); + /* + * Make sure doorbells don't leak out of CQ spinlock + * and reach the HCA out of order: + */ + mmiowb(); } } |