Lines Matching refs:lport

19  * be held when acquiring the lport lock. Refer to fc_lport.c for more
48 * fc_disc_stop_rports() - Delete all the remote ports associated with the lport
72 struct fc_lport *lport;
84 lport = fc_disc_lport(disc);
124 dp->lp = lport;
148 redisc = fc_disc_single(lport, dp);
157 redisc, lport->state, disc->pending);
171 * @lport: The local port receiving the request
178 static void fc_disc_recv_req(struct fc_lport *lport, struct fc_frame *fp)
181 struct fc_disc *disc = &lport->disc;
227 * @lport: The local port to have discovery started on
232 struct fc_lport *lport)
234 struct fc_disc *disc = &lport->disc;
254 struct fc_lport *lport = fc_disc_lport(disc);
287 disc->disc_callback(lport, event);
298 struct fc_lport *lport = fc_disc_lport(disc);
315 delay = msecs_to_jiffies(lport->e_d_tov);
327 * if discovery fails due to lport reset, clear
342 struct fc_lport *lport = fc_disc_lport(disc);
346 WARN_ON(!fc_lport_test_ready(lport));
353 fp = fc_frame_alloc(lport,
359 if (lport->tt.elsct_send(lport, 0, fp,
362 disc, 3 * lport->r_a_tov))
378 struct fc_lport *lport;
387 lport = fc_disc_lport(disc);
431 if (ids.port_id != lport->port_id &&
432 ids.port_name != lport->wwpn) {
433 rdata = fc_rport_create(lport, ids.port_id);
570 struct fc_lport *lport;
576 lport = rdata->local_port;
577 disc = &lport->disc;
606 mutex_lock(&lport->disc.disc_mutex);
607 new_rdata = fc_rport_create(lport, rdata->ids.port_id);
608 mutex_unlock(&lport->disc.disc_mutex);
638 * @lport: The local port to initiate discovery on
643 static int fc_disc_gpn_id_req(struct fc_lport *lport,
648 lockdep_assert_held(&lport->disc.disc_mutex);
649 fp = fc_frame_alloc(lport, sizeof(struct fc_ct_hdr) +
653 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, FC_NS_GPN_ID,
655 3 * lport->r_a_tov))
663 * @lport: The local port the remote port is associated with
666 static int fc_disc_single(struct fc_lport *lport, struct fc_disc_port *dp)
670 lockdep_assert_held(&lport->disc.disc_mutex);
672 rdata = fc_rport_create(lport, dp->port_id);
676 return fc_disc_gpn_id_req(lport, rdata);
680 * fc_disc_stop() - Stop discovery for a given lport
681 * @lport: The local port that discovery should stop on
683 static void fc_disc_stop(struct fc_lport *lport)
685 struct fc_disc *disc = &lport->disc;
695 * fc_disc_stop_final() - Stop discovery for a given lport
696 * @lport: The lport that discovery should stop on
701 static void fc_disc_stop_final(struct fc_lport *lport)
703 fc_disc_stop(lport);
709 * @lport: The local port that needs the discovery layer to be configured
712 void fc_disc_config(struct fc_lport *lport, void *priv)
716 if (!lport->tt.disc_start)
717 lport->tt.disc_start = fc_disc_start;
719 if (!lport->tt.disc_stop)
720 lport->tt.disc_stop = fc_disc_stop;
722 if (!lport->tt.disc_stop_final)
723 lport->tt.disc_stop_final = fc_disc_stop_final;
725 if (!lport->tt.disc_recv_req)
726 lport->tt.disc_recv_req = fc_disc_recv_req;
728 disc = &lport->disc;
736 * @lport: The local port that needs the discovery layer to be initialized
738 void fc_disc_init(struct fc_lport *lport)
740 struct fc_disc *disc = &lport->disc;