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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch mainly add memory barrier operation for making sure
rqwqe are written before ring the doorbell.

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

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
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux