• James Smart's avatar
    scsi: lpfc: Fix discovery failure when PLOGI is defered · 00292e03
    James Smart authored
    When a target's link dropped, an RSCN was received to communicate the
    change. The driver detected the loss of the target and issued and UNREG_RPI
    mailbox command.  While that was being processed, another RSCN was received
    to communicate the port coming back.  The driver deferred the PLOGI to the
    port until the mailbox command finishes. When the mailbox command completed
    it saw the pending port and called the routines to issue the
    PLOGI. However, it forgot to clear the UNREG_INP state flag, so the PLOGI
    xmt routine nooped the PLOGI request assuming it needed to wait for the
    mailbox command.  At this point, login would never be re-attempted.
    
    Clear UNREG_INP before issuing the deferred PLOGI.
    Signed-off-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
    Signed-off-by: default avatarJames Smart <jsmart2021@gmail.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    00292e03
lpfc_sli.c 600 KB