• James Smart's avatar
    scsi: lpfc: Fix FLOGI handling across multiple link up/down conditions · 6ede2ddd
    James Smart authored
    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: 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>
    6ede2ddd
lpfc_els.c 313 KB