]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: lpfc: Fix devices that don't return after devloss followed by rediscovery
authorJames Smart <jsmart2021@gmail.com>
Wed, 14 Aug 2019 23:56:46 +0000 (16:56 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 20 Aug 2019 02:41:09 +0000 (22:41 -0400)
commit9c75d94c760c58c0b5ab1930ce65a7c9402cf931
tree48760e236c23ffc84dab4207d292111032a51a1f
parentaf28ab9885d279f71178b9c990dc5181ec3b01aa
scsi: lpfc: Fix devices that don't return after devloss followed by rediscovery

If a remote port is removed and remains removed for devloss_tmo, if an RSCN
is subsequently received indicating the presence of the remte port, the
driver does not login to and rediscovery the remote port.

Currently, in order to for a port to be rediscovered post an RSCN, the node
state must be NPR to reflect not logged in. When devloss expires, the node
state is marked UNUSED. When an RSCN occurs, the nodes referenced by the
RSCN will have a NPR_2B_DISC flag set, but the re-login will only be
attempted if the node is in NPR_NODE state.  Thus the node is skipped over.

Fix by recognizing the NPR_2B_DISC and UNUSED and transition the node back
to NPR state to allow the re-login to take place.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_ct.c