Lines Matching refs:rpf
3016 bfa_port_speed_t rport_speed = rport->rpf.rpsc_speed; in bfa_fcs_rport_get_attr()
3033 rport_attr->curr_speed = rport->rpf.rpsc_speed; in bfa_fcs_rport_get_attr()
3034 rport_attr->assigned_speed = rport->rpf.assigned_speed; in bfa_fcs_rport_get_attr()
3127 static void bfa_fcs_rpf_sm_uninit(struct bfa_fcs_rpf_s *rpf,
3129 static void bfa_fcs_rpf_sm_rpsc_sending(struct bfa_fcs_rpf_s *rpf,
3131 static void bfa_fcs_rpf_sm_rpsc(struct bfa_fcs_rpf_s *rpf,
3133 static void bfa_fcs_rpf_sm_rpsc_retry(struct bfa_fcs_rpf_s *rpf,
3135 static void bfa_fcs_rpf_sm_offline(struct bfa_fcs_rpf_s *rpf,
3137 static void bfa_fcs_rpf_sm_online(struct bfa_fcs_rpf_s *rpf,
3141 bfa_fcs_rpf_sm_uninit(struct bfa_fcs_rpf_s *rpf, enum rpf_event event) in bfa_fcs_rpf_sm_uninit() argument
3143 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_sm_uninit()
3157 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_rpsc_sending); in bfa_fcs_rpf_sm_uninit()
3158 rpf->rpsc_retries = 0; in bfa_fcs_rpf_sm_uninit()
3159 bfa_fcs_rpf_send_rpsc2(rpf, NULL); in bfa_fcs_rpf_sm_uninit()
3172 bfa_fcs_rpf_sm_rpsc_sending(struct bfa_fcs_rpf_s *rpf, enum rpf_event event) in bfa_fcs_rpf_sm_rpsc_sending() argument
3174 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_sm_rpsc_sending()
3180 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_rpsc); in bfa_fcs_rpf_sm_rpsc_sending()
3184 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_offline); in bfa_fcs_rpf_sm_rpsc_sending()
3185 bfa_fcxp_walloc_cancel(rport->fcs->bfa, &rpf->fcxp_wqe); in bfa_fcs_rpf_sm_rpsc_sending()
3186 rpf->rpsc_retries = 0; in bfa_fcs_rpf_sm_rpsc_sending()
3195 bfa_fcs_rpf_sm_rpsc(struct bfa_fcs_rpf_s *rpf, enum rpf_event event) in bfa_fcs_rpf_sm_rpsc() argument
3197 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_sm_rpsc()
3204 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_online); in bfa_fcs_rpf_sm_rpsc()
3206 if (rpf->rpsc_speed != BFA_PORT_SPEED_UNKNOWN) in bfa_fcs_rpf_sm_rpsc()
3207 bfa_rport_speed(rport->bfa_rport, rpf->rpsc_speed); in bfa_fcs_rpf_sm_rpsc()
3208 else if (rpf->assigned_speed != BFA_PORT_SPEED_UNKNOWN) in bfa_fcs_rpf_sm_rpsc()
3209 bfa_rport_speed(rport->bfa_rport, rpf->assigned_speed); in bfa_fcs_rpf_sm_rpsc()
3214 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_online); in bfa_fcs_rpf_sm_rpsc()
3219 if (rpf->rpsc_retries++ < BFA_FCS_RPF_RETRIES) { in bfa_fcs_rpf_sm_rpsc()
3220 bfa_timer_start(rport->fcs->bfa, &rpf->timer, in bfa_fcs_rpf_sm_rpsc()
3221 bfa_fcs_rpf_timeout, rpf, in bfa_fcs_rpf_sm_rpsc()
3223 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_rpsc_retry); in bfa_fcs_rpf_sm_rpsc()
3225 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_online); in bfa_fcs_rpf_sm_rpsc()
3230 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_offline); in bfa_fcs_rpf_sm_rpsc()
3231 bfa_fcxp_discard(rpf->fcxp); in bfa_fcs_rpf_sm_rpsc()
3232 rpf->rpsc_retries = 0; in bfa_fcs_rpf_sm_rpsc()
3241 bfa_fcs_rpf_sm_rpsc_retry(struct bfa_fcs_rpf_s *rpf, enum rpf_event event) in bfa_fcs_rpf_sm_rpsc_retry() argument
3243 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_sm_rpsc_retry()
3251 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_rpsc_sending); in bfa_fcs_rpf_sm_rpsc_retry()
3252 bfa_fcs_rpf_send_rpsc2(rpf, NULL); in bfa_fcs_rpf_sm_rpsc_retry()
3256 bfa_timer_stop(&rpf->timer); in bfa_fcs_rpf_sm_rpsc_retry()
3257 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_offline); in bfa_fcs_rpf_sm_rpsc_retry()
3258 rpf->rpsc_retries = 0; in bfa_fcs_rpf_sm_rpsc_retry()
3267 bfa_fcs_rpf_sm_online(struct bfa_fcs_rpf_s *rpf, enum rpf_event event) in bfa_fcs_rpf_sm_online() argument
3269 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_sm_online()
3277 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_offline); in bfa_fcs_rpf_sm_online()
3278 rpf->rpsc_retries = 0; in bfa_fcs_rpf_sm_online()
3287 bfa_fcs_rpf_sm_offline(struct bfa_fcs_rpf_s *rpf, enum rpf_event event) in bfa_fcs_rpf_sm_offline() argument
3289 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_sm_offline()
3297 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_rpsc_sending); in bfa_fcs_rpf_sm_offline()
3298 bfa_fcs_rpf_send_rpsc2(rpf, NULL); in bfa_fcs_rpf_sm_offline()
3314 struct bfa_fcs_rpf_s *rpf = &rport->rpf; in bfa_fcs_rpf_init() local
3317 rpf->rport = rport; in bfa_fcs_rpf_init()
3319 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_uninit); in bfa_fcs_rpf_init()
3334 bfa_sm_send_event(&rport->rpf, RPFSM_EVENT_RPORT_ONLINE); in bfa_fcs_rpf_rport_online()
3348 rport->rpf.rpsc_speed = 0; in bfa_fcs_rpf_rport_offline()
3349 bfa_sm_send_event(&rport->rpf, RPFSM_EVENT_RPORT_OFFLINE); in bfa_fcs_rpf_rport_offline()
3355 struct bfa_fcs_rpf_s *rpf = (struct bfa_fcs_rpf_s *) arg; in bfa_fcs_rpf_timeout() local
3356 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_timeout()
3359 bfa_sm_send_event(rpf, RPFSM_EVENT_TIMEOUT); in bfa_fcs_rpf_timeout()
3365 struct bfa_fcs_rpf_s *rpf = (struct bfa_fcs_rpf_s *)rpf_cbarg; in bfa_fcs_rpf_send_rpsc2() local
3366 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_send_rpsc2()
3377 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &rpf->fcxp_wqe, in bfa_fcs_rpf_send_rpsc2()
3378 bfa_fcs_rpf_send_rpsc2, rpf, BFA_TRUE); in bfa_fcs_rpf_send_rpsc2()
3381 rpf->fcxp = fcxp; in bfa_fcs_rpf_send_rpsc2()
3388 rpf, FC_MAX_PDUSZ, FC_ELS_TOV); in bfa_fcs_rpf_send_rpsc2()
3390 bfa_sm_send_event(rpf, RPFSM_EVENT_FCXP_SENT); in bfa_fcs_rpf_send_rpsc2()
3399 struct bfa_fcs_rpf_s *rpf = (struct bfa_fcs_rpf_s *) cbarg; in bfa_fcs_rpf_rpsc2_response() local
3400 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_rpsc2_response()
3411 bfa_sm_send_event(rpf, RPFSM_EVENT_RPSC_ERROR); in bfa_fcs_rpf_rpsc2_response()
3433 bfa_sm_send_event(rpf, RPFSM_EVENT_RPSC_ERROR); in bfa_fcs_rpf_rpsc2_response()
3437 rpf->rpsc_speed = fc_rpsc_operspeed_to_bfa_speed( in bfa_fcs_rpf_rpsc2_response()
3440 bfa_sm_send_event(rpf, RPFSM_EVENT_RPSC_COMP); in bfa_fcs_rpf_rpsc2_response()
3448 bfa_sm_send_event(rpf, RPFSM_EVENT_RPSC_FAIL); in bfa_fcs_rpf_rpsc2_response()
3450 bfa_sm_send_event(rpf, RPFSM_EVENT_RPSC_ERROR); in bfa_fcs_rpf_rpsc2_response()