Skip to content

Commit 678768d

Browse files
Dick Kennedymartinkpetersen
authored andcommitted
scsi: lpfc: Fix retry of PRLI when status indicates its unsupported
With port bounce/address swaps and timing between initiator GID queries vs remote port FC4 support registrations, the driver may be in a situation where it sends PRLIs for both FCP and NVME even though the target may not support one of the protocols. In this case, the remote port will reject the PRLI and usually indicate it does not support the request. However, the driver currently ignores the status of the failure and immediately retries the PRLI, which is pointless. In the case of this one remote port, the reception of the PRLI retry caused it to decide to send a LOGO. The LOGO restarted the process and the same results happened. It made the remote port undiscoverable to either protocol. Add logic to detect the non-support status and not attempt the retry of the PRLI. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 24411fc commit 678768d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

drivers/scsi/lpfc/lpfc_els.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3937,10 +3937,14 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
39373937
case LSRJT_UNABLE_TPC:
39383938
/* The driver has a VALID PLOGI but the rport has
39393939
* rejected the PRLI - can't do it now. Delay
3940-
* for 1 second and try again - don't care about
3941-
* the explanation.
3940+
* for 1 second and try again.
3941+
*
3942+
* However, if explanation is REQ_UNSUPPORTED there's
3943+
* no point to retry PRLI.
39423944
*/
3943-
if (cmd == ELS_CMD_PRLI || cmd == ELS_CMD_NVMEPRLI) {
3945+
if ((cmd == ELS_CMD_PRLI || cmd == ELS_CMD_NVMEPRLI) &&
3946+
stat.un.b.lsRjtRsnCodeExp !=
3947+
LSEXP_REQ_UNSUPPORTED) {
39443948
delay = 1000;
39453949
maxretry = lpfc_max_els_tries + 1;
39463950
retry = 1;

0 commit comments

Comments
 (0)