Skip to content

Commit 6b61ec3

Browse files
Justin Teemartinkpetersen
authored andcommitted
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>
1 parent 37c893e commit 6b61ec3

1 file changed

Lines changed: 3 additions & 15 deletions

File tree

drivers/scsi/lpfc/lpfc_ct.c

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2229,21 +2229,6 @@ lpfc_cmpl_ct_disc_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
22292229
/* Look for a retryable error */
22302230
if (ulp_status == IOSTAT_LOCAL_REJECT) {
22312231
switch ((ulp_word4 & IOERR_PARAM_MASK)) {
2232-
case IOERR_SLI_ABORTED:
2233-
case IOERR_SLI_DOWN:
2234-
/* Driver aborted this IO. No retry as error
2235-
* is likely Offline->Online or some adapter
2236-
* error. Recovery will try again, but if port
2237-
* is not active there's no point to continue
2238-
* issuing follow up FDMI commands.
2239-
*/
2240-
if (!(phba->sli.sli_flag & LPFC_SLI_ACTIVE)) {
2241-
free_ndlp = cmdiocb->ndlp;
2242-
lpfc_ct_free_iocb(phba, cmdiocb);
2243-
lpfc_nlp_put(free_ndlp);
2244-
return;
2245-
}
2246-
break;
22472232
case IOERR_ABORT_IN_PROGRESS:
22482233
case IOERR_SEQUENCE_TIMEOUT:
22492234
case IOERR_ILLEGAL_FRAME:
@@ -2269,6 +2254,9 @@ lpfc_cmpl_ct_disc_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
22692254
lpfc_ct_free_iocb(phba, cmdiocb);
22702255
lpfc_nlp_put(free_ndlp);
22712256

2257+
if (ulp_status != IOSTAT_SUCCESS)
2258+
return;
2259+
22722260
ndlp = lpfc_findnode_did(vport, FDMI_DID);
22732261
if (!ndlp)
22742262
return;

0 commit comments

Comments
 (0)