scsi: lpfc: Fix GFT_ID and PRLI logic for RSCN
authorJames Smart <jsmart2021@gmail.com>
Mon, 10 Sep 2018 17:30:41 +0000 (10:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Nov 2019 17:46:28 +0000 (18:46 +0100)
commit8caed6a5d3857e4ca1dfc9ea455ec8e4d1837ec1
treee1f4cc1ee9ad53f400ec292634e9cebf962290c3
parent050e019c2d699e951e0be333fa370a324279ada6
scsi: lpfc: Fix GFT_ID and PRLI logic for RSCN

[ Upstream commit 01a8aed6a009625282b6265880f6b20cbd7a9c70 ]

Driver only sends NVME PRLI to a device that also supports FCP.  This resuls
in remote ports that don't have fc_remote_ports created for them. The driver
is clearing the nlp_fc4_type for a ndlp at the wrong time.

Fix by moving the nlp_fc4_type clearing to the discovery engine in the
DEVICE_RECOVERY state. Also ensure that rport registration is done for all
nlp_fc4_types.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/lpfc/lpfc_ct.c
drivers/scsi/lpfc/lpfc_hbadisc.c
drivers/scsi/lpfc/lpfc_nportdisc.c