• James Smart's avatar
    scsi: lpfc: Fix driver nvme rescan logging · a6d10f24
    James Smart authored
    In situations where zoning is not being used, thus NVMe initiators see
    other NVMe initiators as well as NVMe targets, a link bounce on an
    initiator will cause the NVMe initiators to spew "6169" State Error
    messages.
    
    The driver is not qualifying whether the remote port is a NVMe targer or
    not before calling the lpfc_nvme_rescan_port(), which validates the role
    and prints the message if its only an NVMe initiator.
    
    Fix by the following:
    
     - Before calling lpfc_nvme_rescan_port() ensure that the node is a NVMe
       storage target or a NVMe discovery controller.
    
     - Clean up implementation of lpfc_nvme_rescan_port. remoteport pointer
       will always be NULL if a NVMe initiator only. But, grabbing of
       remoteport pointer should be done under lock to coincide with the
       registering of the remote port with the fc transport.
    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>
    a6d10f24
lpfc_nvme.c 79.6 KB