• J
    scsi: lpfc: Fix nonrecovery of NVME controller after cable swap. · 815a9c43
    James Smart 提交于
    In a test that is doing large numbers of cable swaps on the target, the
    nvme controllers wouldn't reconnect.
    
    During the cable swaps, the targets n_port_id would change. This
    information was passed to the nvme-fc transport, in the new remoteport
    registration. However, the nvme-fc transport didn't update the n_port_id
    value in the remoteport struct when it reused an existing structure.
    Later, when a new association was attempted on the remoteport, the
    driver's NVME LS routine would use the stale n_port_id from the
    remoteport struct to address the LS. As the device is no longer at that
    address, the LS would go into never never land.
    
    Separately, the nvme-fc transport will be corrected to update the
    n_port_id value on a re-registration.
    
    However, for now, there's no reason to use the transports values.  The
    private pointer points to the drivers node structure and the node
    structure is up to date. Therefore, revise the LS routine to use the
    drivers data structures for the LS. Augmented the debug message for
    better debugging in the future.
    
    Also removed a duplicate if check that seems to have slipped in.
    Signed-off-by: NDick Kennedy <dick.kennedy@broadcom.com>
    Signed-off-by: NJames Smart <james.smart@broadcom.com>
    Reviewed-by: NHannes Reinecke <hare@suse.com>
    Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
    815a9c43
lpfc_nvme.c 84.2 KB