diff options
author | Ralph Campbell <ralph.campbell@qlogic.com> | 2007-07-06 12:48:23 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-07-09 20:12:26 -0700 |
commit | 4fc570bcbe77f823aae183dd824869f79e74cc97 (patch) | |
tree | 3955946608a973b06db8b7e5b3ec319354a6fa73 /drivers/infiniband/hw/ipath/ipath_ruc.c | |
parent | 06cc85086e6896939f8c68f8518224748f6b0b2f (diff) | |
download | kernel_samsung_crespo-4fc570bcbe77f823aae183dd824869f79e74cc97.zip kernel_samsung_crespo-4fc570bcbe77f823aae183dd824869f79e74cc97.tar.gz kernel_samsung_crespo-4fc570bcbe77f823aae183dd824869f79e74cc97.tar.bz2 |
IB/ipath: Add barrier before updating WC head in shared memory
Add a barrier to make sure the CPU doesn't reorder writes to memory,
since user programs can be polling on the head index update and the
entry should be written before that.
Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_ruc.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_ruc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_ruc.c b/drivers/infiniband/hw/ipath/ipath_ruc.c index 854deb5..8525674 100644 --- a/drivers/infiniband/hw/ipath/ipath_ruc.c +++ b/drivers/infiniband/hw/ipath/ipath_ruc.c @@ -194,6 +194,8 @@ int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only) ret = 0; goto bail; } + /* Make sure entry is read after head index is read. */ + smp_rmb(); wqe = get_rwqe_ptr(rq, tail); if (++tail >= rq->size) tail = 0; |