/* Locking Note: The rport lock is expected to be held before calling this routine  */
static void fc_rport_error(struct fc_rport_priv *, struct fc_frame *)
/* Locking Note: The rport lock is expected to be held before calling this routine  */
static void fc_rport_error(struct fc_rport_priv *, struct fc_frame *)
{
	FC_RPORT_DBG(rdata, "Error %ld in state %s, retries %d\n",
		     IS_ERR(fp) ? -PTR_ERR(fp) : 0,
		     fc_rport_state(rdata), rdata->retries);
	switch (rdata->rp_state) {
	case RPORT_ST_PLOGI:
	case RPORT_ST_LOGO:
		fc_rport_enter_delete(rdata, RPORT_EV_FAILED);
		break;
	case RPORT_ST_RTV:
		fc_rport_enter_ready(rdata);
		break;
	case RPORT_ST_PRLI:
	case RPORT_ST_ADISC:
		fc_rport_enter_logo(rdata);
		break;
	case RPORT_ST_DELETE:
	case RPORT_ST_RESTART:
	case RPORT_ST_READY:
	case RPORT_ST_INIT:
		break;
	}
}