Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvar...
[pandora-kernel.git] / drivers / scsi / libfc / fc_npiv.c
index c68f6c7..dd2b43b 100644 (file)
@@ -69,12 +69,15 @@ struct fc_lport *fc_vport_id_lookup(struct fc_lport *n_port, u32 port_id)
        struct fc_lport *lport = NULL;
        struct fc_lport *vn_port;
 
-       if (fc_host_port_id(n_port->host) == port_id)
+       if (n_port->port_id == port_id)
                return n_port;
 
+       if (port_id == FC_FID_FLOGI)
+               return n_port;          /* for point-to-point */
+
        mutex_lock(&n_port->lp_mutex);
        list_for_each_entry(vn_port, &n_port->vports, list) {
-               if (fc_host_port_id(vn_port->host) == port_id) {
+               if (vn_port->port_id == port_id) {
                        lport = vn_port;
                        break;
                }