aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc/fc_npiv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libfc/fc_npiv.c')
-rw-r--r--drivers/scsi/libfc/fc_npiv.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/libfc/fc_npiv.c b/drivers/scsi/libfc/fc_npiv.c
index c68f6c7341c2..dd2b43bb1c70 100644
--- a/drivers/scsi/libfc/fc_npiv.c
+++ b/drivers/scsi/libfc/fc_npiv.c
@@ -69,12 +69,15 @@ struct fc_lport *fc_vport_id_lookup(struct fc_lport *n_port, u32 port_id)
69 struct fc_lport *lport = NULL; 69 struct fc_lport *lport = NULL;
70 struct fc_lport *vn_port; 70 struct fc_lport *vn_port;
71 71
72 if (fc_host_port_id(n_port->host) == port_id) 72 if (n_port->port_id == port_id)
73 return n_port; 73 return n_port;
74 74
75 if (port_id == FC_FID_FLOGI)
76 return n_port; /* for point-to-point */
77
75 mutex_lock(&n_port->lp_mutex); 78 mutex_lock(&n_port->lp_mutex);
76 list_for_each_entry(vn_port, &n_port->vports, list) { 79 list_for_each_entry(vn_port, &n_port->vports, list) {
77 if (fc_host_port_id(vn_port->host) == port_id) { 80 if (vn_port->port_id == port_id) {
78 lport = vn_port; 81 lport = vn_port;
79 break; 82 break;
80 } 83 }