/* fc_disc_init() - Initialize the discovery layer for a local port @lport: The local port that needs the discovery layer to be initialized  */
int fc_disc_init(struct fc_lport *lport)
/* fc_disc_init() - Initialize the discovery layer for a local port @lport: The local port that needs the discovery layer to be initialized  */
int fc_disc_init(struct fc_lport *lport)
{
	struct fc_disc *disc;
	if (!lport->tt.disc_start)
		lport->tt.disc_start = fc_disc_start;
	if (!lport->tt.disc_stop)
		lport->tt.disc_stop = fc_disc_stop;
	if (!lport->tt.disc_stop_final)
		lport->tt.disc_stop_final = fc_disc_stop_final;
	if (!lport->tt.disc_recv_req)
		lport->tt.disc_recv_req = fc_disc_recv_req;
	disc = &lport->disc;
	INIT_DELAYED_WORK(&disc->disc_work, fc_disc_timeout);
	mutex_init(&disc->disc_mutex);
	INIT_LIST_HEAD(&disc->rports);
	disc->lport = lport;
	return 0;
}