]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
scsi: lpfc: Correct missing remoteport registration during link bounces
authorJames Smart <jsmart2021@gmail.com>
Mon, 9 Apr 2018 21:24:32 +0000 (14:24 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 18 Apr 2018 23:34:06 +0000 (19:34 -0400)
Remote port disappearance/reappearances would cause a series of RSCN
events to be delivered to the driver. During the resulting GID_FT
handling, the driver clears the fc4 settings on the remote port, which
makes it skip registration. As such, the nvme associations eventually
fail and return io errors to the applications.

Correct by not clearng the nlp_fc4_types for all nodes in
lpfc_issue_gidft.  Instead, when the GID_FT response is handled, clear
the nlp_fc4_types of FCP and NVME prior to evaluating the fc4_type
returned by the GID_FT response.  This approach leaves "skipped" nodes
with their nlp_fc4_types intacted.

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_ct.c
drivers/scsi/lpfc/lpfc_hbadisc.c

index 1e7889e451602f2a2651252042f25b4f2641de78..d4a200ae5a6fcaa08fd0d7a99e5860cea8672854 100644 (file)
@@ -471,6 +471,11 @@ lpfc_prep_node_fc4type(struct lpfc_vport *vport, uint32_t Did, uint8_t fc4_type)
                                "Parse GID_FTrsp: did:x%x flg:x%x x%x",
                                Did, ndlp->nlp_flag, vport->fc_flag);
 
+                       /* Don't assume the rport is always the previous
+                        * FC4 type.
+                        */
+                       ndlp->nlp_fc4_type &= ~(NLP_FC4_FCP | NLP_FC4_NVME);
+
                        /* By default, the driver expects to support FCP FC4 */
                        if (fc4_type == FC_TYPE_FCP)
                                ndlp->nlp_fc4_type |= NLP_FC4_FCP;
index 3e7712cd6c9ac525705d7e8226b33881b2312f0a..cf2cbaa241b9e442f180a65d0f5c03d0567ef1ff 100644 (file)
@@ -3876,10 +3876,6 @@ int
 lpfc_issue_gidft(struct lpfc_vport *vport)
 {
        struct lpfc_hba *phba = vport->phba;
-       struct lpfc_nodelist *ndlp;
-
-       list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp)
-               ndlp->nlp_fc4_type &= ~(NLP_FC4_FCP | NLP_FC4_NVME);
 
        /* Good status, issue CT Request to NameServer */
        if ((phba->cfg_enable_fc4_type == LPFC_ENABLE_BOTH) ||