Skip to content

Commit dcf5ea6

Browse files
Justin Teemartinkpetersen
authored andcommitted
scsi: lpfc: Abort outstanding ELS WQEs regardless of if rmmod is in progress
Driver rmmod may take a long time when in a very large SAN environment. This is because outstanding ELS WQEs may end up taking E_D_TOV seconds to complete causing long delays. Speed this up by issuing aborts with the ia bit set so that outstanding ELS WQEs complete faster. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Message-ID: <20250915180811.137530-3-justintee8345@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 12ff7c5 commit dcf5ea6

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

drivers/scsi/lpfc/lpfc_sli.c

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12439,19 +12439,11 @@ lpfc_sli_issue_abort_iotag(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
1243912439
}
1244012440

1244112441
/*
12442-
* If we're unloading, don't abort iocb on the ELS ring, but change
12443-
* the callback so that nothing happens when it finishes.
12442+
* Always abort the outstanding WQE and set the IA bit correctly
12443+
* for the context. This is necessary for correctly removing
12444+
* outstanding ndlp reference counts when the CQE completes with
12445+
* the XB bit set.
1244412446
*/
12445-
if (test_bit(FC_UNLOADING, &vport->load_flag) &&
12446-
pring->ringno == LPFC_ELS_RING) {
12447-
if (cmdiocb->cmd_flag & LPFC_IO_FABRIC)
12448-
cmdiocb->fabric_cmd_cmpl = lpfc_ignore_els_cmpl;
12449-
else
12450-
cmdiocb->cmd_cmpl = lpfc_ignore_els_cmpl;
12451-
return retval;
12452-
}
12453-
12454-
/* issue ABTS for this IOCB based on iotag */
1245512447
abtsiocbp = __lpfc_sli_get_iocbq(phba);
1245612448
if (abtsiocbp == NULL)
1245712449
return IOCB_NORESOURCE;

0 commit comments

Comments
 (0)