diff options
| author | Justin Tee <justin.tee@broadcom.com> | 2025-09-15 11:07:59 -0700 |
|---|---|---|
| committer | Martin K. Petersen <martin.petersen@oracle.com> | 2025-09-16 22:19:59 -0400 |
| commit | dcf5ea65cff290cfcf73c3c3b7b201bd2b0d92d2 (patch) | |
| tree | 9b211171146438d34ace4769339ef20b2c4d0e46 | |
| parent | 12ff7c57928269c947fcc032364f088c57e7efb8 (diff) | |
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>
| -rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index a8fbdf7119d8..f84dca848bf0 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -12439,19 +12439,11 @@ lpfc_sli_issue_abort_iotag(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, } /* - * If we're unloading, don't abort iocb on the ELS ring, but change - * the callback so that nothing happens when it finishes. + * Always abort the outstanding WQE and set the IA bit correctly + * for the context. This is necessary for correctly removing + * outstanding ndlp reference counts when the CQE completes with + * the XB bit set. */ - if (test_bit(FC_UNLOADING, &vport->load_flag) && - pring->ringno == LPFC_ELS_RING) { - if (cmdiocb->cmd_flag & LPFC_IO_FABRIC) - cmdiocb->fabric_cmd_cmpl = lpfc_ignore_els_cmpl; - else - cmdiocb->cmd_cmpl = lpfc_ignore_els_cmpl; - return retval; - } - - /* issue ABTS for this IOCB based on iotag */ abtsiocbp = __lpfc_sli_get_iocbq(phba); if (abtsiocbp == NULL) return IOCB_NORESOURCE; |