public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 16/22] lpfc 8.3.39: Fixed system panic during EEH recovery due to midlayer acting on outstanding I/O
@ 2013-04-18  0:18 James Smart
  0 siblings, 0 replies; only message in thread
From: James Smart @ 2013-04-18  0:18 UTC (permalink / raw)
  To: linux-scsi

Fixed system panic during EEH recovery due to midlayer acting on outstanding I/O


Signed-off-by: James Smart <james.smart@emulex.com>

 ---

 lpfc_init.c |   12 ++++++------
 lpfc_sli.c  |    4 ++++
 2 files changed, 10 insertions(+), 6 deletions(-)


diff -upNr a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
--- a/drivers/scsi/lpfc/lpfc_init.c	2013-04-15 18:51:49.209075552 -0400
+++ b/drivers/scsi/lpfc/lpfc_init.c	2013-04-15 18:52:05.751075929 -0400
@@ -9314,15 +9314,15 @@ lpfc_sli_prep_dev_for_reset(struct lpfc_
 	/* Block all SCSI devices' I/Os on the host */
 	lpfc_scsi_dev_block(phba);
 
+	/* Flush all driver's outstanding SCSI I/Os as we are to reset */
+	lpfc_sli_flush_fcp_rings(phba);
+
 	/* stop all timers */
 	lpfc_stop_hba_timers(phba);
 
 	/* Disable interrupt and pci device */
 	lpfc_sli_disable_intr(phba);
 	pci_disable_device(phba->pcidev);
-
-	/* Flush all driver's outstanding SCSI I/Os as we are to reset */
-	lpfc_sli_flush_fcp_rings(phba);
 }
 
 /**
@@ -10067,6 +10067,9 @@ lpfc_sli4_prep_dev_for_reset(struct lpfc
 	/* Block all SCSI devices' I/Os on the host */
 	lpfc_scsi_dev_block(phba);
 
+	/* Flush all driver's outstanding SCSI I/Os as we are to reset */
+	lpfc_sli_flush_fcp_rings(phba);
+
 	/* stop all timers */
 	lpfc_stop_hba_timers(phba);
 
@@ -10074,9 +10077,6 @@ lpfc_sli4_prep_dev_for_reset(struct lpfc
 	lpfc_sli4_disable_intr(phba);
 	lpfc_sli4_queue_destroy(phba);
 	pci_disable_device(phba->pcidev);
-
-	/* Flush all driver's outstanding SCSI I/Os as we are to reset */
-	lpfc_sli_flush_fcp_rings(phba);
 }
 
 /**
diff -upNr a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
--- a/drivers/scsi/lpfc/lpfc_sli.c	2013-04-15 18:51:49.194075552 -0400
+++ b/drivers/scsi/lpfc/lpfc_sli.c	2013-04-15 18:52:09.844076022 -0400
@@ -8452,10 +8452,14 @@ __lpfc_sli_issue_iocb_s4(struct lpfc_hba
 
 	if ((piocb->iocb_flag & LPFC_IO_FCP) ||
 		(piocb->iocb_flag & LPFC_USE_FCPWQIDX)) {
+		if (unlikely(!phba->sli4_hba.fcp_wq))
+			return IOCB_ERROR;
 		if (lpfc_sli4_wq_put(phba->sli4_hba.fcp_wq[piocb->fcp_wqidx],
 				     &wqe))
 			return IOCB_ERROR;
 	} else {
+		if (unlikely(!phba->sli4_hba.els_wq))
+			return IOCB_ERROR;
 		if (lpfc_sli4_wq_put(phba->sli4_hba.els_wq, &wqe))
 			return IOCB_ERROR;
 	}




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-04-18  0:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-18  0:18 [PATCH 16/22] lpfc 8.3.39: Fixed system panic during EEH recovery due to midlayer acting on outstanding I/O James Smart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox