]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
lpfc: Fix discovery issue when changing from Pt2Pt to Fabric.
authorJames Smart <james.smart@avagotech.com>
Thu, 21 May 2015 17:55:23 +0000 (13:55 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 19 Oct 2015 16:10:54 +0000 (09:10 -0700)
Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 6b337e032c398aa9d92222f0709f4e06932acf72)

Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
drivers/scsi/lpfc/lpfc_hbadisc.c

index 2f16dab9a619f094ee8444148ef206c511818e8d..82edee8c72ed46c79a199dafe15b5c693b7557f6 100644 (file)
@@ -4835,9 +4835,19 @@ lpfc_matchdid(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
        if (matchdid.un.b.id == ndlpdid.un.b.id) {
                if ((mydid.un.b.domain == matchdid.un.b.domain) &&
                    (mydid.un.b.area == matchdid.un.b.area)) {
+                       /* This code is supposed to match the ID
+                        * for a private loop device that is
+                        * connect to fl_port. But we need to
+                        * check that the port did not just go
+                        * from pt2pt to fabric or we could end
+                        * up matching ndlp->nlp_DID 000001 to
+                        * fabric DID 0x20101
+                        */
                        if ((ndlpdid.un.b.domain == 0) &&
                            (ndlpdid.un.b.area == 0)) {
-                               if (ndlpdid.un.b.id)
+                               if (ndlpdid.un.b.id &&
+                                   vport->phba->fc_topology ==
+                                   LPFC_TOPOLOGY_LOOP)
                                        return 1;
                        }
                        return 0;