aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_srq.c
diff options
context:
space:
mode:
authorArthur Kepner <akepner@sgi.com>2006-10-16 23:22:35 -0400
committerRoland Dreier <rolandd@cisco.com>2006-10-16 23:22:35 -0400
commit1f5c23e2c10d642a23aa3ebb449670a5184b6aab (patch)
treeb1cc700a843c7c6f4cc11bd5244c8fb503b8dfb1 /drivers/infiniband/hw/mthca/mthca_srq.c
parent6ef93dddfe11a72ab98a37ac4ef20ad681b008b0 (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>
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 92a72f521528..f5d7677d1079 100644
--- a/drivers/infiniband/hw/mthca/mthca_srq.c
+++ b/drivers/infiniband/hw/mthca/mthca_srq.c
@@ -35,6 +35,8 @@
35#include <linux/slab.h> 35#include <linux/slab.h>
36#include <linux/string.h> 36#include <linux/string.h>
37 37
38#include <asm/io.h>
39
38#include "mthca_dev.h" 40#include "mthca_dev.h"
39#include "mthca_cmd.h" 41#include "mthca_cmd.h"
40#include "mthca_memfree.h" 42#include "mthca_memfree.h"
@@ -595,6 +597,12 @@ int mthca_tavor_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr,
595 MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); 597 MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));
596 } 598 }
597 599
600 /*
601 * Make sure doorbells don't leak out of SRQ spinlock and
602 * reach the HCA out of order:
603 */
604 mmiowb();
605
598 spin_unlock_irqrestore(&srq->lock, flags); 606 spin_unlock_irqrestore(&srq->lock, flags);
599 return err; 607 return err;
600} 608}