aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc/fc_npiv.c
diff options
context:
space:
mode:
authorRobert Love <robert.w.love@intel.com>2010-05-07 18:18:41 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-05-16 22:22:34 -0400
commit7b2787ec15b9d1c2f716da61b0eec21a3f5e6520 (patch)
tree39b098d4253fa266ea75bf1f7feb75458e78b77d /drivers/scsi/libfc/fc_npiv.c
parent5e4f8fe7b58f4da5043b7f219fe9193cddd9262e (diff)
[SCSI] libfc: Move the port_id into lport
This patch creates a port_id member in struct fc_lport. This allows libfc to just deal with fc_lport instances instead of calling into the fc_host to get the port_id. This change helps in only using symbols necessary for operation from the libfc structures. libfc still needs to change the fc_host_port_id() if the port_id changes so the presentation layer (scsi_transport_fc) can provide the user with the correct value, but libfc shouldn't rely on the presentation layer for operational values. Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/libfc/fc_npiv.c')
-rw-r--r--drivers/scsi/libfc/fc_npiv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/libfc/fc_npiv.c b/drivers/scsi/libfc/fc_npiv.c
index 45b6f1e2df92..dd2b43bb1c70 100644
--- a/drivers/scsi/libfc/fc_npiv.c
+++ b/drivers/scsi/libfc/fc_npiv.c
@@ -69,7 +69,7 @@ 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) 75 if (port_id == FC_FID_FLOGI)
@@ -77,7 +77,7 @@ struct fc_lport *fc_vport_id_lookup(struct fc_lport *n_port, u32 port_id)
77 77
78 mutex_lock(&n_port->lp_mutex); 78 mutex_lock(&n_port->lp_mutex);
79 list_for_each_entry(vn_port, &n_port->vports, list) { 79 list_for_each_entry(vn_port, &n_port->vports, list) {
80 if (fc_host_port_id(vn_port->host) == port_id) { 80 if (vn_port->port_id == port_id) {
81 lport = vn_port; 81 lport = vn_port;
82 break; 82 break;
83 } 83 }