Lines Matching refs:n_port
35 struct fc_lport *n_port = shost_priv(shost); in libfc_vport_create() local
45 mutex_lock(&n_port->lp_mutex); in libfc_vport_create()
46 list_add_tail(&vn_port->list, &n_port->vports); in libfc_vport_create()
47 mutex_unlock(&n_port->lp_mutex); in libfc_vport_create()
60 struct fc_lport *fc_vport_id_lookup(struct fc_lport *n_port, u32 port_id) in fc_vport_id_lookup() argument
65 if (n_port->port_id == port_id) in fc_vport_id_lookup()
66 return n_port; in fc_vport_id_lookup()
69 return n_port; /* for point-to-point */ in fc_vport_id_lookup()
71 mutex_lock(&n_port->lp_mutex); in fc_vport_id_lookup()
72 list_for_each_entry(vn_port, &n_port->vports, list) { in fc_vport_id_lookup()
78 mutex_unlock(&n_port->lp_mutex); in fc_vport_id_lookup()
102 static void __fc_vport_setlink(struct fc_lport *n_port, in __fc_vport_setlink() argument
110 if (n_port->state == LPORT_ST_READY) { in __fc_vport_setlink()
111 if (n_port->npiv_enabled) { in __fc_vport_setlink()
132 struct fc_lport *n_port = shost_priv(shost); in fc_vport_setlink() local
134 mutex_lock(&n_port->lp_mutex); in fc_vport_setlink()
136 __fc_vport_setlink(n_port, vn_port); in fc_vport_setlink()
138 mutex_unlock(&n_port->lp_mutex); in fc_vport_setlink()
148 void fc_vports_linkchange(struct fc_lport *n_port) in fc_vports_linkchange() argument
152 list_for_each_entry(vn_port, &n_port->vports, list) { in fc_vports_linkchange()
154 __fc_vport_setlink(n_port, vn_port); in fc_vports_linkchange()