scsi: lpfc: Ignore GID-FT response that may be received after a link flip
authorJames Smart <jsmart2021@gmail.com>
Fri, 14 May 2021 19:55:55 +0000 (12:55 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 22 May 2021 03:23:28 +0000 (23:23 -0400)
commit04c1d9c50ae32d6efd0b71024b3829051821c7a2
tree551608aebbb29950fb93879a673ed23a9b4f1cec
parentfe83e3b9b422ac8ece2359c7b7290efe7f0335a2
scsi: lpfc: Ignore GID-FT response that may be received after a link flip

When a link bounce happens, there is a possibility that responses to
requests posted prior to the link bounce could be received. This is
problematic as the counter to track reglogin completion after link up can
become out of sync with the real state.

As there is no reason to process a request made in a prior link up context,
eliminate all the disturbance by tagging the request with the event_tag
maintained by the SLI Port for the link. The event_tag will change on every
link state transition.  As long as the tag matches the current event_tag,
the response can be processed. If it doesn't match, just discard the
response.

Link: https://lore.kernel.org/r/20210514195559.119853-8-jsmart2021@gmail.com
Co-developed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Justin Tee <justin.tee@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
drivers/scsi/lpfc/lpfc_sli.h