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>
This commit is contained in:

committed by
Christoph Hellwig

parent
ee62021a11
commit
db55fba8dc
@@ -880,8 +880,6 @@ lpfc_hba_clean_txcmplq(struct lpfc_hba *phba)
|
||||
LIST_HEAD(completions);
|
||||
int i;
|
||||
|
||||
|
||||
|
||||
for (i = 0; i < psli->num_rings; i++) {
|
||||
pring = &psli->ring[i];
|
||||
if (phba->sli_rev >= LPFC_SLI_REV4)
|
||||
@@ -892,6 +890,7 @@ lpfc_hba_clean_txcmplq(struct lpfc_hba *phba)
|
||||
* way, nothing should be on txcmplq as it will NEVER complete.
|
||||
*/
|
||||
list_splice_init(&pring->txcmplq, &completions);
|
||||
pring->txcmplq_cnt = 0;
|
||||
|
||||
if (phba->sli_rev >= LPFC_SLI_REV4)
|
||||
spin_unlock_irq(&pring->ring_lock);
|
||||
@@ -1300,7 +1299,6 @@ static void
|
||||
lpfc_handle_deferred_eratt(struct lpfc_hba *phba)
|
||||
{
|
||||
uint32_t old_host_status = phba->work_hs;
|
||||
struct lpfc_sli_ring *pring;
|
||||
struct lpfc_sli *psli = &phba->sli;
|
||||
|
||||
/* If the pci channel is offline, ignore possible errors,
|
||||
@@ -1329,8 +1327,7 @@ lpfc_handle_deferred_eratt(struct lpfc_hba *phba)
|
||||
* dropped by the firmware. Error iocb (I/O) on txcmplq and let the
|
||||
* SCSI layer retry it after re-establishing link.
|
||||
*/
|
||||
pring = &psli->ring[psli->fcp_ring];
|
||||
lpfc_sli_abort_iocb_ring(phba, pring);
|
||||
lpfc_sli_abort_fcp_rings(phba);
|
||||
|
||||
/*
|
||||
* There was a firmware error. Take the hba offline and then
|
||||
@@ -1398,7 +1395,6 @@ lpfc_handle_eratt_s3(struct lpfc_hba *phba)
|
||||
{
|
||||
struct lpfc_vport *vport = phba->pport;
|
||||
struct lpfc_sli *psli = &phba->sli;
|
||||
struct lpfc_sli_ring *pring;
|
||||
uint32_t event_data;
|
||||
unsigned long temperature;
|
||||
struct temp_event temp_event_data;
|
||||
@@ -1450,8 +1446,7 @@ lpfc_handle_eratt_s3(struct lpfc_hba *phba)
|
||||
* Error iocb (I/O) on txcmplq and let the SCSI layer
|
||||
* retry it after re-establishing link.
|
||||
*/
|
||||
pring = &psli->ring[psli->fcp_ring];
|
||||
lpfc_sli_abort_iocb_ring(phba, pring);
|
||||
lpfc_sli_abort_fcp_rings(phba);
|
||||
|
||||
/*
|
||||
* There was a firmware error. Take the hba offline and then
|
||||
@@ -9716,9 +9711,6 @@ lpfc_pci_resume_one_s3(struct pci_dev *pdev)
|
||||
static void
|
||||
lpfc_sli_prep_dev_for_recover(struct lpfc_hba *phba)
|
||||
{
|
||||
struct lpfc_sli *psli = &phba->sli;
|
||||
struct lpfc_sli_ring *pring;
|
||||
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
|
||||
"2723 PCI channel I/O abort preparing for recovery\n");
|
||||
|
||||
@@ -9726,8 +9718,7 @@ lpfc_sli_prep_dev_for_recover(struct lpfc_hba *phba)
|
||||
* There may be errored I/Os through HBA, abort all I/Os on txcmplq
|
||||
* and let the SCSI mid-layer to retry them to recover.
|
||||
*/
|
||||
pring = &psli->ring[psli->fcp_ring];
|
||||
lpfc_sli_abort_iocb_ring(phba, pring);
|
||||
lpfc_sli_abort_fcp_rings(phba);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -10470,17 +10461,13 @@ lpfc_pci_resume_one_s4(struct pci_dev *pdev)
|
||||
static void
|
||||
lpfc_sli4_prep_dev_for_recover(struct lpfc_hba *phba)
|
||||
{
|
||||
struct lpfc_sli *psli = &phba->sli;
|
||||
struct lpfc_sli_ring *pring;
|
||||
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
|
||||
"2828 PCI channel I/O abort preparing for recovery\n");
|
||||
/*
|
||||
* There may be errored I/Os through HBA, abort all I/Os on txcmplq
|
||||
* and let the SCSI mid-layer to retry them to recover.
|
||||
*/
|
||||
pring = &psli->ring[psli->fcp_ring];
|
||||
lpfc_sli_abort_iocb_ring(phba, pring);
|
||||
lpfc_sli_abort_fcp_rings(phba);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user