summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorSteve Wise <swise@opengridcomputing.com>2014-04-09 09:38:26 -0500
committerRoland Dreier <roland@purestorage.com>2014-04-11 11:36:07 -0700
commitdef4771f4bf428d39c7fe6006a9e1a20ee380d1e (patch)
treef67a41b3d815a7f53eb13913613f6e3b3e686e7b /drivers/infiniband
parentb33bd0cbfa102b8f87702338aa72742fe3c7f220 (diff)
downloadop-kernel-dev-def4771f4bf428d39c7fe6006a9e1a20ee380d1e.zip
op-kernel-dev-def4771f4bf428d39c7fe6006a9e1a20ee380d1e.tar.gz
RDMA/cxgb4: rmb() after reading valid gen bit
Some HW platforms can reorder read operations, so we must rmb() after we see a valid gen bit in a CQE but before we read any other fields from the CQE. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/cxgb4/t4.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb4/t4.h b/drivers/infiniband/hw/cxgb4/t4.h
index 931bfd1..1f329fa 100644
--- a/drivers/infiniband/hw/cxgb4/t4.h
+++ b/drivers/infiniband/hw/cxgb4/t4.h
@@ -620,6 +620,9 @@ static inline int t4_next_hw_cqe(struct t4_cq *cq, struct t4_cqe **cqe)
printk(KERN_ERR MOD "cq overflow cqid %u\n", cq->cqid);
BUG_ON(1);
} else if (t4_valid_cqe(cq, &cq->queue[cq->cidx])) {
+
+ /* Ensure CQE is flushed to memory */
+ rmb();
*cqe = &cq->queue[cq->cidx];
ret = 0;
} else
OpenPOWER on IntegriCloud