static void bfa_fcs_port_ms_sm_gfn_retry(struct bfa_fcs_port_ms_s *ms, enum port_ms_event event) { bfa_trc(ms->port->fcs, ms->port->port_cfg.pwwn); bfa_trc(ms->port->fcs, event); switch (event) { case MSSM_EVENT_TIMEOUT: /* * Retry Timer Expired. Re-send */ bfa_sm_set_state(ms, bfa_fcs_port_ms_sm_gfn_sending); bfa_fcs_port_ms_send_gfn(ms, NULL); break; case MSSM_EVENT_PORT_OFFLINE: bfa_sm_set_state(ms, bfa_fcs_port_ms_sm_offline); bfa_timer_stop(&ms->timer); break; default: bfa_sm_fault(ms->port->fcs, event); } }
static void bfa_fcs_port_ms_sm_online(struct bfa_fcs_port_ms_s *ms, enum port_ms_event event) { bfa_trc(ms->port->fcs, ms->port->port_cfg.pwwn); bfa_trc(ms->port->fcs, event); switch (event) { case MSSM_EVENT_PORT_OFFLINE: bfa_sm_set_state(ms, bfa_fcs_port_ms_sm_offline); /* * now invoke MS related sub-modules */ bfa_fcs_port_fdmi_offline(ms); break; case MSSM_EVENT_PORT_FABRIC_RSCN: bfa_sm_set_state(ms, bfa_fcs_port_ms_sm_gfn_sending); ms->retry_cnt = 0; bfa_fcs_port_ms_send_gfn(ms, NULL); break; default: bfa_assert(0); } }
static void bfa_fcs_port_ms_sm_gmal(struct bfa_fcs_port_ms_s *ms, enum port_ms_event event) { bfa_trc(ms->port->fcs, ms->port->port_cfg.pwwn); bfa_trc(ms->port->fcs, event); switch (event) { case MSSM_EVENT_RSP_ERROR: /* * Start timer for a delayed retry */ if (ms->retry_cnt++ < BFA_FCS_MS_CMD_MAX_RETRIES) { bfa_sm_set_state(ms, bfa_fcs_port_ms_sm_gmal_retry); ms->port->stats.ms_retries++; bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(ms->port), &ms->timer, bfa_fcs_port_ms_timeout, ms, BFA_FCS_RETRY_TIMEOUT); } else { bfa_sm_set_state(ms, bfa_fcs_port_ms_sm_gfn_sending); bfa_fcs_port_ms_send_gfn(ms, NULL); ms->retry_cnt = 0; } break; case MSSM_EVENT_RSP_OK: bfa_sm_set_state(ms, bfa_fcs_port_ms_sm_gfn_sending); bfa_fcs_port_ms_send_gfn(ms, NULL); break; case MSSM_EVENT_PORT_OFFLINE: bfa_sm_set_state(ms, bfa_fcs_port_ms_sm_offline); bfa_fcxp_discard(ms->fcxp); break; default: bfa_sm_fault(ms->port->fcs, event); } }
static void bfa_fcs_port_ms_sm_online(struct bfa_fcs_port_ms_s *ms, enum port_ms_event event) { bfa_trc(ms->port->fcs, ms->port->port_cfg.pwwn); bfa_trc(ms->port->fcs, event); switch (event) { case MSSM_EVENT_PORT_OFFLINE: bfa_sm_set_state(ms, bfa_fcs_port_ms_sm_offline); break; case MSSM_EVENT_PORT_FABRIC_RSCN: bfa_sm_set_state(ms, bfa_fcs_port_ms_sm_gfn_sending); ms->retry_cnt = 0; bfa_fcs_port_ms_send_gfn(ms, NULL); break; default: bfa_sm_fault(ms->port->fcs, event); } }