Lines Matching refs:dport

5658 static void bfa_dport_sm_disabled(struct bfa_dport_s *dport,
5660 static void bfa_dport_sm_enabling_qwait(struct bfa_dport_s *dport,
5662 static void bfa_dport_sm_enabling(struct bfa_dport_s *dport,
5664 static void bfa_dport_sm_enabled(struct bfa_dport_s *dport,
5666 static void bfa_dport_sm_disabling_qwait(struct bfa_dport_s *dport,
5668 static void bfa_dport_sm_disabling(struct bfa_dport_s *dport,
5670 static void bfa_dport_sm_starting_qwait(struct bfa_dport_s *dport,
5672 static void bfa_dport_sm_starting(struct bfa_dport_s *dport,
5674 static void bfa_dport_sm_dynamic_disabling(struct bfa_dport_s *dport,
5676 static void bfa_dport_sm_dynamic_disabling_qwait(struct bfa_dport_s *dport,
5679 static void bfa_dport_req_comp(struct bfa_dport_s *dport,
5681 static void bfa_dport_scn(struct bfa_dport_s *dport,
5708 struct bfa_dport_s *dport = &fcdiag->dport; in bfa_fcdiag_attach() local
5713 dport->bfa = bfa; in bfa_fcdiag_attach()
5714 bfa_sm_set_state(dport, bfa_dport_sm_disabled); in bfa_fcdiag_attach()
5715 bfa_reqq_winit(&dport->reqq_wait, bfa_dport_qresume, dport); in bfa_fcdiag_attach()
5716 dport->cbfn = NULL; in bfa_fcdiag_attach()
5717 dport->cbarg = NULL; in bfa_fcdiag_attach()
5718 dport->test_state = BFA_DPORT_ST_DISABLED; in bfa_fcdiag_attach()
5719 memset(&dport->result, 0, sizeof(struct bfa_diag_dport_result_s)); in bfa_fcdiag_attach()
5726 struct bfa_dport_s *dport = &fcdiag->dport; in bfa_fcdiag_iocdisable() local
5736 bfa_sm_send_event(dport, BFA_DPORT_SM_HWFAIL); in bfa_fcdiag_iocdisable()
5907 bfa_dport_req_comp(&fcdiag->dport, in bfa_fcdiag_intr()
5911 bfa_dport_scn(&fcdiag->dport, in bfa_fcdiag_intr()
6124 static bfa_boolean_t bfa_dport_send_req(struct bfa_dport_s *dport,
6127 bfa_cb_fcdiag_dport(struct bfa_dport_s *dport, bfa_status_t bfa_status) in bfa_cb_fcdiag_dport() argument
6129 if (dport->cbfn != NULL) { in bfa_cb_fcdiag_dport()
6130 dport->cbfn(dport->cbarg, bfa_status); in bfa_cb_fcdiag_dport()
6131 dport->cbfn = NULL; in bfa_cb_fcdiag_dport()
6132 dport->cbarg = NULL; in bfa_cb_fcdiag_dport()
6137 bfa_dport_sm_disabled(struct bfa_dport_s *dport, enum bfa_dport_sm_event event) in bfa_dport_sm_disabled() argument
6139 bfa_trc(dport->bfa, event); in bfa_dport_sm_disabled()
6143 bfa_fcport_dportenable(dport->bfa); in bfa_dport_sm_disabled()
6144 if (bfa_dport_send_req(dport, BFI_DPORT_ENABLE)) in bfa_dport_sm_disabled()
6145 bfa_sm_set_state(dport, bfa_dport_sm_enabling); in bfa_dport_sm_disabled()
6147 bfa_sm_set_state(dport, bfa_dport_sm_enabling_qwait); in bfa_dport_sm_disabled()
6159 if (dport->i2hmsg.scn.state == BFI_DPORT_SCN_DDPORT_ENABLE) { in bfa_dport_sm_disabled()
6160 bfa_fcport_ddportenable(dport->bfa); in bfa_dport_sm_disabled()
6161 dport->dynamic = BFA_TRUE; in bfa_dport_sm_disabled()
6162 dport->test_state = BFA_DPORT_ST_NOTSTART; in bfa_dport_sm_disabled()
6163 bfa_sm_set_state(dport, bfa_dport_sm_enabled); in bfa_dport_sm_disabled()
6165 bfa_trc(dport->bfa, dport->i2hmsg.scn.state); in bfa_dport_sm_disabled()
6171 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_disabled()
6176 bfa_dport_sm_enabling_qwait(struct bfa_dport_s *dport, in bfa_dport_sm_enabling_qwait() argument
6179 bfa_trc(dport->bfa, event); in bfa_dport_sm_enabling_qwait()
6183 bfa_sm_set_state(dport, bfa_dport_sm_enabling); in bfa_dport_sm_enabling_qwait()
6184 bfa_dport_send_req(dport, BFI_DPORT_ENABLE); in bfa_dport_sm_enabling_qwait()
6188 bfa_reqq_wcancel(&dport->reqq_wait); in bfa_dport_sm_enabling_qwait()
6189 bfa_sm_set_state(dport, bfa_dport_sm_disabled); in bfa_dport_sm_enabling_qwait()
6190 bfa_cb_fcdiag_dport(dport, BFA_STATUS_FAILED); in bfa_dport_sm_enabling_qwait()
6194 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_enabling_qwait()
6199 bfa_dport_sm_enabling(struct bfa_dport_s *dport, enum bfa_dport_sm_event event) in bfa_dport_sm_enabling() argument
6201 bfa_trc(dport->bfa, event); in bfa_dport_sm_enabling()
6205 memset(&dport->result, 0, in bfa_dport_sm_enabling()
6207 if (dport->i2hmsg.rsp.status == BFA_STATUS_DPORT_INV_SFP) { in bfa_dport_sm_enabling()
6208 dport->test_state = BFA_DPORT_ST_NO_SFP; in bfa_dport_sm_enabling()
6210 dport->test_state = BFA_DPORT_ST_INP; in bfa_dport_sm_enabling()
6211 bfa_dport_result_start(dport, BFA_DPORT_OPMODE_AUTO); in bfa_dport_sm_enabling()
6213 bfa_sm_set_state(dport, bfa_dport_sm_enabled); in bfa_dport_sm_enabling()
6217 dport->test_state = BFA_DPORT_ST_DISABLED; in bfa_dport_sm_enabling()
6218 bfa_fcport_dportdisable(dport->bfa); in bfa_dport_sm_enabling()
6219 bfa_sm_set_state(dport, bfa_dport_sm_disabled); in bfa_dport_sm_enabling()
6223 bfa_sm_set_state(dport, bfa_dport_sm_disabled); in bfa_dport_sm_enabling()
6224 bfa_cb_fcdiag_dport(dport, BFA_STATUS_FAILED); in bfa_dport_sm_enabling()
6228 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_enabling()
6233 bfa_dport_sm_enabled(struct bfa_dport_s *dport, enum bfa_dport_sm_event event) in bfa_dport_sm_enabled() argument
6235 bfa_trc(dport->bfa, event); in bfa_dport_sm_enabled()
6239 if (bfa_dport_send_req(dport, BFI_DPORT_START)) in bfa_dport_sm_enabled()
6240 bfa_sm_set_state(dport, bfa_dport_sm_starting); in bfa_dport_sm_enabled()
6242 bfa_sm_set_state(dport, bfa_dport_sm_starting_qwait); in bfa_dport_sm_enabled()
6246 bfa_fcport_dportdisable(dport->bfa); in bfa_dport_sm_enabled()
6247 if (bfa_dport_send_req(dport, BFI_DPORT_DISABLE)) in bfa_dport_sm_enabled()
6248 bfa_sm_set_state(dport, bfa_dport_sm_disabling); in bfa_dport_sm_enabled()
6250 bfa_sm_set_state(dport, bfa_dport_sm_disabling_qwait); in bfa_dport_sm_enabled()
6254 bfa_sm_set_state(dport, bfa_dport_sm_disabled); in bfa_dport_sm_enabled()
6258 switch (dport->i2hmsg.scn.state) { in bfa_dport_sm_enabled()
6260 dport->test_state = BFA_DPORT_ST_COMP; in bfa_dport_sm_enabled()
6264 dport->test_state = BFA_DPORT_ST_INP; in bfa_dport_sm_enabled()
6273 dport->test_state = BFA_DPORT_ST_NO_SFP; in bfa_dport_sm_enabled()
6277 bfa_fcport_ddportdisable(dport->bfa); in bfa_dport_sm_enabled()
6279 if (bfa_dport_send_req(dport, BFI_DPORT_DYN_DISABLE)) in bfa_dport_sm_enabled()
6280 bfa_sm_set_state(dport, in bfa_dport_sm_enabled()
6283 bfa_sm_set_state(dport, in bfa_dport_sm_enabled()
6288 bfa_fcport_ddportdisable(dport->bfa); in bfa_dport_sm_enabled()
6290 bfa_sm_set_state(dport, bfa_dport_sm_disabled); in bfa_dport_sm_enabled()
6291 dport->dynamic = BFA_FALSE; in bfa_dport_sm_enabled()
6295 bfa_trc(dport->bfa, dport->i2hmsg.scn.state); in bfa_dport_sm_enabled()
6296 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_enabled()
6300 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_enabled()
6305 bfa_dport_sm_disabling_qwait(struct bfa_dport_s *dport, in bfa_dport_sm_disabling_qwait() argument
6308 bfa_trc(dport->bfa, event); in bfa_dport_sm_disabling_qwait()
6312 bfa_sm_set_state(dport, bfa_dport_sm_disabling); in bfa_dport_sm_disabling_qwait()
6313 bfa_dport_send_req(dport, BFI_DPORT_DISABLE); in bfa_dport_sm_disabling_qwait()
6317 bfa_sm_set_state(dport, bfa_dport_sm_disabled); in bfa_dport_sm_disabling_qwait()
6318 bfa_reqq_wcancel(&dport->reqq_wait); in bfa_dport_sm_disabling_qwait()
6319 bfa_cb_fcdiag_dport(dport, BFA_STATUS_OK); in bfa_dport_sm_disabling_qwait()
6327 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_disabling_qwait()
6332 bfa_dport_sm_disabling(struct bfa_dport_s *dport, enum bfa_dport_sm_event event) in bfa_dport_sm_disabling() argument
6334 bfa_trc(dport->bfa, event); in bfa_dport_sm_disabling()
6338 dport->test_state = BFA_DPORT_ST_DISABLED; in bfa_dport_sm_disabling()
6339 bfa_sm_set_state(dport, bfa_dport_sm_disabled); in bfa_dport_sm_disabling()
6343 bfa_sm_set_state(dport, bfa_dport_sm_disabled); in bfa_dport_sm_disabling()
6344 bfa_cb_fcdiag_dport(dport, BFA_STATUS_OK); in bfa_dport_sm_disabling()
6352 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_disabling()
6357 bfa_dport_sm_starting_qwait(struct bfa_dport_s *dport, in bfa_dport_sm_starting_qwait() argument
6360 bfa_trc(dport->bfa, event); in bfa_dport_sm_starting_qwait()
6364 bfa_sm_set_state(dport, bfa_dport_sm_starting); in bfa_dport_sm_starting_qwait()
6365 bfa_dport_send_req(dport, BFI_DPORT_START); in bfa_dport_sm_starting_qwait()
6369 bfa_reqq_wcancel(&dport->reqq_wait); in bfa_dport_sm_starting_qwait()
6370 bfa_sm_set_state(dport, bfa_dport_sm_disabled); in bfa_dport_sm_starting_qwait()
6371 bfa_cb_fcdiag_dport(dport, BFA_STATUS_FAILED); in bfa_dport_sm_starting_qwait()
6375 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_starting_qwait()
6380 bfa_dport_sm_starting(struct bfa_dport_s *dport, enum bfa_dport_sm_event event) in bfa_dport_sm_starting() argument
6382 bfa_trc(dport->bfa, event); in bfa_dport_sm_starting()
6386 memset(&dport->result, 0, in bfa_dport_sm_starting()
6388 if (dport->i2hmsg.rsp.status == BFA_STATUS_DPORT_INV_SFP) { in bfa_dport_sm_starting()
6389 dport->test_state = BFA_DPORT_ST_NO_SFP; in bfa_dport_sm_starting()
6391 dport->test_state = BFA_DPORT_ST_INP; in bfa_dport_sm_starting()
6392 bfa_dport_result_start(dport, BFA_DPORT_OPMODE_MANU); in bfa_dport_sm_starting()
6397 bfa_sm_set_state(dport, bfa_dport_sm_enabled); in bfa_dport_sm_starting()
6401 bfa_sm_set_state(dport, bfa_dport_sm_disabled); in bfa_dport_sm_starting()
6402 bfa_cb_fcdiag_dport(dport, BFA_STATUS_FAILED); in bfa_dport_sm_starting()
6406 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_starting()
6411 bfa_dport_sm_dynamic_disabling(struct bfa_dport_s *dport, in bfa_dport_sm_dynamic_disabling() argument
6414 bfa_trc(dport->bfa, event); in bfa_dport_sm_dynamic_disabling()
6418 switch (dport->i2hmsg.scn.state) { in bfa_dport_sm_dynamic_disabling()
6420 bfa_sm_set_state(dport, bfa_dport_sm_disabled); in bfa_dport_sm_dynamic_disabling()
6421 dport->dynamic = BFA_FALSE; in bfa_dport_sm_dynamic_disabling()
6422 bfa_fcport_enable(dport->bfa); in bfa_dport_sm_dynamic_disabling()
6426 bfa_trc(dport->bfa, dport->i2hmsg.scn.state); in bfa_dport_sm_dynamic_disabling()
6427 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_dynamic_disabling()
6433 bfa_sm_set_state(dport, bfa_dport_sm_disabled); in bfa_dport_sm_dynamic_disabling()
6434 bfa_cb_fcdiag_dport(dport, BFA_STATUS_OK); in bfa_dport_sm_dynamic_disabling()
6438 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_dynamic_disabling()
6443 bfa_dport_sm_dynamic_disabling_qwait(struct bfa_dport_s *dport, in bfa_dport_sm_dynamic_disabling_qwait() argument
6446 bfa_trc(dport->bfa, event); in bfa_dport_sm_dynamic_disabling_qwait()
6450 bfa_sm_set_state(dport, bfa_dport_sm_dynamic_disabling); in bfa_dport_sm_dynamic_disabling_qwait()
6451 bfa_dport_send_req(dport, BFI_DPORT_DYN_DISABLE); in bfa_dport_sm_dynamic_disabling_qwait()
6455 bfa_sm_set_state(dport, bfa_dport_sm_disabled); in bfa_dport_sm_dynamic_disabling_qwait()
6456 bfa_reqq_wcancel(&dport->reqq_wait); in bfa_dport_sm_dynamic_disabling_qwait()
6457 bfa_cb_fcdiag_dport(dport, BFA_STATUS_OK); in bfa_dport_sm_dynamic_disabling_qwait()
6465 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_dynamic_disabling_qwait()
6470 bfa_dport_send_req(struct bfa_dport_s *dport, enum bfi_dport_req req) in bfa_dport_send_req() argument
6477 m = bfa_reqq_next(dport->bfa, BFA_REQQ_DIAG); in bfa_dport_send_req()
6479 bfa_reqq_wait(dport->bfa, BFA_REQQ_PORT, &dport->reqq_wait); in bfa_dport_send_req()
6484 bfa_fn_lpu(dport->bfa)); in bfa_dport_send_req()
6487 m->lpcnt = cpu_to_be32(dport->lpcnt); in bfa_dport_send_req()
6488 m->payload = cpu_to_be32(dport->payload); in bfa_dport_send_req()
6494 bfa_reqq_produce(dport->bfa, BFA_REQQ_DIAG, m->mh); in bfa_dport_send_req()
6502 struct bfa_dport_s *dport = cbarg; in bfa_dport_qresume() local
6504 bfa_sm_send_event(dport, BFA_DPORT_SM_QRESUME); in bfa_dport_qresume()
6508 bfa_dport_req_comp(struct bfa_dport_s *dport, struct bfi_diag_dport_rsp_s *msg) in bfa_dport_req_comp() argument
6511 dport->i2hmsg.rsp.status = msg->status; in bfa_dport_req_comp()
6512 dport->rp_pwwn = msg->pwwn; in bfa_dport_req_comp()
6513 dport->rp_nwwn = msg->nwwn; in bfa_dport_req_comp()
6517 bfa_trc(dport->bfa, msg->status); in bfa_dport_req_comp()
6518 bfa_trc(dport->bfa, dport->rp_pwwn); in bfa_dport_req_comp()
6519 bfa_trc(dport->bfa, dport->rp_nwwn); in bfa_dport_req_comp()
6520 bfa_sm_send_event(dport, BFA_DPORT_SM_FWRSP); in bfa_dport_req_comp()
6523 bfa_trc(dport->bfa, msg->status); in bfa_dport_req_comp()
6524 bfa_sm_send_event(dport, BFA_DPORT_SM_REQFAIL); in bfa_dport_req_comp()
6526 bfa_cb_fcdiag_dport(dport, msg->status); in bfa_dport_req_comp()
6530 bfa_dport_is_sending_req(struct bfa_dport_s *dport) in bfa_dport_is_sending_req() argument
6532 if (bfa_sm_cmp_state(dport, bfa_dport_sm_enabling) || in bfa_dport_is_sending_req()
6533 bfa_sm_cmp_state(dport, bfa_dport_sm_enabling_qwait) || in bfa_dport_is_sending_req()
6534 bfa_sm_cmp_state(dport, bfa_dport_sm_disabling) || in bfa_dport_is_sending_req()
6535 bfa_sm_cmp_state(dport, bfa_dport_sm_disabling_qwait) || in bfa_dport_is_sending_req()
6536 bfa_sm_cmp_state(dport, bfa_dport_sm_starting) || in bfa_dport_is_sending_req()
6537 bfa_sm_cmp_state(dport, bfa_dport_sm_starting_qwait)) { in bfa_dport_is_sending_req()
6545 bfa_dport_scn(struct bfa_dport_s *dport, struct bfi_diag_dport_scn_s *msg) in bfa_dport_scn() argument
6550 bfa_trc(dport->bfa, msg->state); in bfa_dport_scn()
6551 dport->i2hmsg.scn.state = msg->state; in bfa_dport_scn()
6553 switch (dport->i2hmsg.scn.state) { in bfa_dport_scn()
6555 dport->result.end_time = ktime_get_real_seconds(); in bfa_dport_scn()
6556 bfa_trc(dport->bfa, dport->result.end_time); in bfa_dport_scn()
6558 dport->result.status = msg->info.testcomp.status; in bfa_dport_scn()
6559 bfa_trc(dport->bfa, dport->result.status); in bfa_dport_scn()
6561 dport->result.roundtrip_latency = in bfa_dport_scn()
6563 dport->result.est_cable_distance = in bfa_dport_scn()
6565 dport->result.buffer_required = in bfa_dport_scn()
6568 dport->result.frmsz = be16_to_cpu(msg->info.testcomp.frm_sz); in bfa_dport_scn()
6569 dport->result.speed = msg->info.testcomp.speed; in bfa_dport_scn()
6571 bfa_trc(dport->bfa, dport->result.roundtrip_latency); in bfa_dport_scn()
6572 bfa_trc(dport->bfa, dport->result.est_cable_distance); in bfa_dport_scn()
6573 bfa_trc(dport->bfa, dport->result.buffer_required); in bfa_dport_scn()
6574 bfa_trc(dport->bfa, dport->result.frmsz); in bfa_dport_scn()
6575 bfa_trc(dport->bfa, dport->result.speed); in bfa_dport_scn()
6578 dport->result.subtest[i].status = in bfa_dport_scn()
6580 bfa_trc(dport->bfa, dport->result.subtest[i].status); in bfa_dport_scn()
6586 memset(&dport->result, 0, in bfa_dport_scn()
6591 memset(&dport->result, 0, in bfa_dport_scn()
6593 dport->rp_pwwn = msg->info.teststart.pwwn; in bfa_dport_scn()
6594 dport->rp_nwwn = msg->info.teststart.nwwn; in bfa_dport_scn()
6595 dport->lpcnt = cpu_to_be32(msg->info.teststart.numfrm); in bfa_dport_scn()
6596 bfa_dport_result_start(dport, msg->info.teststart.mode); in bfa_dport_scn()
6601 dport->result.subtest[subtesttype].start_time = in bfa_dport_scn()
6603 dport->result.subtest[subtesttype].status = in bfa_dport_scn()
6606 bfa_trc(dport->bfa, subtesttype); in bfa_dport_scn()
6607 bfa_trc(dport->bfa, in bfa_dport_scn()
6608 dport->result.subtest[subtesttype].start_time); in bfa_dport_scn()
6615 dport->result.status = DPORT_TEST_ST_IDLE; in bfa_dport_scn()
6619 bfa_sm_fault(dport->bfa, msg->state); in bfa_dport_scn()
6622 bfa_sm_send_event(dport, BFA_DPORT_SM_SCN); in bfa_dport_scn()
6635 struct bfa_dport_s *dport = &fcdiag->dport; in bfa_dport_enable() local
6640 if (bfa_mfg_is_mezz(dport->bfa->ioc.attr->card_type)) { in bfa_dport_enable()
6641 bfa_trc(dport->bfa, BFA_STATUS_PBC); in bfa_dport_enable()
6648 if (!(bfa_asic_id_ct2(dport->bfa->ioc.pcidev.device_id))) { in bfa_dport_enable()
6649 bfa_trc(dport->bfa, dport->bfa->ioc.pcidev.device_id); in bfa_dport_enable()
6661 bfa_trc(dport->bfa, BFA_STATUS_PBC); in bfa_dport_enable()
6669 bfa_trc(dport->bfa, bfa_ioc_get_type(&bfa->ioc)); in bfa_dport_enable()
6678 bfa_trc(dport->bfa, 0); in bfa_dport_enable()
6686 bfa_trc(dport->bfa, 0); in bfa_dport_enable()
6694 bfa_trc(dport->bfa, 0); in bfa_dport_enable()
6703 bfa_trc(dport->bfa, 0); in bfa_dport_enable()
6710 if (dport->dynamic) in bfa_dport_enable()
6716 if (bfa_dport_is_sending_req(dport)) in bfa_dport_enable()
6722 if (bfa_sm_cmp_state(dport, bfa_dport_sm_enabled)) { in bfa_dport_enable()
6723 bfa_trc(dport->bfa, 0); in bfa_dport_enable()
6727 bfa_trc(dport->bfa, lpcnt); in bfa_dport_enable()
6728 bfa_trc(dport->bfa, pat); in bfa_dport_enable()
6729 dport->lpcnt = (lpcnt) ? lpcnt : DPORT_ENABLE_LOOPCNT_DEFAULT; in bfa_dport_enable()
6730 dport->payload = (pat) ? pat : LB_PATTERN_DEFAULT; in bfa_dport_enable()
6731 dport->cbfn = cbfn; in bfa_dport_enable()
6732 dport->cbarg = cbarg; in bfa_dport_enable()
6734 bfa_sm_send_event(dport, BFA_DPORT_SM_ENABLE); in bfa_dport_enable()
6747 struct bfa_dport_s *dport = &fcdiag->dport; in bfa_dport_disable() local
6754 bfa_trc(dport->bfa, BFA_STATUS_PBC); in bfa_dport_disable()
6761 if (dport->dynamic) { in bfa_dport_disable()
6770 bfa_trc(dport->bfa, 0); in bfa_dport_disable()
6777 if (bfa_dport_is_sending_req(dport)) in bfa_dport_disable()
6783 if (bfa_sm_cmp_state(dport, bfa_dport_sm_disabled)) { in bfa_dport_disable()
6784 bfa_trc(dport->bfa, 0); in bfa_dport_disable()
6788 dport->cbfn = cbfn; in bfa_dport_disable()
6789 dport->cbarg = cbarg; in bfa_dport_disable()
6791 bfa_sm_send_event(dport, BFA_DPORT_SM_DISABLE); in bfa_dport_disable()
6805 struct bfa_dport_s *dport = &fcdiag->dport; in bfa_dport_start() local
6816 if (dport->dynamic) in bfa_dport_start()
6822 if (bfa_dport_is_sending_req(dport)) in bfa_dport_start()
6829 if (!bfa_sm_cmp_state(dport, bfa_dport_sm_enabled)) { in bfa_dport_start()
6830 bfa_trc(dport->bfa, 0); in bfa_dport_start()
6834 if (dport->test_state == BFA_DPORT_ST_NO_SFP) in bfa_dport_start()
6837 if (dport->test_state == BFA_DPORT_ST_INP) in bfa_dport_start()
6840 WARN_ON(dport->test_state != BFA_DPORT_ST_COMP); in bfa_dport_start()
6843 bfa_trc(dport->bfa, lpcnt); in bfa_dport_start()
6844 bfa_trc(dport->bfa, pat); in bfa_dport_start()
6846 dport->lpcnt = (lpcnt) ? lpcnt : DPORT_ENABLE_LOOPCNT_DEFAULT; in bfa_dport_start()
6847 dport->payload = (pat) ? pat : LB_PATTERN_DEFAULT; in bfa_dport_start()
6849 dport->cbfn = cbfn; in bfa_dport_start()
6850 dport->cbarg = cbarg; in bfa_dport_start()
6852 bfa_sm_send_event(dport, BFA_DPORT_SM_START); in bfa_dport_start()
6865 struct bfa_dport_s *dport = &fcdiag->dport; in bfa_dport_show() local
6876 if (bfa_dport_is_sending_req(dport)) in bfa_dport_show()
6882 if (!bfa_sm_cmp_state(dport, bfa_dport_sm_enabled)) { in bfa_dport_show()
6883 bfa_trc(dport->bfa, 0); in bfa_dport_show()
6891 if (dport->test_state == BFA_DPORT_ST_NO_SFP) in bfa_dport_show()
6894 memcpy(result, &dport->result, sizeof(struct bfa_diag_dport_result_s)); in bfa_dport_show()