Lines Matching refs:rpf
3013 bfa_port_speed_t rport_speed = rport->rpf.rpsc_speed; in bfa_fcs_rport_get_attr()
3030 rport_attr->curr_speed = rport->rpf.rpsc_speed; in bfa_fcs_rport_get_attr()
3031 rport_attr->assigned_speed = rport->rpf.assigned_speed; in bfa_fcs_rport_get_attr()
3124 static void bfa_fcs_rpf_sm_uninit(struct bfa_fcs_rpf_s *rpf,
3126 static void bfa_fcs_rpf_sm_rpsc_sending(struct bfa_fcs_rpf_s *rpf,
3128 static void bfa_fcs_rpf_sm_rpsc(struct bfa_fcs_rpf_s *rpf,
3130 static void bfa_fcs_rpf_sm_rpsc_retry(struct bfa_fcs_rpf_s *rpf,
3132 static void bfa_fcs_rpf_sm_offline(struct bfa_fcs_rpf_s *rpf,
3134 static void bfa_fcs_rpf_sm_online(struct bfa_fcs_rpf_s *rpf,
3138 bfa_fcs_rpf_sm_uninit(struct bfa_fcs_rpf_s *rpf, enum rpf_event event) in bfa_fcs_rpf_sm_uninit() argument
3140 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_sm_uninit()
3154 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_rpsc_sending); in bfa_fcs_rpf_sm_uninit()
3155 rpf->rpsc_retries = 0; in bfa_fcs_rpf_sm_uninit()
3156 bfa_fcs_rpf_send_rpsc2(rpf, NULL); in bfa_fcs_rpf_sm_uninit()
3169 bfa_fcs_rpf_sm_rpsc_sending(struct bfa_fcs_rpf_s *rpf, enum rpf_event event) in bfa_fcs_rpf_sm_rpsc_sending() argument
3171 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_sm_rpsc_sending()
3177 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_rpsc); in bfa_fcs_rpf_sm_rpsc_sending()
3181 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_offline); in bfa_fcs_rpf_sm_rpsc_sending()
3182 bfa_fcxp_walloc_cancel(rport->fcs->bfa, &rpf->fcxp_wqe); in bfa_fcs_rpf_sm_rpsc_sending()
3183 rpf->rpsc_retries = 0; in bfa_fcs_rpf_sm_rpsc_sending()
3192 bfa_fcs_rpf_sm_rpsc(struct bfa_fcs_rpf_s *rpf, enum rpf_event event) in bfa_fcs_rpf_sm_rpsc() argument
3194 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_sm_rpsc()
3201 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_online); in bfa_fcs_rpf_sm_rpsc()
3203 if (rpf->rpsc_speed != BFA_PORT_SPEED_UNKNOWN) in bfa_fcs_rpf_sm_rpsc()
3204 bfa_rport_speed(rport->bfa_rport, rpf->rpsc_speed); in bfa_fcs_rpf_sm_rpsc()
3205 else if (rpf->assigned_speed != BFA_PORT_SPEED_UNKNOWN) in bfa_fcs_rpf_sm_rpsc()
3206 bfa_rport_speed(rport->bfa_rport, rpf->assigned_speed); in bfa_fcs_rpf_sm_rpsc()
3211 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_online); in bfa_fcs_rpf_sm_rpsc()
3216 if (rpf->rpsc_retries++ < BFA_FCS_RPF_RETRIES) { in bfa_fcs_rpf_sm_rpsc()
3217 bfa_timer_start(rport->fcs->bfa, &rpf->timer, in bfa_fcs_rpf_sm_rpsc()
3218 bfa_fcs_rpf_timeout, rpf, in bfa_fcs_rpf_sm_rpsc()
3220 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_rpsc_retry); in bfa_fcs_rpf_sm_rpsc()
3222 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_online); in bfa_fcs_rpf_sm_rpsc()
3227 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_offline); in bfa_fcs_rpf_sm_rpsc()
3228 bfa_fcxp_discard(rpf->fcxp); in bfa_fcs_rpf_sm_rpsc()
3229 rpf->rpsc_retries = 0; in bfa_fcs_rpf_sm_rpsc()
3238 bfa_fcs_rpf_sm_rpsc_retry(struct bfa_fcs_rpf_s *rpf, enum rpf_event event) in bfa_fcs_rpf_sm_rpsc_retry() argument
3240 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_sm_rpsc_retry()
3248 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_rpsc_sending); in bfa_fcs_rpf_sm_rpsc_retry()
3249 bfa_fcs_rpf_send_rpsc2(rpf, NULL); in bfa_fcs_rpf_sm_rpsc_retry()
3253 bfa_timer_stop(&rpf->timer); in bfa_fcs_rpf_sm_rpsc_retry()
3254 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_offline); in bfa_fcs_rpf_sm_rpsc_retry()
3255 rpf->rpsc_retries = 0; in bfa_fcs_rpf_sm_rpsc_retry()
3264 bfa_fcs_rpf_sm_online(struct bfa_fcs_rpf_s *rpf, enum rpf_event event) in bfa_fcs_rpf_sm_online() argument
3266 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_sm_online()
3274 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_offline); in bfa_fcs_rpf_sm_online()
3275 rpf->rpsc_retries = 0; in bfa_fcs_rpf_sm_online()
3284 bfa_fcs_rpf_sm_offline(struct bfa_fcs_rpf_s *rpf, enum rpf_event event) in bfa_fcs_rpf_sm_offline() argument
3286 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_sm_offline()
3294 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_rpsc_sending); in bfa_fcs_rpf_sm_offline()
3295 bfa_fcs_rpf_send_rpsc2(rpf, NULL); in bfa_fcs_rpf_sm_offline()
3311 struct bfa_fcs_rpf_s *rpf = &rport->rpf; in bfa_fcs_rpf_init() local
3314 rpf->rport = rport; in bfa_fcs_rpf_init()
3316 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_uninit); in bfa_fcs_rpf_init()
3331 bfa_sm_send_event(&rport->rpf, RPFSM_EVENT_RPORT_ONLINE); in bfa_fcs_rpf_rport_online()
3345 rport->rpf.rpsc_speed = 0; in bfa_fcs_rpf_rport_offline()
3346 bfa_sm_send_event(&rport->rpf, RPFSM_EVENT_RPORT_OFFLINE); in bfa_fcs_rpf_rport_offline()
3352 struct bfa_fcs_rpf_s *rpf = (struct bfa_fcs_rpf_s *) arg; in bfa_fcs_rpf_timeout() local
3353 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_timeout()
3356 bfa_sm_send_event(rpf, RPFSM_EVENT_TIMEOUT); in bfa_fcs_rpf_timeout()
3362 struct bfa_fcs_rpf_s *rpf = (struct bfa_fcs_rpf_s *)rpf_cbarg; in bfa_fcs_rpf_send_rpsc2() local
3363 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_send_rpsc2()
3374 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &rpf->fcxp_wqe, in bfa_fcs_rpf_send_rpsc2()
3375 bfa_fcs_rpf_send_rpsc2, rpf, BFA_TRUE); in bfa_fcs_rpf_send_rpsc2()
3378 rpf->fcxp = fcxp; in bfa_fcs_rpf_send_rpsc2()
3385 rpf, FC_MAX_PDUSZ, FC_ELS_TOV); in bfa_fcs_rpf_send_rpsc2()
3387 bfa_sm_send_event(rpf, RPFSM_EVENT_FCXP_SENT); in bfa_fcs_rpf_send_rpsc2()
3396 struct bfa_fcs_rpf_s *rpf = (struct bfa_fcs_rpf_s *) cbarg; in bfa_fcs_rpf_rpsc2_response() local
3397 struct bfa_fcs_rport_s *rport = rpf->rport; in bfa_fcs_rpf_rpsc2_response()
3408 bfa_sm_send_event(rpf, RPFSM_EVENT_RPSC_ERROR); in bfa_fcs_rpf_rpsc2_response()
3430 bfa_sm_send_event(rpf, RPFSM_EVENT_RPSC_ERROR); in bfa_fcs_rpf_rpsc2_response()
3434 rpf->rpsc_speed = fc_rpsc_operspeed_to_bfa_speed( in bfa_fcs_rpf_rpsc2_response()
3437 bfa_sm_send_event(rpf, RPFSM_EVENT_RPSC_COMP); in bfa_fcs_rpf_rpsc2_response()
3445 bfa_sm_send_event(rpf, RPFSM_EVENT_RPSC_FAIL); in bfa_fcs_rpf_rpsc2_response()
3447 bfa_sm_send_event(rpf, RPFSM_EVENT_RPSC_ERROR); in bfa_fcs_rpf_rpsc2_response()