summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc
diff options
context:
space:
mode:
authorJames Bottomley2014-06-09 16:49:39 +0200
committerJames Bottomley2014-06-09 16:49:39 +0200
commitb4c43993f448d0e25fe40690d9e9c81a8ebda623 (patch)
tree7cc19990b0b00226ce3063d956790368bfe62ada /drivers/scsi/lpfc
parentinclude/scsi/osd_protocol.h: remove unnecessary __constant (diff)
parentmvsas: Recognise device/subsystem 9485/9485 as 88SE9485 (diff)
downloadkernel-qcow2-linux-b4c43993f448d0e25fe40690d9e9c81a8ebda623.tar.gz
kernel-qcow2-linux-b4c43993f448d0e25fe40690d9e9c81a8ebda623.tar.xz
kernel-qcow2-linux-b4c43993f448d0e25fe40690d9e9c81a8ebda623.zip
Merge remote-tracking branch 'scsi-queue/drivers-for-3.16' into for-linus
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 6bb51f8e3c1b..393662c24df5 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -265,6 +265,16 @@ lpfc_sli4_eq_get(struct lpfc_queue *q)
return NULL;
q->hba_index = idx;
+
+ /*
+ * insert barrier for instruction interlock : data from the hardware
+ * must have the valid bit checked before it can be copied and acted
+ * upon. Given what was seen in lpfc_sli4_cq_get() of speculative
+ * instructions allowing action on content before valid bit checked,
+ * add barrier here as well. May not be needed as "content" is a
+ * single 32-bit entity here (vs multi word structure for cq's).
+ */
+ mb();
return eqe;
}
@@ -370,6 +380,17 @@ lpfc_sli4_cq_get(struct lpfc_queue *q)
cqe = q->qe[q->hba_index].cqe;
q->hba_index = idx;
+
+ /*
+ * insert barrier for instruction interlock : data from the hardware
+ * must have the valid bit checked before it can be copied and acted
+ * upon. Speculative instructions were allowing a bcopy at the start
+ * of lpfc_sli4_fp_handle_wcqe(), which is called immediately
+ * after our return, to copy data before the valid bit check above
+ * was done. As such, some of the copied data was stale. The barrier
+ * ensures the check is before any data is copied.
+ */
+ mb();
return cqe;
}