scsi: lpfc: Fix PRLI handling when topology type changes
authorJames Smart <jsmart2021@gmail.com>
Tue, 30 Jan 2018 23:58:50 +0000 (15:58 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 12 Feb 2018 16:43:23 +0000 (11:43 -0500)
commit2c3b2a8f652566c5b35d945f0c8146555d2062ec
treefb9e8e9d3b6746564d6604c45c557b4d1b4d79c8
parent6e8e1c14c61e54253098521127cd5ac0b959dd32
scsi: lpfc: Fix PRLI handling when topology type changes

The lpfc driver does not discover a target when the topology changes
from switched-fabric to direct-connect. The target rejects the PRLI from
the initiator in direct-connect as the driver is using the old S_ID from
the switched topology.

The driver was inappropriately clearing the VP bit to register the VPI,
which is what is associated with the S_ID.

Fix by leaving the VP bit set (it was set earlier) and as the VFI is
being re-registered, set the UPDT bit.

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_mbox.c