/* Locking Note: The lport lock is expected to be held before calling this routine.  */
static void fc_lport_enter_reset(struct fc_lport *)
/* Locking Note: The lport lock is expected to be held before calling this routine.  */
static void fc_lport_enter_reset(struct fc_lport *)
{
	FC_LPORT_DBG(lport, "Entered RESET state from %s state\n",
		     fc_lport_state(lport));
	if (lport->state == LPORT_ST_DISABLED || lport->state == LPORT_ST_LOGO)
		return;
	if (lport->vport) {
		if (lport->link_up)
			fc_vport_set_state(lport->vport, FC_VPORT_INITIALIZING);
		else
			fc_vport_set_state(lport->vport, FC_VPORT_LINKDOWN);
	}
	fc_lport_state_enter(lport, LPORT_ST_RESET);
	fc_vports_linkchange(lport);
	fc_lport_reset_locked(lport);
	if (lport->link_up)
		fc_lport_enter_flogi(lport);
}