IB/mthca: Use mmiowb after doorbell ring
authorArthur Kepner <akepner@sgi.com>
Tue, 17 Oct 2006 03:22:35 +0000 (20:22 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 17 Oct 2006 03:22:35 +0000 (20:22 -0700)
commit1f5c23e2c10d642a23aa3ebb449670a5184b6aab
treeb1cc700a843c7c6f4cc11bd5244c8fb503b8dfb1
parent6ef93dddfe11a72ab98a37ac4ef20ad681b008b0
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>
drivers/infiniband/hw/mthca/mthca_cq.c
drivers/infiniband/hw/mthca/mthca_qp.c
drivers/infiniband/hw/mthca/mthca_srq.c