summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Tee <justin.tee@broadcom.com>2025-06-18 12:21:30 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2025-06-23 13:10:33 -0400
commit6b61ec3dd472f8fd367f116e61771030f4d410db (patch)
tree4d4152b7df1d279bca3aec395f7f740b721eaa80
parent37c893e36b1b538aea15bcef6330e1d4a7b77583 (diff)
downloadlinux-6b61ec3dd472f8fd367f116e61771030f4d410db.tar.gz
linux-6b61ec3dd472f8fd367f116e61771030f4d410db.zip
scsi: lpfc: Early return out of FDMI cmpl for locally rejected statuses
If an FDMI request completes with local reject status and the request is not retryable, there's no need to parse an FDMI response payload. Insert an early return statement for such cases. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20250618192138.124116-6-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/lpfc/lpfc_ct.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
index a88099b6e713..6baf1916d827 100644
--- a/drivers/scsi/lpfc/lpfc_ct.c
+++ b/drivers/scsi/lpfc/lpfc_ct.c
@@ -2229,21 +2229,6 @@ lpfc_cmpl_ct_disc_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
/* Look for a retryable error */
if (ulp_status == IOSTAT_LOCAL_REJECT) {
switch ((ulp_word4 & IOERR_PARAM_MASK)) {
- case IOERR_SLI_ABORTED:
- case IOERR_SLI_DOWN:
- /* Driver aborted this IO. No retry as error
- * is likely Offline->Online or some adapter
- * error. Recovery will try again, but if port
- * is not active there's no point to continue
- * issuing follow up FDMI commands.
- */
- if (!(phba->sli.sli_flag & LPFC_SLI_ACTIVE)) {
- free_ndlp = cmdiocb->ndlp;
- lpfc_ct_free_iocb(phba, cmdiocb);
- lpfc_nlp_put(free_ndlp);
- return;
- }
- break;
case IOERR_ABORT_IN_PROGRESS:
case IOERR_SEQUENCE_TIMEOUT:
case IOERR_ILLEGAL_FRAME:
@@ -2269,6 +2254,9 @@ lpfc_cmpl_ct_disc_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
lpfc_ct_free_iocb(phba, cmdiocb);
lpfc_nlp_put(free_ndlp);
+ if (ulp_status != IOSTAT_SUCCESS)
+ return;
+
ndlp = lpfc_findnode_did(vport, FDMI_DID);
if (!ndlp)
return;