OSDN Git Service

scsi: lpfc: Fix multiple PRLI completion error path
authorJames Smart <jsmart2021@gmail.com>
Mon, 9 Apr 2018 21:24:21 +0000 (14:24 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 18 Apr 2018 23:34:00 +0000 (19:34 -0400)
commit118c0415eeec96669219536ed8fdaabecc5619fb
tree31b6648ce4bc3800061ca993d922dc562c29d97d
parent67c5490acebec5036b1bad199061633917d3c0ef
scsi: lpfc: Fix multiple PRLI completion error path

Nodelist entry for SCSI array ends up in UNMAPPED state. This is due to
illegal discovery State machine transition because of two PRLIs and the
first one failing with LS_RJT. Also, the error path was designed
assuming the PRLIs complete in the order they were sent, FCP first, then
NVME. In a failing case, the array thinks about the first PRLI (FCP),
but issues LS_RJT for the 2nd PRLI immediately.

Fix PRLI completion error path for the ordering expectation.  Ensure the
discovery state machine update is not set until all outstanding PRLIs
are complete.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_nportdisc.c