Lines Matching refs:lport
72 struct fc_lport *lport; in fc_disc_recv_rscn_req() local
85 lport = fc_disc_lport(disc); in fc_disc_recv_rscn_req()
127 dp->lp = lport; in fc_disc_recv_rscn_req()
151 redisc = fc_disc_single(lport, dp); in fc_disc_recv_rscn_req()
160 redisc, lport->state, disc->pending); in fc_disc_recv_rscn_req()
181 static void fc_disc_recv_req(struct fc_lport *lport, struct fc_frame *fp) in fc_disc_recv_req() argument
184 struct fc_disc *disc = &lport->disc; in fc_disc_recv_req()
235 struct fc_lport *lport) in fc_disc_start() argument
237 struct fc_disc *disc = &lport->disc; in fc_disc_start()
257 struct fc_lport *lport = fc_disc_lport(disc); in fc_disc_done() local
290 disc->disc_callback(lport, event); in fc_disc_done()
301 struct fc_lport *lport = fc_disc_lport(disc); in fc_disc_error() local
318 delay = msecs_to_jiffies(lport->e_d_tov); in fc_disc_error()
345 struct fc_lport *lport = fc_disc_lport(disc); in fc_disc_gpn_ft_req() local
349 WARN_ON(!fc_lport_test_ready(lport)); in fc_disc_gpn_ft_req()
356 fp = fc_frame_alloc(lport, in fc_disc_gpn_ft_req()
362 if (lport->tt.elsct_send(lport, 0, fp, in fc_disc_gpn_ft_req()
365 disc, 3 * lport->r_a_tov)) in fc_disc_gpn_ft_req()
381 struct fc_lport *lport; in fc_disc_gpn_ft_parse() local
390 lport = fc_disc_lport(disc); in fc_disc_gpn_ft_parse()
434 if (ids.port_id != lport->port_id && in fc_disc_gpn_ft_parse()
435 ids.port_name != lport->wwpn) { in fc_disc_gpn_ft_parse()
436 rdata = fc_rport_create(lport, ids.port_id); in fc_disc_gpn_ft_parse()
573 struct fc_lport *lport; in fc_disc_gpn_id_resp() local
579 lport = rdata->local_port; in fc_disc_gpn_id_resp()
580 disc = &lport->disc; in fc_disc_gpn_id_resp()
609 mutex_lock(&lport->disc.disc_mutex); in fc_disc_gpn_id_resp()
610 new_rdata = fc_rport_create(lport, rdata->ids.port_id); in fc_disc_gpn_id_resp()
611 mutex_unlock(&lport->disc.disc_mutex); in fc_disc_gpn_id_resp()
646 static int fc_disc_gpn_id_req(struct fc_lport *lport, in fc_disc_gpn_id_req() argument
651 lockdep_assert_held(&lport->disc.disc_mutex); in fc_disc_gpn_id_req()
652 fp = fc_frame_alloc(lport, sizeof(struct fc_ct_hdr) + in fc_disc_gpn_id_req()
656 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, FC_NS_GPN_ID, in fc_disc_gpn_id_req()
658 3 * lport->r_a_tov)) in fc_disc_gpn_id_req()
669 static int fc_disc_single(struct fc_lport *lport, struct fc_disc_port *dp) in fc_disc_single() argument
673 lockdep_assert_held(&lport->disc.disc_mutex); in fc_disc_single()
675 rdata = fc_rport_create(lport, dp->port_id); in fc_disc_single()
679 return fc_disc_gpn_id_req(lport, rdata); in fc_disc_single()
686 static void fc_disc_stop(struct fc_lport *lport) in fc_disc_stop() argument
688 struct fc_disc *disc = &lport->disc; in fc_disc_stop()
704 static void fc_disc_stop_final(struct fc_lport *lport) in fc_disc_stop_final() argument
706 fc_disc_stop(lport); in fc_disc_stop_final()
715 void fc_disc_config(struct fc_lport *lport, void *priv) in fc_disc_config() argument
719 if (!lport->tt.disc_start) in fc_disc_config()
720 lport->tt.disc_start = fc_disc_start; in fc_disc_config()
722 if (!lport->tt.disc_stop) in fc_disc_config()
723 lport->tt.disc_stop = fc_disc_stop; in fc_disc_config()
725 if (!lport->tt.disc_stop_final) in fc_disc_config()
726 lport->tt.disc_stop_final = fc_disc_stop_final; in fc_disc_config()
728 if (!lport->tt.disc_recv_req) in fc_disc_config()
729 lport->tt.disc_recv_req = fc_disc_recv_req; in fc_disc_config()
731 disc = &lport->disc; in fc_disc_config()
741 void fc_disc_init(struct fc_lport *lport) in fc_disc_init() argument
743 struct fc_disc *disc = &lport->disc; in fc_disc_init()