OSDN Git Service

scsi: lpfc: Fix FLOGI handling across multiple link up/down conditions
authorJames Smart <jsmart2021@gmail.com>
Wed, 14 Aug 2019 23:56:44 +0000 (16:56 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 20 Aug 2019 02:41:09 +0000 (22:41 -0400)
commit6ede2ddd8bdd28bdaf43d15e70dc0ef38c5448db
tree79721f79d6e557de8f6c043282f843b3fb2054be
parent3ad348d94452d6ab3aa0316105fb9f34f8ed3140
scsi: lpfc: Fix FLOGI handling across multiple link up/down conditions

It's possible for the driver to initiate an FLOGI and before it completes,
another link down/up transition occurs requiring a new FLOGI. Currently,
nothing is done to abort/noop the older FLOGI request to the adapter, so if
this transition occurs and the FLOGI completion is received after the link
down/up transition, the driver may erroneously act on the older FLOGI. In
most cases, the adapter properly terminates/fails the FLOGI, but there is a
timing condition where the FLOGI may complete on the wire prior to the
transition, but the response may not be seen/processed by the driver before
the driver sees the link transition.

Fix by having the link down handler in the driver run through any
outstanding ELS's and change the completion handler of the ELS so that it
will be no-op'd and released.

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_els.c