Skip to contentSkip to conversation

lpfc: Fix discovery issue when changing from Pt2Pt to Fabric.

PATCH In review James Smart 2 participants 2 messages Apr 20, 2015 – Apr 21, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 8/14 lpfc: Fix discovery issue when changing from Pt2Pt to Fabric.

Fix discovery issue when changing from Pt2Pt to Fabric.

---
 drivers/scsi/lpfc/lpfc_hbadisc.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_hbadisc.c +11 -1
index 6ecd4ad..88af258 100644
@@ -4827,9 +4827,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;
Signature · 1 line
1.7.11.7
Reviewed-by on v1 8/14
#1 lore raw
Quoted 6 lines · James Smart

Fix discovery issue when changing from Pt2Pt to Fabric.

---

Cheers,

Hannes

Signature · 8 lines
Dr. Hannes Reinecke		      zSeries & Storage
[email protected]			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html