aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian King <brking@linux.vnet.ibm.com>2014-05-21 11:11:32 -0500
committercstl-robot <robot@ibm.com>2014-05-22 00:14:47 +0800
commit3a4a26ff19aa7735474b5e293c666b6617278397 (patch)
treefe4ce4c80f2ef1aab9af2b2f8a5c460cc48db4fa
parenta832665a2b8bc831ade19b0cf4d301431dc29701 (diff)
downloadpowerkvm-3a4a26ff19aa7735474b5e293c666b6617278397.tar.gz
lpfc: Add iotag memory barrier
Add a memory barrier to ensure the valid bit is read before any of the cqe payload is read. This fixes an issue seen on Power where the cqe payload was getting loaded before the valid bit. When this occurred, we saw an iotag out of range error when a command completed, but since the iotag looked invalid the command didn't get completed to scsi core. Later we hit the command timeout, attempted to abort the command, then waited for the aborted command to get returned. Since the adapter already returned the command, we timeout waiting, and end up escalating EEH all the way to host reset. This patch fixes this issue. Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 572579f87de4fb..d82dcb74be121f 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -263,6 +263,7 @@ lpfc_sli4_eq_get(struct lpfc_queue *q)
return NULL;
q->hba_index = idx;
+ mb();
return eqe;
}
@@ -368,6 +369,7 @@ lpfc_sli4_cq_get(struct lpfc_queue *q)
cqe = q->qe[q->hba_index].cqe;
q->hba_index = idx;
+ mb();
return cqe;
}