]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] ibmvfc: Fix errors due to inconsistent command data
authorBrian King <brking@linux.vnet.ibm.com>
Wed, 3 Dec 2008 17:02:56 +0000 (11:02 -0600)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 29 Dec 2008 17:24:24 +0000 (11:24 -0600)
In order to ensure the VIOS sees a consistent command buffer, we
need to add a memory barrier after building the command buffer
but before sending the command.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/ibmvscsi/ibmvfc.c

index 2aa3d695d5484f0fed88678f5d7ea6bce9ae665d..a401e938a87aaf020ed1b9ed600f9cf6102256d2 100644 (file)
@@ -1381,6 +1381,8 @@ static int ibmvfc_send_event(struct ibmvfc_event *evt,
                add_timer(&evt->timer);
        }
 
+       mb();
+
        if ((rc = ibmvfc_send_crq(vhost, crq_as_u64[0], crq_as_u64[1]))) {
                list_del(&evt->queue);
                del_timer(&evt->timer);