diff mbox

[rdma-core,5/6] libhns: Add memory barrier operation

Message ID 1526009610-72089-6-git-send-email-oulijun@huawei.com (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show

Commit Message

Lijun Ou May 11, 2018, 3:33 a.m. UTC
This patch mainly add memory barrier operation for making sure
rqwqe are written before ring the doorbell.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 providers/hns/hns_roce_u_hw_v2.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/providers/hns/hns_roce_u_hw_v2.c b/providers/hns/hns_roce_u_hw_v2.c
index 42bd5dd..7323eaa 100644
--- a/providers/hns/hns_roce_u_hw_v2.c
+++ b/providers/hns/hns_roce_u_hw_v2.c
@@ -841,6 +841,8 @@  out:
 	if (nreq) {
 		qp->rq.head += nreq;
 
+		udma_to_device_barrier();
+
 		if (qp->flags & HNS_ROCE_SUPPORT_RQ_RECORD_DB)
 			*qp->rdb = qp->rq.head & 0xffff;
 		else