ibmvscsi: Add memory barriers for send / receive
authorBrian King <brking@linux.vnet.ibm.com>
Fri, 23 May 2014 15:52:11 +0000 (10:52 -0500)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 6 Aug 2014 17:07:33 +0000 (18:07 +0100)
commita89c6d3b6c9660ef09bc794135400b2f8f16db8f
tree065cd92b0930ba4bea8f139ffb078cadec26bd11
parentd9916e33837bcb661d0faad19641eca425c1a52d
ibmvscsi: Add memory barriers for send / receive

commit 7114aae02742d6b5c5a0d39a41deb61d415d3717 upstream.

Add a memory barrier prior to sending a new command to the VIOS
to ensure the VIOS does not receive stale data in the command buffer.
Also add a memory barrier when processing the CRQ for completed commands.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Acked-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
[bwh: Backported to 3.2: as the iSeries code is still present, these
 functions have different names and live in rpa_vscsi.c.]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/scsi/ibmvscsi/rpa_vscsi.c