Lines Matching refs:rpf
3028 bfa_port_speed_t rport_speed = rport->rpf.rpsc_speed; in bfa_fcs_rport_get_attr()
3045 rport_attr->curr_speed = rport->rpf.rpsc_speed; in bfa_fcs_rport_get_attr()
3046 rport_attr->assigned_speed = rport->rpf.assigned_speed; in bfa_fcs_rport_get_attr()
3139 static void bfa_fcs_rpf_sm_uninit(struct bfa_fcs_rpf_s *rpf,
3141 static void bfa_fcs_rpf_sm_rpsc_sending(struct bfa_fcs_rpf_s *rpf,
3143 static void bfa_fcs_rpf_sm_rpsc(struct bfa_fcs_rpf_s *rpf,
3145 static void bfa_fcs_rpf_sm_rpsc_retry(struct bfa_fcs_rpf_s *rpf,
3147 static void bfa_fcs_rpf_sm_offline(struct bfa_fcs_rpf_s *rpf,
3149 static void bfa_fcs_rpf_sm_online(struct bfa_fcs_rpf_s *rpf,
3153 bfa_fcs_rpf_sm_uninit(struct bfa_fcs_rpf_s *rpf, enum rpf_event event) in bfa_fcs_rpf_sm_uninit() argument
3155 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_sm_uninit()
3169 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_rpsc_sending); in bfa_fcs_rpf_sm_uninit()
3170 rpf->rpsc_retries = 0; in bfa_fcs_rpf_sm_uninit()
3171 bfa_fcs_rpf_send_rpsc2(rpf, NULL); in bfa_fcs_rpf_sm_uninit()
3184 bfa_fcs_rpf_sm_rpsc_sending(struct bfa_fcs_rpf_s *rpf, enum rpf_event event) in bfa_fcs_rpf_sm_rpsc_sending() argument
3186 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_sm_rpsc_sending()
3192 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_rpsc); in bfa_fcs_rpf_sm_rpsc_sending()
3196 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_offline); in bfa_fcs_rpf_sm_rpsc_sending()
3197 bfa_fcxp_walloc_cancel(rport->fcs->bfa, &rpf->fcxp_wqe); in bfa_fcs_rpf_sm_rpsc_sending()
3198 rpf->rpsc_retries = 0; in bfa_fcs_rpf_sm_rpsc_sending()
3207 bfa_fcs_rpf_sm_rpsc(struct bfa_fcs_rpf_s *rpf, enum rpf_event event) in bfa_fcs_rpf_sm_rpsc() argument
3209 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_sm_rpsc()
3216 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_online); in bfa_fcs_rpf_sm_rpsc()
3218 if (rpf->rpsc_speed != BFA_PORT_SPEED_UNKNOWN) in bfa_fcs_rpf_sm_rpsc()
3219 bfa_rport_speed(rport->bfa_rport, rpf->rpsc_speed); in bfa_fcs_rpf_sm_rpsc()
3220 else if (rpf->assigned_speed != BFA_PORT_SPEED_UNKNOWN) in bfa_fcs_rpf_sm_rpsc()
3221 bfa_rport_speed(rport->bfa_rport, rpf->assigned_speed); in bfa_fcs_rpf_sm_rpsc()
3226 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_online); in bfa_fcs_rpf_sm_rpsc()
3231 if (rpf->rpsc_retries++ < BFA_FCS_RPF_RETRIES) { in bfa_fcs_rpf_sm_rpsc()
3232 bfa_timer_start(rport->fcs->bfa, &rpf->timer, in bfa_fcs_rpf_sm_rpsc()
3233 bfa_fcs_rpf_timeout, rpf, in bfa_fcs_rpf_sm_rpsc()
3235 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_rpsc_retry); in bfa_fcs_rpf_sm_rpsc()
3237 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_online); in bfa_fcs_rpf_sm_rpsc()
3242 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_offline); in bfa_fcs_rpf_sm_rpsc()
3243 bfa_fcxp_discard(rpf->fcxp); in bfa_fcs_rpf_sm_rpsc()
3244 rpf->rpsc_retries = 0; in bfa_fcs_rpf_sm_rpsc()
3253 bfa_fcs_rpf_sm_rpsc_retry(struct bfa_fcs_rpf_s *rpf, enum rpf_event event) in bfa_fcs_rpf_sm_rpsc_retry() argument
3255 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_sm_rpsc_retry()
3263 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_rpsc_sending); in bfa_fcs_rpf_sm_rpsc_retry()
3264 bfa_fcs_rpf_send_rpsc2(rpf, NULL); in bfa_fcs_rpf_sm_rpsc_retry()
3268 bfa_timer_stop(&rpf->timer); in bfa_fcs_rpf_sm_rpsc_retry()
3269 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_offline); in bfa_fcs_rpf_sm_rpsc_retry()
3270 rpf->rpsc_retries = 0; in bfa_fcs_rpf_sm_rpsc_retry()
3279 bfa_fcs_rpf_sm_online(struct bfa_fcs_rpf_s *rpf, enum rpf_event event) in bfa_fcs_rpf_sm_online() argument
3281 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_sm_online()
3289 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_offline); in bfa_fcs_rpf_sm_online()
3290 rpf->rpsc_retries = 0; in bfa_fcs_rpf_sm_online()
3299 bfa_fcs_rpf_sm_offline(struct bfa_fcs_rpf_s *rpf, enum rpf_event event) in bfa_fcs_rpf_sm_offline() argument
3301 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_sm_offline()
3309 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_rpsc_sending); in bfa_fcs_rpf_sm_offline()
3310 bfa_fcs_rpf_send_rpsc2(rpf, NULL); in bfa_fcs_rpf_sm_offline()
3326 struct bfa_fcs_rpf_s *rpf = &rport->rpf; in bfa_fcs_rpf_init() local
3329 rpf->rport = rport; in bfa_fcs_rpf_init()
3331 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_uninit); in bfa_fcs_rpf_init()
3346 bfa_sm_send_event(&rport->rpf, RPFSM_EVENT_RPORT_ONLINE); in bfa_fcs_rpf_rport_online()
3360 rport->rpf.rpsc_speed = 0; in bfa_fcs_rpf_rport_offline()
3361 bfa_sm_send_event(&rport->rpf, RPFSM_EVENT_RPORT_OFFLINE); in bfa_fcs_rpf_rport_offline()
3367 struct bfa_fcs_rpf_s *rpf = (struct bfa_fcs_rpf_s *) arg; in bfa_fcs_rpf_timeout() local
3368 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_timeout()
3371 bfa_sm_send_event(rpf, RPFSM_EVENT_TIMEOUT); in bfa_fcs_rpf_timeout()
3377 struct bfa_fcs_rpf_s *rpf = (struct bfa_fcs_rpf_s *)rpf_cbarg; in bfa_fcs_rpf_send_rpsc2() local
3378 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_send_rpsc2()
3389 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &rpf->fcxp_wqe, in bfa_fcs_rpf_send_rpsc2()
3390 bfa_fcs_rpf_send_rpsc2, rpf, BFA_TRUE); in bfa_fcs_rpf_send_rpsc2()
3393 rpf->fcxp = fcxp; in bfa_fcs_rpf_send_rpsc2()
3400 rpf, FC_MAX_PDUSZ, FC_ELS_TOV); in bfa_fcs_rpf_send_rpsc2()
3402 bfa_sm_send_event(rpf, RPFSM_EVENT_FCXP_SENT); in bfa_fcs_rpf_send_rpsc2()
3411 struct bfa_fcs_rpf_s *rpf = (struct bfa_fcs_rpf_s *) cbarg; in bfa_fcs_rpf_rpsc2_response() local
3412 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_rpsc2_response()
3423 bfa_sm_send_event(rpf, RPFSM_EVENT_RPSC_ERROR); in bfa_fcs_rpf_rpsc2_response()
3445 bfa_sm_send_event(rpf, RPFSM_EVENT_RPSC_ERROR); in bfa_fcs_rpf_rpsc2_response()
3449 rpf->rpsc_speed = fc_rpsc_operspeed_to_bfa_speed( in bfa_fcs_rpf_rpsc2_response()
3452 bfa_sm_send_event(rpf, RPFSM_EVENT_RPSC_COMP); in bfa_fcs_rpf_rpsc2_response()
3460 bfa_sm_send_event(rpf, RPFSM_EVENT_RPSC_FAIL); in bfa_fcs_rpf_rpsc2_response()
3462 bfa_sm_send_event(rpf, RPFSM_EVENT_RPSC_ERROR); in bfa_fcs_rpf_rpsc2_response()