]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: lpfc: Fix nonrecovery of NVME controller after cable swap.
authorJames Smart <jsmart2021@gmail.com>
Tue, 30 Jan 2018 23:59:01 +0000 (15:59 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 12 Feb 2018 16:43:24 +0000 (11:43 -0500)
commit151e028edbf140723933d67736db3834f74ce478
tree6a3e1d391b8fd09d7b3e0a377955f2391e86e214
parentb8118129aeab7e833de0aa7c5cb92638a50e9374
scsi: lpfc: Fix nonrecovery of NVME controller after cable swap.

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: 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_nvme.c