Lines Matching defs:n_port
35 struct fc_lport *n_port = shost_priv(shost);
41 if (fc_exch_mgr_list_clone(n_port, vn_port))
47 mutex_lock(&n_port->lp_mutex);
48 list_add_tail(&vn_port->list, &n_port->vports);
49 mutex_unlock(&n_port->lp_mutex);
62 * @n_port: Top level N_Port which may have multiple NPIV VN_Ports
67 struct fc_lport *fc_vport_id_lookup(struct fc_lport *n_port, u32 port_id)
72 if (n_port->port_id == port_id)
73 return n_port;
76 return n_port; /* for point-to-point */
78 mutex_lock(&n_port->lp_mutex);
79 list_for_each_entry(vn_port, &n_port->vports, list) {
85 mutex_unlock(&n_port->lp_mutex);
103 * @n_port: parent N_Port
108 static void __fc_vport_setlink(struct fc_lport *n_port,
116 if (n_port->state == LPORT_ST_READY) {
117 if (n_port->npiv_enabled) {
138 struct fc_lport *n_port = shost_priv(shost);
140 mutex_lock(&n_port->lp_mutex);
142 __fc_vport_setlink(n_port, vn_port);
144 mutex_unlock(&n_port->lp_mutex);
150 * @n_port: Parent N_Port that has changed state
152 * Locking: called with the n_port lp_mutex held
154 void fc_vports_linkchange(struct fc_lport *n_port)
158 list_for_each_entry(vn_port, &n_port->vports, list) {
160 __fc_vport_setlink(n_port, vn_port);