Lines Matching refs:n_port
24 struct fc_lport *n_port = shost_priv(shost); in libfc_vport_create() local
34 mutex_lock(&n_port->lp_mutex); in libfc_vport_create()
35 list_add_tail(&vn_port->list, &n_port->vports); in libfc_vport_create()
36 mutex_unlock(&n_port->lp_mutex); in libfc_vport_create()
49 struct fc_lport *fc_vport_id_lookup(struct fc_lport *n_port, u32 port_id) in fc_vport_id_lookup() argument
54 if (n_port->port_id == port_id) in fc_vport_id_lookup()
55 return n_port; in fc_vport_id_lookup()
58 return n_port; /* for point-to-point */ in fc_vport_id_lookup()
60 mutex_lock(&n_port->lp_mutex); in fc_vport_id_lookup()
61 list_for_each_entry(vn_port, &n_port->vports, list) { in fc_vport_id_lookup()
67 mutex_unlock(&n_port->lp_mutex); in fc_vport_id_lookup()
91 static void __fc_vport_setlink(struct fc_lport *n_port, in __fc_vport_setlink() argument
99 if (n_port->state == LPORT_ST_READY) { in __fc_vport_setlink()
100 if (n_port->npiv_enabled) { in __fc_vport_setlink()
121 struct fc_lport *n_port = shost_priv(shost); in fc_vport_setlink() local
123 mutex_lock(&n_port->lp_mutex); in fc_vport_setlink()
125 __fc_vport_setlink(n_port, vn_port); in fc_vport_setlink()
127 mutex_unlock(&n_port->lp_mutex); in fc_vport_setlink()
137 void fc_vports_linkchange(struct fc_lport *n_port) in fc_vports_linkchange() argument
141 list_for_each_entry(vn_port, &n_port->vports, list) { in fc_vports_linkchange()
143 __fc_vport_setlink(n_port, vn_port); in fc_vports_linkchange()