diff options
author | James Smart <james.smart@emulex.com> | 2013-04-17 20:18:47 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-05-02 16:07:51 -0400 |
commit | ea714f3dab0484b38fa6040ba45d2be7c4c5b752 (patch) | |
tree | 0df5e8c847c45a28b3eadc312a56cffbc98893bf | |
parent | a88dbb6a960675f15fa02b4f057388b2b4bc8286 (diff) |
[SCSI] lpfc 8.3.39: Fixed system panic during EEH recovery due to midlayer acting on outstanding I/O
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 12 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 4 |
2 files changed, 10 insertions, 6 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 291c46aa9846..7af1eabf5ebc 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -9314,15 +9314,15 @@ lpfc_sli_prep_dev_for_reset(struct lpfc_hba *phba) | |||
9314 | /* Block all SCSI devices' I/Os on the host */ | 9314 | /* Block all SCSI devices' I/Os on the host */ |
9315 | lpfc_scsi_dev_block(phba); | 9315 | lpfc_scsi_dev_block(phba); |
9316 | 9316 | ||
9317 | /* Flush all driver's outstanding SCSI I/Os as we are to reset */ | ||
9318 | lpfc_sli_flush_fcp_rings(phba); | ||
9319 | |||
9317 | /* stop all timers */ | 9320 | /* stop all timers */ |
9318 | lpfc_stop_hba_timers(phba); | 9321 | lpfc_stop_hba_timers(phba); |
9319 | 9322 | ||
9320 | /* Disable interrupt and pci device */ | 9323 | /* Disable interrupt and pci device */ |
9321 | lpfc_sli_disable_intr(phba); | 9324 | lpfc_sli_disable_intr(phba); |
9322 | pci_disable_device(phba->pcidev); | 9325 | pci_disable_device(phba->pcidev); |
9323 | |||
9324 | /* Flush all driver's outstanding SCSI I/Os as we are to reset */ | ||
9325 | lpfc_sli_flush_fcp_rings(phba); | ||
9326 | } | 9326 | } |
9327 | 9327 | ||
9328 | /** | 9328 | /** |
@@ -10067,6 +10067,9 @@ lpfc_sli4_prep_dev_for_reset(struct lpfc_hba *phba) | |||
10067 | /* Block all SCSI devices' I/Os on the host */ | 10067 | /* Block all SCSI devices' I/Os on the host */ |
10068 | lpfc_scsi_dev_block(phba); | 10068 | lpfc_scsi_dev_block(phba); |
10069 | 10069 | ||
10070 | /* Flush all driver's outstanding SCSI I/Os as we are to reset */ | ||
10071 | lpfc_sli_flush_fcp_rings(phba); | ||
10072 | |||
10070 | /* stop all timers */ | 10073 | /* stop all timers */ |
10071 | lpfc_stop_hba_timers(phba); | 10074 | lpfc_stop_hba_timers(phba); |
10072 | 10075 | ||
@@ -10074,9 +10077,6 @@ lpfc_sli4_prep_dev_for_reset(struct lpfc_hba *phba) | |||
10074 | lpfc_sli4_disable_intr(phba); | 10077 | lpfc_sli4_disable_intr(phba); |
10075 | lpfc_sli4_queue_destroy(phba); | 10078 | lpfc_sli4_queue_destroy(phba); |
10076 | pci_disable_device(phba->pcidev); | 10079 | pci_disable_device(phba->pcidev); |
10077 | |||
10078 | /* Flush all driver's outstanding SCSI I/Os as we are to reset */ | ||
10079 | lpfc_sli_flush_fcp_rings(phba); | ||
10080 | } | 10080 | } |
10081 | 10081 | ||
10082 | /** | 10082 | /** |
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index b78244a30f29..c13ab4fd36b9 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
@@ -8453,10 +8453,14 @@ __lpfc_sli_issue_iocb_s4(struct lpfc_hba *phba, uint32_t ring_number, | |||
8453 | 8453 | ||
8454 | if ((piocb->iocb_flag & LPFC_IO_FCP) || | 8454 | if ((piocb->iocb_flag & LPFC_IO_FCP) || |
8455 | (piocb->iocb_flag & LPFC_USE_FCPWQIDX)) { | 8455 | (piocb->iocb_flag & LPFC_USE_FCPWQIDX)) { |
8456 | if (unlikely(!phba->sli4_hba.fcp_wq)) | ||
8457 | return IOCB_ERROR; | ||
8456 | if (lpfc_sli4_wq_put(phba->sli4_hba.fcp_wq[piocb->fcp_wqidx], | 8458 | if (lpfc_sli4_wq_put(phba->sli4_hba.fcp_wq[piocb->fcp_wqidx], |
8457 | &wqe)) | 8459 | &wqe)) |
8458 | return IOCB_ERROR; | 8460 | return IOCB_ERROR; |
8459 | } else { | 8461 | } else { |
8462 | if (unlikely(!phba->sli4_hba.els_wq)) | ||
8463 | return IOCB_ERROR; | ||
8460 | if (lpfc_sli4_wq_put(phba->sli4_hba.els_wq, &wqe)) | 8464 | if (lpfc_sli4_wq_put(phba->sli4_hba.els_wq, &wqe)) |
8461 | return IOCB_ERROR; | 8465 | return IOCB_ERROR; |
8462 | } | 8466 | } |