[MTHCA] Ensure an Rx WQE is in memory before linking
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 18 Jun 2008 17:25:21 +0000 (17:25 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 18 Jun 2008 17:25:21 +0000 (17:25 +0000)
Use a write memory barrier to ensure a WQE is written to memory
before linking it to the previous WQE.

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1284 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

hw/mthca/user/mlnx_uvp_qp.c

index f8b1725..d742534 100644 (file)
@@ -486,6 +486,7 @@ int mthca_tavor_post_recv(struct ibv_qp *ibqp, struct _ib_recv_wr *wr,
 
                ((struct mthca_next_seg *) prev_wqe)->nda_op =
                        cl_hton32((ind << qp->rq.wqe_shift) | 1);
+               wmb();
                ((struct mthca_next_seg *) prev_wqe)->ee_nds =
                        cl_hton32(MTHCA_NEXT_DBD | size);