* [PATCH] scsi: lpfc: restore clearing of NLP_UNREG_INP in ndlp->nlp_flag
@ 2025-03-17 16:37 Ewan D. Milne
2025-03-18 0:02 ` Justin Tee
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ewan D. Milne @ 2025-03-17 16:37 UTC (permalink / raw)
To: linux-scsi; +Cc: dick.kennedy, james.smart, justin.tee
Commit "scsi: lpfc: Remove NLP_RELEASE_RPI flag from nodelist structure"
introduced a regression with SLI-3 adapters (e.g. LPe12000 8Gb) where
a Link Down / Link Up such as caused by disabling an host FC switch port
would result in the devices remaining in the transport-offline state
and multipath reporting them as failed. This problem was not seen with
newer SLI-4 adapters.
The problem was caused by portions of the patch which removed the functions
__lpfc_sli_rpi_release() and lpfc_sli_rpi_release() and all their callers.
This was presumably because with the removal of the NLP_RELEASE_RPI flag
there was no need to free the rpi.
However, __lpfc_sli_rpi_release() and lpfc_sli_rpi_release() which calls it
reset the NLP_UNREG_INP flag. And, lpfc_sli_def_mbox_cmpl() has a path
where __lpfc_sli_rpi_release() was called in a particular case where
NLP_UNREG_INP was not otherwise cleared because of other conditions.
Restoring the else clause of this conditional and simply clearing the
NLP_UNREG_INP flag appears to resolve the problem with SLI-3 adapters.
It should be noted that the code path in question is not specific to SLI-3,
but there are other SLI-4 code paths which may have masked the issue.
Fixes: 32566a6f1ae5 ("scsi: lpfc: Remove NLP_RELEASE_RPI flag from nodelist structure")
Cc: stable@vger.kernel.org
Tested-by: Marco Patalano <mpatalan@redhat.com>
Signed-off-by: Ewan D. Milne <emilne@redhat.com>
---
drivers/scsi/lpfc/lpfc_sli.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 3fd9723cd271..92f3d4423729 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -2923,6 +2923,8 @@ lpfc_sli_def_mbox_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
clear_bit(NLP_UNREG_INP, &ndlp->nlp_flag);
ndlp->nlp_defer_did = NLP_EVT_NOTHING_PENDING;
lpfc_issue_els_plogi(vport, ndlp->nlp_DID, 0);
+ } else {
+ clear_bit(NLP_UNREG_INP, &ndlp->nlp_flag);
}
/* The unreg_login mailbox is complete and had a
--
2.45.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] scsi: lpfc: restore clearing of NLP_UNREG_INP in ndlp->nlp_flag
2025-03-17 16:37 [PATCH] scsi: lpfc: restore clearing of NLP_UNREG_INP in ndlp->nlp_flag Ewan D. Milne
@ 2025-03-18 0:02 ` Justin Tee
2025-03-18 1:41 ` Martin K. Petersen
2025-03-21 0:36 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Justin Tee @ 2025-03-18 0:02 UTC (permalink / raw)
To: Ewan D. Milne; +Cc: linux-scsi, dick.kennedy, james.smart, justin.tee
Reviewed-by: Justin Tee <justin.tee@broadcom.com>
Thanks for fixing, looks good.
Regards,
Justin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: lpfc: restore clearing of NLP_UNREG_INP in ndlp->nlp_flag
2025-03-17 16:37 [PATCH] scsi: lpfc: restore clearing of NLP_UNREG_INP in ndlp->nlp_flag Ewan D. Milne
2025-03-18 0:02 ` Justin Tee
@ 2025-03-18 1:41 ` Martin K. Petersen
2025-03-21 0:36 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2025-03-18 1:41 UTC (permalink / raw)
To: Ewan D. Milne; +Cc: linux-scsi, dick.kennedy, james.smart, justin.tee
Ewan,
> Commit "scsi: lpfc: Remove NLP_RELEASE_RPI flag from nodelist structure"
> introduced a regression with SLI-3 adapters (e.g. LPe12000 8Gb) where
> a Link Down / Link Up such as caused by disabling an host FC switch port
> would result in the devices remaining in the transport-offline state
> and multipath reporting them as failed. This problem was not seen with
> newer SLI-4 adapters.
Applied to 6.15/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: lpfc: restore clearing of NLP_UNREG_INP in ndlp->nlp_flag
2025-03-17 16:37 [PATCH] scsi: lpfc: restore clearing of NLP_UNREG_INP in ndlp->nlp_flag Ewan D. Milne
2025-03-18 0:02 ` Justin Tee
2025-03-18 1:41 ` Martin K. Petersen
@ 2025-03-21 0:36 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2025-03-21 0:36 UTC (permalink / raw)
To: linux-scsi, Ewan D. Milne
Cc: Martin K . Petersen, dick.kennedy, james.smart, justin.tee
On Mon, 17 Mar 2025 12:37:31 -0400, Ewan D. Milne wrote:
> Commit "scsi: lpfc: Remove NLP_RELEASE_RPI flag from nodelist structure"
> introduced a regression with SLI-3 adapters (e.g. LPe12000 8Gb) where
> a Link Down / Link Up such as caused by disabling an host FC switch port
> would result in the devices remaining in the transport-offline state
> and multipath reporting them as failed. This problem was not seen with
> newer SLI-4 adapters.
>
> [...]
Applied to 6.15/scsi-queue, thanks!
[1/1] scsi: lpfc: restore clearing of NLP_UNREG_INP in ndlp->nlp_flag
https://git.kernel.org/mkp/scsi/c/040492ac2578
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-03-21 0:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-17 16:37 [PATCH] scsi: lpfc: restore clearing of NLP_UNREG_INP in ndlp->nlp_flag Ewan D. Milne
2025-03-18 0:02 ` Justin Tee
2025-03-18 1:41 ` Martin K. Petersen
2025-03-21 0:36 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox