Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Thumshirn <jthumshirn@suse.de>2018-07-03 12:53:48 +0200
committerJohannes Thumshirn <jthumshirn@suse.de>2018-07-03 12:53:57 +0200
commitf3cdbf2f02b26c3fef0288f230d392e01b2013a0 (patch)
tree6537456ffac5261173bbb1f1261088d00b8477b2
parent473acfa4bb5bbecd0f637db169a76733f5f3e38c (diff)
scsi: lpfc: Fix MDS diagnostics failure (Rx < Tx) (bsc#1095453).
-rw-r--r--patches.drivers/scsi-lpfc-fix-mds-diagnostics-failure-rx-tx.patch81
-rw-r--r--series.conf1
2 files changed, 82 insertions, 0 deletions
diff --git a/patches.drivers/scsi-lpfc-fix-mds-diagnostics-failure-rx-tx.patch b/patches.drivers/scsi-lpfc-fix-mds-diagnostics-failure-rx-tx.patch
new file mode 100644
index 0000000000..f534535d29
--- /dev/null
+++ b/patches.drivers/scsi-lpfc-fix-mds-diagnostics-failure-rx-tx.patch
@@ -0,0 +1,81 @@
+From: James Smart <jsmart2021@gmail.com>
+Date: Thu, 24 May 2018 21:08:57 -0700
+Subject: scsi: lpfc: Fix MDS diagnostics failure (Rx < Tx)
+Git-commit: dc19e3b4a80e0bb1e5f080473fffa0ac8c0694a6
+Patch-mainline: v4.18-rc1
+References: bsc#1095453
+
+MDS diagnostics fail because of frame count mismatch.
+
+Unavailability of SGL is the trigger for this issue. If ELS SGL is not
+available to process MDS frame, IOCB is put in FCP txq but not attempted to
+post afterwards. So, driver stops processing incoming frames as it runs out
+of IOCB. lpfc_drain_txq attempts to submit IOCBS that are queued in ELS
+txq but MDS frames are posted to FCP WQ.
+
+Attempt to submit IOCBs that are present in FCP txq when MDS loopback is
+running.
+
+Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
+Signed-off-by: James Smart <james.smart@broadcom.com>
+Reviewed-by: Hannes Reinecke <hare@suse.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
+---
+ drivers/scsi/lpfc/lpfc_hbadisc.c | 3 +--
+ drivers/scsi/lpfc/lpfc_sli.c | 19 ++++++++++++++++---
+ 2 files changed, 17 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
+index cf2cbaa241b9..2fef54fab86d 100644
+--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
++++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
+@@ -708,8 +708,7 @@ lpfc_work_done(struct lpfc_hba *phba)
+ HA_RXMASK));
+ }
+ }
+- if ((phba->sli_rev == LPFC_SLI_REV4) &&
+- (!list_empty(&pring->txq)))
++ if (phba->sli_rev == LPFC_SLI_REV4)
+ lpfc_drain_txq(phba);
+ /*
+ * Turn on Ring interrupts
+diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
+index 6b709cd4140b..4b70d53acb72 100644
+--- a/drivers/scsi/lpfc/lpfc_sli.c
++++ b/drivers/scsi/lpfc/lpfc_sli.c
+@@ -19069,9 +19069,22 @@ lpfc_drain_txq(struct lpfc_hba *phba)
+ struct lpfc_sglq *sglq;
+ union lpfc_wqe128 wqe;
+ uint32_t txq_cnt = 0;
++ struct lpfc_queue *wq;
+
+- pring = lpfc_phba_elsring(phba);
+- if (unlikely(!pring))
++ if (phba->link_flag & LS_MDS_LOOPBACK) {
++ /* MDS WQE are posted only to first WQ*/
++ wq = phba->sli4_hba.fcp_wq[0];
++ if (unlikely(!wq))
++ return 0;
++ pring = wq->pring;
++ } else {
++ wq = phba->sli4_hba.els_wq;
++ if (unlikely(!wq))
++ return 0;
++ pring = lpfc_phba_elsring(phba);
++ }
++
++ if (unlikely(!pring) || list_empty(&pring->txq))
+ return 0;
+
+ spin_lock_irqsave(&pring->ring_lock, iflags);
+@@ -19112,7 +19125,7 @@ lpfc_drain_txq(struct lpfc_hba *phba)
+ fail_msg = "to convert bpl to sgl";
+ else if (lpfc_sli4_iocb2wqe(phba, piocbq, &wqe))
+ fail_msg = "to convert iocb to wqe";
+- else if (lpfc_sli4_wq_put(phba->sli4_hba.els_wq, &wqe))
++ else if (lpfc_sli4_wq_put(wq, &wqe))
+ fail_msg = " - Wq is full";
+ else
+ lpfc_sli_ringtxcmpl_put(phba, pring, piocbq);
+
diff --git a/series.conf b/series.conf
index 1c6b781c43..ec49ad8bef 100644
--- a/series.conf
+++ b/series.conf
@@ -18759,6 +18759,7 @@
patches.drivers/scsi-lpfc-correct-oversubscription-of-nvme-io-requests-for-an-adapter.patch
patches.drivers/scsi-lpfc-fix-16gb-hbas-failing-cq-create.patch
patches.drivers/scsi-lpfc-fix-crash-in-blk_mq-layer-when-executing-modprobe-r-lpfc.patch
+ patches.drivers/scsi-lpfc-fix-mds-diagnostics-failure-rx-tx.patch
patches.drivers/nvme-remove-nvme_revalidate_ns.patch
patches.drivers/nvme-Fix-setting-logical-block-format-when-revalidat.patch