aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_init.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2014-04-04 13:52:02 -0400
committerChristoph Hellwig <hch@lst.de>2014-06-02 12:28:47 -0400
commitdb55fba8dc26535d34c00a3b3256da0b48608071 (patch)
tree46253e73ba4f005889625d387c0a47d85b731e04 /drivers/scsi/lpfc/lpfc_init.c
parentee62021a11320e972e0218ab73a5a5196b6aa499 (diff)
lpfc: Fix SLI4 s abort loop to process all FCP rings and under ring_lock
Fix SLI4 s abort loop to process all FCP rings and under ring_lock Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-By: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_init.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 9f3efdb9e833..02d8731eb365 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -880,8 +880,6 @@ lpfc_hba_clean_txcmplq(struct lpfc_hba *phba)
880 LIST_HEAD(completions); 880 LIST_HEAD(completions);
881 int i; 881 int i;
882 882
883
884
885 for (i = 0; i < psli->num_rings; i++) { 883 for (i = 0; i < psli->num_rings; i++) {
886 pring = &psli->ring[i]; 884 pring = &psli->ring[i];
887 if (phba->sli_rev >= LPFC_SLI_REV4) 885 if (phba->sli_rev >= LPFC_SLI_REV4)
@@ -892,6 +890,7 @@ lpfc_hba_clean_txcmplq(struct lpfc_hba *phba)
892 * way, nothing should be on txcmplq as it will NEVER complete. 890 * way, nothing should be on txcmplq as it will NEVER complete.
893 */ 891 */
894 list_splice_init(&pring->txcmplq, &completions); 892 list_splice_init(&pring->txcmplq, &completions);
893 pring->txcmplq_cnt = 0;
895 894
896 if (phba->sli_rev >= LPFC_SLI_REV4) 895 if (phba->sli_rev >= LPFC_SLI_REV4)
897 spin_unlock_irq(&pring->ring_lock); 896 spin_unlock_irq(&pring->ring_lock);
@@ -1300,7 +1299,6 @@ static void
1300lpfc_handle_deferred_eratt(struct lpfc_hba *phba) 1299lpfc_handle_deferred_eratt(struct lpfc_hba *phba)
1301{ 1300{
1302 uint32_t old_host_status = phba->work_hs; 1301 uint32_t old_host_status = phba->work_hs;
1303 struct lpfc_sli_ring *pring;
1304 struct lpfc_sli *psli = &phba->sli; 1302 struct lpfc_sli *psli = &phba->sli;
1305 1303
1306 /* If the pci channel is offline, ignore possible errors, 1304 /* If the pci channel is offline, ignore possible errors,
@@ -1329,8 +1327,7 @@ lpfc_handle_deferred_eratt(struct lpfc_hba *phba)
1329 * dropped by the firmware. Error iocb (I/O) on txcmplq and let the 1327 * dropped by the firmware. Error iocb (I/O) on txcmplq and let the
1330 * SCSI layer retry it after re-establishing link. 1328 * SCSI layer retry it after re-establishing link.
1331 */ 1329 */
1332 pring = &psli->ring[psli->fcp_ring]; 1330 lpfc_sli_abort_fcp_rings(phba);
1333 lpfc_sli_abort_iocb_ring(phba, pring);
1334 1331
1335 /* 1332 /*
1336 * There was a firmware error. Take the hba offline and then 1333 * There was a firmware error. Take the hba offline and then
@@ -1398,7 +1395,6 @@ lpfc_handle_eratt_s3(struct lpfc_hba *phba)
1398{ 1395{
1399 struct lpfc_vport *vport = phba->pport; 1396 struct lpfc_vport *vport = phba->pport;
1400 struct lpfc_sli *psli = &phba->sli; 1397 struct lpfc_sli *psli = &phba->sli;
1401 struct lpfc_sli_ring *pring;
1402 uint32_t event_data; 1398 uint32_t event_data;
1403 unsigned long temperature; 1399 unsigned long temperature;
1404 struct temp_event temp_event_data; 1400 struct temp_event temp_event_data;
@@ -1450,8 +1446,7 @@ lpfc_handle_eratt_s3(struct lpfc_hba *phba)
1450 * Error iocb (I/O) on txcmplq and let the SCSI layer 1446 * Error iocb (I/O) on txcmplq and let the SCSI layer
1451 * retry it after re-establishing link. 1447 * retry it after re-establishing link.
1452 */ 1448 */
1453 pring = &psli->ring[psli->fcp_ring]; 1449 lpfc_sli_abort_fcp_rings(phba);
1454 lpfc_sli_abort_iocb_ring(phba, pring);
1455 1450
1456 /* 1451 /*
1457 * There was a firmware error. Take the hba offline and then 1452 * There was a firmware error. Take the hba offline and then
@@ -9716,9 +9711,6 @@ lpfc_pci_resume_one_s3(struct pci_dev *pdev)
9716static void 9711static void
9717lpfc_sli_prep_dev_for_recover(struct lpfc_hba *phba) 9712lpfc_sli_prep_dev_for_recover(struct lpfc_hba *phba)
9718{ 9713{
9719 struct lpfc_sli *psli = &phba->sli;
9720 struct lpfc_sli_ring *pring;
9721
9722 lpfc_printf_log(phba, KERN_ERR, LOG_INIT, 9714 lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
9723 "2723 PCI channel I/O abort preparing for recovery\n"); 9715 "2723 PCI channel I/O abort preparing for recovery\n");
9724 9716
@@ -9726,8 +9718,7 @@ lpfc_sli_prep_dev_for_recover(struct lpfc_hba *phba)
9726 * There may be errored I/Os through HBA, abort all I/Os on txcmplq 9718 * There may be errored I/Os through HBA, abort all I/Os on txcmplq
9727 * and let the SCSI mid-layer to retry them to recover. 9719 * and let the SCSI mid-layer to retry them to recover.
9728 */ 9720 */
9729 pring = &psli->ring[psli->fcp_ring]; 9721 lpfc_sli_abort_fcp_rings(phba);
9730 lpfc_sli_abort_iocb_ring(phba, pring);
9731} 9722}
9732 9723
9733/** 9724/**
@@ -10470,17 +10461,13 @@ lpfc_pci_resume_one_s4(struct pci_dev *pdev)
10470static void 10461static void
10471lpfc_sli4_prep_dev_for_recover(struct lpfc_hba *phba) 10462lpfc_sli4_prep_dev_for_recover(struct lpfc_hba *phba)
10472{ 10463{
10473 struct lpfc_sli *psli = &phba->sli;
10474 struct lpfc_sli_ring *pring;
10475
10476 lpfc_printf_log(phba, KERN_ERR, LOG_INIT, 10464 lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
10477 "2828 PCI channel I/O abort preparing for recovery\n"); 10465 "2828 PCI channel I/O abort preparing for recovery\n");
10478 /* 10466 /*
10479 * There may be errored I/Os through HBA, abort all I/Os on txcmplq 10467 * There may be errored I/Os through HBA, abort all I/Os on txcmplq
10480 * and let the SCSI mid-layer to retry them to recover. 10468 * and let the SCSI mid-layer to retry them to recover.
10481 */ 10469 */
10482 pring = &psli->ring[psli->fcp_ring]; 10470 lpfc_sli_abort_fcp_rings(phba);
10483 lpfc_sli_abort_iocb_ring(phba, pring);
10484} 10471}
10485 10472
10486/** 10473/**