summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/mthca/mthca_srq.c
diff options
context:
space:
mode:
authorArthur Kepner <akepner@sgi.com>2007-03-11 07:35:15 +0100
committerAdrian Bunk <bunk@stusta.de>2007-03-11 07:35:15 +0100
commit11bb9d392c1d5b63e2b9a0c8cc8a64cf49808757 (patch)
tree65d9b830cb27c996b23b670a6c79b171f293bd98 /drivers/infiniband/hw/mthca/mthca_srq.c
parentec333318b748e4f4ac3679a197620503b6d19d20 (diff)
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> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_srq.c')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_srq.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_srq.c b/drivers/infiniband/hw/mthca/mthca_srq.c
index e7e153d9c4c6..a818c319f2a1 100644
--- a/drivers/infiniband/hw/mthca/mthca_srq.c
+++ b/drivers/infiniband/hw/mthca/mthca_srq.c
@@ -35,6 +35,8 @@
#include <linux/slab.h>
#include <linux/string.h>
+#include <asm/io.h>
+
#include "mthca_dev.h"
#include "mthca_cmd.h"
#include "mthca_memfree.h"
@@ -528,6 +530,12 @@ int mthca_tavor_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr,
MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));
}
+ /*
+ * Make sure doorbells don't leak out of SRQ spinlock and
+ * reach the HCA out of order:
+ */
+ mmiowb();
+
spin_unlock_irqrestore(&srq->lock, flags);
return err;
}