/* Locking Note: The lport lock is expected to be held before calling this routine.  */
void fc_lport_enter_flogi(struct fc_lport *)
/* Locking Note: The lport lock is expected to be held before calling this routine.  */
void fc_lport_enter_flogi(struct fc_lport *)
{
	struct fc_frame *fp;
	FC_LPORT_DBG(lport, "Entered FLOGI state from %s state\n",
		     fc_lport_state(lport));
	fc_lport_state_enter(lport, LPORT_ST_FLOGI);
	fp = fc_frame_alloc(lport, sizeof(struct fc_els_flogi));
	if (!fp)
		return fc_lport_error(lport, fp);
	if (!lport->tt.elsct_send(lport, FC_FID_FLOGI, fp,
				  lport->vport ? ELS_FDISC : ELS_FLOGI,
				  fc_lport_flogi_resp, lport,
				  lport->vport ? 2 * lport->r_a_tov :
				  lport->e_d_tov))
		fc_lport_error(lport, NULL);
}