Commit ea714f3d authored by James Smart's avatar James Smart Committed by James Bottomley

[SCSI] lpfc 8.3.39: Fixed system panic during EEH recovery due to midlayer...

[SCSI] lpfc 8.3.39: Fixed system panic during EEH recovery due to midlayer acting on outstanding I/O
Signed-off-by: default avatarJames Smart <james.smart@emulex.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent a88dbb6a
...@@ -9314,15 +9314,15 @@ lpfc_sli_prep_dev_for_reset(struct lpfc_hba *phba) ...@@ -9314,15 +9314,15 @@ lpfc_sli_prep_dev_for_reset(struct lpfc_hba *phba)
/* Block all SCSI devices' I/Os on the host */ /* Block all SCSI devices' I/Os on the host */
lpfc_scsi_dev_block(phba); 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 */ /* stop all timers */
lpfc_stop_hba_timers(phba); lpfc_stop_hba_timers(phba);
/* Disable interrupt and pci device */ /* Disable interrupt and pci device */
lpfc_sli_disable_intr(phba); lpfc_sli_disable_intr(phba);
pci_disable_device(phba->pcidev); 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_hba *phba) ...@@ -10067,6 +10067,9 @@ lpfc_sli4_prep_dev_for_reset(struct lpfc_hba *phba)
/* Block all SCSI devices' I/Os on the host */ /* Block all SCSI devices' I/Os on the host */
lpfc_scsi_dev_block(phba); 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 */ /* stop all timers */
lpfc_stop_hba_timers(phba); lpfc_stop_hba_timers(phba);
...@@ -10074,9 +10077,6 @@ lpfc_sli4_prep_dev_for_reset(struct lpfc_hba *phba) ...@@ -10074,9 +10077,6 @@ lpfc_sli4_prep_dev_for_reset(struct lpfc_hba *phba)
lpfc_sli4_disable_intr(phba); lpfc_sli4_disable_intr(phba);
lpfc_sli4_queue_destroy(phba); lpfc_sli4_queue_destroy(phba);
pci_disable_device(phba->pcidev); pci_disable_device(phba->pcidev);
/* Flush all driver's outstanding SCSI I/Os as we are to reset */
lpfc_sli_flush_fcp_rings(phba);
} }
/** /**
......
...@@ -8453,10 +8453,14 @@ __lpfc_sli_issue_iocb_s4(struct lpfc_hba *phba, uint32_t ring_number, ...@@ -8453,10 +8453,14 @@ __lpfc_sli_issue_iocb_s4(struct lpfc_hba *phba, uint32_t ring_number,
if ((piocb->iocb_flag & LPFC_IO_FCP) || if ((piocb->iocb_flag & LPFC_IO_FCP) ||
(piocb->iocb_flag & LPFC_USE_FCPWQIDX)) { (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], if (lpfc_sli4_wq_put(phba->sli4_hba.fcp_wq[piocb->fcp_wqidx],
&wqe)) &wqe))
return IOCB_ERROR; return IOCB_ERROR;
} else { } else {
if (unlikely(!phba->sli4_hba.els_wq))
return IOCB_ERROR;
if (lpfc_sli4_wq_put(phba->sli4_hba.els_wq, &wqe)) if (lpfc_sli4_wq_put(phba->sli4_hba.els_wq, &wqe))
return IOCB_ERROR; return IOCB_ERROR;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment