Lines Matching refs:fcdiag
25 BFA_MODULE(fcdiag);
5661 bfa_fcdiag_set_busy_status(struct bfa_fcdiag_s *fcdiag) in bfa_fcdiag_set_busy_status() argument
5663 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(fcdiag->bfa); in bfa_fcdiag_set_busy_status()
5665 if (fcdiag->lb.lock) in bfa_fcdiag_set_busy_status()
5681 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); in bfa_fcdiag_attach() local
5682 struct bfa_dport_s *dport = &fcdiag->dport; in bfa_fcdiag_attach()
5684 fcdiag->bfa = bfa; in bfa_fcdiag_attach()
5685 fcdiag->trcmod = bfa->trcmod; in bfa_fcdiag_attach()
5697 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); in bfa_fcdiag_iocdisable() local
5698 struct bfa_dport_s *dport = &fcdiag->dport; in bfa_fcdiag_iocdisable()
5700 bfa_trc(fcdiag, fcdiag->lb.lock); in bfa_fcdiag_iocdisable()
5701 if (fcdiag->lb.lock) { in bfa_fcdiag_iocdisable()
5702 fcdiag->lb.status = BFA_STATUS_IOC_FAILURE; in bfa_fcdiag_iocdisable()
5703 fcdiag->lb.cbfn(fcdiag->lb.cbarg, fcdiag->lb.status); in bfa_fcdiag_iocdisable()
5704 fcdiag->lb.lock = 0; in bfa_fcdiag_iocdisable()
5705 bfa_fcdiag_set_busy_status(fcdiag); in bfa_fcdiag_iocdisable()
5729 struct bfa_fcdiag_s *fcdiag = cbarg; in bfa_fcdiag_queuetest_timeout() local
5730 struct bfa_diag_qtest_result_s *res = fcdiag->qtest.result; in bfa_fcdiag_queuetest_timeout()
5732 bfa_trc(fcdiag, fcdiag->qtest.all); in bfa_fcdiag_queuetest_timeout()
5733 bfa_trc(fcdiag, fcdiag->qtest.count); in bfa_fcdiag_queuetest_timeout()
5735 fcdiag->qtest.timer_active = 0; in bfa_fcdiag_queuetest_timeout()
5738 res->count = QTEST_CNT_DEFAULT - fcdiag->qtest.count; in bfa_fcdiag_queuetest_timeout()
5739 if (fcdiag->qtest.all) in bfa_fcdiag_queuetest_timeout()
5740 res->queue = fcdiag->qtest.all; in bfa_fcdiag_queuetest_timeout()
5742 bfa_trc(fcdiag, BFA_STATUS_ETIMER); in bfa_fcdiag_queuetest_timeout()
5743 fcdiag->qtest.status = BFA_STATUS_ETIMER; in bfa_fcdiag_queuetest_timeout()
5744 fcdiag->qtest.cbfn(fcdiag->qtest.cbarg, fcdiag->qtest.status); in bfa_fcdiag_queuetest_timeout()
5745 fcdiag->qtest.lock = 0; in bfa_fcdiag_queuetest_timeout()
5749 bfa_fcdiag_queuetest_send(struct bfa_fcdiag_s *fcdiag) in bfa_fcdiag_queuetest_send() argument
5754 req = bfa_reqq_next(fcdiag->bfa, fcdiag->qtest.queue); in bfa_fcdiag_queuetest_send()
5760 bfa_fn_lpu(fcdiag->bfa)); in bfa_fcdiag_queuetest_send()
5765 bfa_trc(fcdiag, fcdiag->qtest.queue); in bfa_fcdiag_queuetest_send()
5767 bfa_reqq_produce(fcdiag->bfa, fcdiag->qtest.queue, req->mh); in bfa_fcdiag_queuetest_send()
5772 bfa_fcdiag_queuetest_comp(struct bfa_fcdiag_s *fcdiag, in bfa_fcdiag_queuetest_comp() argument
5775 struct bfa_diag_qtest_result_s *res = fcdiag->qtest.result; in bfa_fcdiag_queuetest_comp()
5780 if (!fcdiag->qtest.timer_active) { in bfa_fcdiag_queuetest_comp()
5781 bfa_trc(fcdiag, fcdiag->qtest.timer_active); in bfa_fcdiag_queuetest_comp()
5786 fcdiag->qtest.count--; in bfa_fcdiag_queuetest_comp()
5797 if (fcdiag->qtest.count > 0) { in bfa_fcdiag_queuetest_comp()
5798 status = bfa_fcdiag_queuetest_send(fcdiag); in bfa_fcdiag_queuetest_comp()
5803 } else if (fcdiag->qtest.all > 0 && in bfa_fcdiag_queuetest_comp()
5804 fcdiag->qtest.queue < (BFI_IOC_MAX_CQS - 1)) { in bfa_fcdiag_queuetest_comp()
5805 fcdiag->qtest.count = QTEST_CNT_DEFAULT; in bfa_fcdiag_queuetest_comp()
5806 fcdiag->qtest.queue++; in bfa_fcdiag_queuetest_comp()
5807 status = bfa_fcdiag_queuetest_send(fcdiag); in bfa_fcdiag_queuetest_comp()
5816 if (fcdiag->qtest.timer_active) { in bfa_fcdiag_queuetest_comp()
5817 bfa_timer_stop(&fcdiag->qtest.timer); in bfa_fcdiag_queuetest_comp()
5818 fcdiag->qtest.timer_active = 0; in bfa_fcdiag_queuetest_comp()
5820 res->queue = fcdiag->qtest.queue; in bfa_fcdiag_queuetest_comp()
5821 res->count = QTEST_CNT_DEFAULT - fcdiag->qtest.count; in bfa_fcdiag_queuetest_comp()
5822 bfa_trc(fcdiag, res->count); in bfa_fcdiag_queuetest_comp()
5823 bfa_trc(fcdiag, res->status); in bfa_fcdiag_queuetest_comp()
5824 fcdiag->qtest.status = res->status; in bfa_fcdiag_queuetest_comp()
5825 fcdiag->qtest.cbfn(fcdiag->qtest.cbarg, fcdiag->qtest.status); in bfa_fcdiag_queuetest_comp()
5826 fcdiag->qtest.lock = 0; in bfa_fcdiag_queuetest_comp()
5830 bfa_fcdiag_loopback_comp(struct bfa_fcdiag_s *fcdiag, in bfa_fcdiag_loopback_comp() argument
5833 struct bfa_diag_loopback_result_s *res = fcdiag->lb.result; in bfa_fcdiag_loopback_comp()
5841 fcdiag->lb.status = rsp->res.status; in bfa_fcdiag_loopback_comp()
5842 bfa_trc(fcdiag, fcdiag->lb.status); in bfa_fcdiag_loopback_comp()
5843 fcdiag->lb.cbfn(fcdiag->lb.cbarg, fcdiag->lb.status); in bfa_fcdiag_loopback_comp()
5844 fcdiag->lb.lock = 0; in bfa_fcdiag_loopback_comp()
5845 bfa_fcdiag_set_busy_status(fcdiag); in bfa_fcdiag_loopback_comp()
5849 bfa_fcdiag_loopback_send(struct bfa_fcdiag_s *fcdiag, in bfa_fcdiag_loopback_send() argument
5854 lb_req = bfa_reqq_next(fcdiag->bfa, BFA_REQQ_DIAG); in bfa_fcdiag_loopback_send()
5860 bfa_fn_lpu(fcdiag->bfa)); in bfa_fcdiag_loopback_send()
5868 bfa_reqq_produce(fcdiag->bfa, BFA_REQQ_DIAG, lb_req->mh); in bfa_fcdiag_loopback_send()
5870 bfa_trc(fcdiag, loopback->lb_mode); in bfa_fcdiag_loopback_send()
5871 bfa_trc(fcdiag, loopback->speed); in bfa_fcdiag_loopback_send()
5872 bfa_trc(fcdiag, loopback->loopcnt); in bfa_fcdiag_loopback_send()
5873 bfa_trc(fcdiag, loopback->pattern); in bfa_fcdiag_loopback_send()
5883 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); in bfa_fcdiag_intr() local
5887 bfa_fcdiag_loopback_comp(fcdiag, in bfa_fcdiag_intr()
5891 bfa_fcdiag_queuetest_comp(fcdiag, (bfi_diag_qtest_rsp_t *)msg); in bfa_fcdiag_intr()
5894 bfa_dport_req_comp(&fcdiag->dport, (bfi_diag_dport_rsp_t *)msg); in bfa_fcdiag_intr()
5897 bfa_trc(fcdiag, msg->mhdr.msg_id); in bfa_fcdiag_intr()
5925 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); in bfa_fcdiag_loopback() local
5932 bfa_trc(fcdiag, BFA_STATUS_PBC); in bfa_fcdiag_loopback()
5937 bfa_trc(fcdiag, opmode); in bfa_fcdiag_loopback()
5951 bfa_trc(fcdiag, speed); in bfa_fcdiag_loopback()
5955 bfa_trc(fcdiag, attr.speed_supported); in bfa_fcdiag_loopback()
5960 bfa_trc(fcdiag, speed); in bfa_fcdiag_loopback()
5970 bfa_trc(fcdiag, speed); in bfa_fcdiag_loopback()
5991 if (fcdiag->lb.lock) { in bfa_fcdiag_loopback()
5992 bfa_trc(fcdiag, fcdiag->lb.lock); in bfa_fcdiag_loopback()
5996 fcdiag->lb.lock = 1; in bfa_fcdiag_loopback()
6001 fcdiag->lb.result = result; in bfa_fcdiag_loopback()
6002 fcdiag->lb.cbfn = cbfn; in bfa_fcdiag_loopback()
6003 fcdiag->lb.cbarg = cbarg; in bfa_fcdiag_loopback()
6005 bfa_fcdiag_set_busy_status(fcdiag); in bfa_fcdiag_loopback()
6008 status = bfa_fcdiag_loopback_send(fcdiag, &loopback); in bfa_fcdiag_loopback()
6029 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); in bfa_fcdiag_queuetest() local
6031 bfa_trc(fcdiag, force); in bfa_fcdiag_queuetest()
6032 bfa_trc(fcdiag, queue); in bfa_fcdiag_queuetest()
6038 if (fcdiag->qtest.lock) { in bfa_fcdiag_queuetest()
6039 bfa_trc(fcdiag, fcdiag->qtest.lock); in bfa_fcdiag_queuetest()
6044 fcdiag->qtest.lock = 1; in bfa_fcdiag_queuetest()
6045 fcdiag->qtest.cbfn = cbfn; in bfa_fcdiag_queuetest()
6046 fcdiag->qtest.cbarg = cbarg; in bfa_fcdiag_queuetest()
6047 fcdiag->qtest.result = result; in bfa_fcdiag_queuetest()
6048 fcdiag->qtest.count = QTEST_CNT_DEFAULT; in bfa_fcdiag_queuetest()
6051 fcdiag->qtest.result->status = BFA_STATUS_OK; in bfa_fcdiag_queuetest()
6052 fcdiag->qtest.result->count = 0; in bfa_fcdiag_queuetest()
6056 fcdiag->qtest.result->queue = (u8)queue; in bfa_fcdiag_queuetest()
6057 fcdiag->qtest.queue = (u8)queue; in bfa_fcdiag_queuetest()
6058 fcdiag->qtest.all = 0; in bfa_fcdiag_queuetest()
6060 fcdiag->qtest.result->queue = 0; in bfa_fcdiag_queuetest()
6061 fcdiag->qtest.queue = 0; in bfa_fcdiag_queuetest()
6062 fcdiag->qtest.all = 1; in bfa_fcdiag_queuetest()
6064 status = bfa_fcdiag_queuetest_send(fcdiag); in bfa_fcdiag_queuetest()
6068 bfa_timer_start(bfa, &fcdiag->qtest.timer, in bfa_fcdiag_queuetest()
6069 bfa_fcdiag_queuetest_timeout, fcdiag, in bfa_fcdiag_queuetest()
6071 fcdiag->qtest.timer_active = 1; in bfa_fcdiag_queuetest()
6086 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); in bfa_fcdiag_lb_is_running() local
6087 return fcdiag->lb.lock ? BFA_STATUS_DIAG_BUSY : BFA_STATUS_OK; in bfa_fcdiag_lb_is_running()
6302 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); in bfa_dport_enable() local
6303 struct bfa_dport_s *dport = &fcdiag->dport; in bfa_dport_enable()
6392 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); in bfa_dport_disable() local
6393 struct bfa_dport_s *dport = &fcdiag->dport; in bfa_dport_disable()
6446 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); in bfa_dport_get_state() local
6447 struct bfa_dport_s *dport = &fcdiag->dport; in bfa_dport_get_state()