Skip to content

Commit

Permalink
lpfc: Fix discovery issue when changing from Pt2Pt to Fabric.
Browse files Browse the repository at this point in the history
Signed-off-by: Dick Kennedy <[email protected]>
Signed-off-by: James Smart <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
  • Loading branch information
James Smart authored and James Bottomley committed Jun 6, 2015
1 parent c84163d commit 6b337e0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion drivers/scsi/lpfc/lpfc_hbadisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4834,9 +4834,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;
Expand Down

0 comments on commit 6b337e0

Please sign in to comment.