fcdiag 25 drivers/scsi/bfa/bfa_modules.h struct bfa_fcdiag_s fcdiag; /* fcdiag module */ fcdiag 5702 drivers/scsi/bfa/bfa_svc.c bfa_fcdiag_set_busy_status(struct bfa_fcdiag_s *fcdiag) fcdiag 5704 drivers/scsi/bfa/bfa_svc.c struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(fcdiag->bfa); fcdiag 5706 drivers/scsi/bfa/bfa_svc.c if (fcdiag->lb.lock) fcdiag 5716 drivers/scsi/bfa/bfa_svc.c struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); fcdiag 5717 drivers/scsi/bfa/bfa_svc.c struct bfa_dport_s *dport = &fcdiag->dport; fcdiag 5719 drivers/scsi/bfa/bfa_svc.c fcdiag->bfa = bfa; fcdiag 5720 drivers/scsi/bfa/bfa_svc.c fcdiag->trcmod = bfa->trcmod; fcdiag 5734 drivers/scsi/bfa/bfa_svc.c struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); fcdiag 5735 drivers/scsi/bfa/bfa_svc.c struct bfa_dport_s *dport = &fcdiag->dport; fcdiag 5737 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, fcdiag->lb.lock); fcdiag 5738 drivers/scsi/bfa/bfa_svc.c if (fcdiag->lb.lock) { fcdiag 5739 drivers/scsi/bfa/bfa_svc.c fcdiag->lb.status = BFA_STATUS_IOC_FAILURE; fcdiag 5740 drivers/scsi/bfa/bfa_svc.c fcdiag->lb.cbfn(fcdiag->lb.cbarg, fcdiag->lb.status); fcdiag 5741 drivers/scsi/bfa/bfa_svc.c fcdiag->lb.lock = 0; fcdiag 5742 drivers/scsi/bfa/bfa_svc.c bfa_fcdiag_set_busy_status(fcdiag); fcdiag 5751 drivers/scsi/bfa/bfa_svc.c struct bfa_fcdiag_s *fcdiag = cbarg; fcdiag 5752 drivers/scsi/bfa/bfa_svc.c struct bfa_diag_qtest_result_s *res = fcdiag->qtest.result; fcdiag 5754 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, fcdiag->qtest.all); fcdiag 5755 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, fcdiag->qtest.count); fcdiag 5757 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.timer_active = 0; fcdiag 5760 drivers/scsi/bfa/bfa_svc.c res->count = QTEST_CNT_DEFAULT - fcdiag->qtest.count; fcdiag 5761 drivers/scsi/bfa/bfa_svc.c if (fcdiag->qtest.all) fcdiag 5762 drivers/scsi/bfa/bfa_svc.c res->queue = fcdiag->qtest.all; fcdiag 5764 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, BFA_STATUS_ETIMER); fcdiag 5765 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.status = BFA_STATUS_ETIMER; fcdiag 5766 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.cbfn(fcdiag->qtest.cbarg, fcdiag->qtest.status); fcdiag 5767 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.lock = 0; fcdiag 5771 drivers/scsi/bfa/bfa_svc.c bfa_fcdiag_queuetest_send(struct bfa_fcdiag_s *fcdiag) fcdiag 5776 drivers/scsi/bfa/bfa_svc.c req = bfa_reqq_next(fcdiag->bfa, fcdiag->qtest.queue); fcdiag 5782 drivers/scsi/bfa/bfa_svc.c bfa_fn_lpu(fcdiag->bfa)); fcdiag 5787 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, fcdiag->qtest.queue); fcdiag 5789 drivers/scsi/bfa/bfa_svc.c bfa_reqq_produce(fcdiag->bfa, fcdiag->qtest.queue, req->mh); fcdiag 5794 drivers/scsi/bfa/bfa_svc.c bfa_fcdiag_queuetest_comp(struct bfa_fcdiag_s *fcdiag, fcdiag 5797 drivers/scsi/bfa/bfa_svc.c struct bfa_diag_qtest_result_s *res = fcdiag->qtest.result; fcdiag 5802 drivers/scsi/bfa/bfa_svc.c if (!fcdiag->qtest.timer_active) { fcdiag 5803 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, fcdiag->qtest.timer_active); fcdiag 5808 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.count--; fcdiag 5819 drivers/scsi/bfa/bfa_svc.c if (fcdiag->qtest.count > 0) { fcdiag 5820 drivers/scsi/bfa/bfa_svc.c status = bfa_fcdiag_queuetest_send(fcdiag); fcdiag 5825 drivers/scsi/bfa/bfa_svc.c } else if (fcdiag->qtest.all > 0 && fcdiag 5826 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.queue < (BFI_IOC_MAX_CQS - 1)) { fcdiag 5827 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.count = QTEST_CNT_DEFAULT; fcdiag 5828 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.queue++; fcdiag 5829 drivers/scsi/bfa/bfa_svc.c status = bfa_fcdiag_queuetest_send(fcdiag); fcdiag 5838 drivers/scsi/bfa/bfa_svc.c if (fcdiag->qtest.timer_active) { fcdiag 5839 drivers/scsi/bfa/bfa_svc.c bfa_timer_stop(&fcdiag->qtest.timer); fcdiag 5840 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.timer_active = 0; fcdiag 5842 drivers/scsi/bfa/bfa_svc.c res->queue = fcdiag->qtest.queue; fcdiag 5843 drivers/scsi/bfa/bfa_svc.c res->count = QTEST_CNT_DEFAULT - fcdiag->qtest.count; fcdiag 5844 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, res->count); fcdiag 5845 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, res->status); fcdiag 5846 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.status = res->status; fcdiag 5847 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.cbfn(fcdiag->qtest.cbarg, fcdiag->qtest.status); fcdiag 5848 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.lock = 0; fcdiag 5852 drivers/scsi/bfa/bfa_svc.c bfa_fcdiag_loopback_comp(struct bfa_fcdiag_s *fcdiag, fcdiag 5855 drivers/scsi/bfa/bfa_svc.c struct bfa_diag_loopback_result_s *res = fcdiag->lb.result; fcdiag 5863 drivers/scsi/bfa/bfa_svc.c fcdiag->lb.status = rsp->res.status; fcdiag 5864 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, fcdiag->lb.status); fcdiag 5865 drivers/scsi/bfa/bfa_svc.c fcdiag->lb.cbfn(fcdiag->lb.cbarg, fcdiag->lb.status); fcdiag 5866 drivers/scsi/bfa/bfa_svc.c fcdiag->lb.lock = 0; fcdiag 5867 drivers/scsi/bfa/bfa_svc.c bfa_fcdiag_set_busy_status(fcdiag); fcdiag 5871 drivers/scsi/bfa/bfa_svc.c bfa_fcdiag_loopback_send(struct bfa_fcdiag_s *fcdiag, fcdiag 5876 drivers/scsi/bfa/bfa_svc.c lb_req = bfa_reqq_next(fcdiag->bfa, BFA_REQQ_DIAG); fcdiag 5882 drivers/scsi/bfa/bfa_svc.c bfa_fn_lpu(fcdiag->bfa)); fcdiag 5890 drivers/scsi/bfa/bfa_svc.c bfa_reqq_produce(fcdiag->bfa, BFA_REQQ_DIAG, lb_req->mh); fcdiag 5892 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, loopback->lb_mode); fcdiag 5893 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, loopback->speed); fcdiag 5894 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, loopback->loopcnt); fcdiag 5895 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, loopback->pattern); fcdiag 5905 drivers/scsi/bfa/bfa_svc.c struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); fcdiag 5909 drivers/scsi/bfa/bfa_svc.c bfa_fcdiag_loopback_comp(fcdiag, fcdiag 5913 drivers/scsi/bfa/bfa_svc.c bfa_fcdiag_queuetest_comp(fcdiag, (bfi_diag_qtest_rsp_t *)msg); fcdiag 5916 drivers/scsi/bfa/bfa_svc.c bfa_dport_req_comp(&fcdiag->dport, fcdiag 5920 drivers/scsi/bfa/bfa_svc.c bfa_dport_scn(&fcdiag->dport, fcdiag 5924 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, msg->mhdr.msg_id); fcdiag 5952 drivers/scsi/bfa/bfa_svc.c struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); fcdiag 5959 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, BFA_STATUS_PBC); fcdiag 5964 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, opmode); fcdiag 5978 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, speed); fcdiag 5982 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, attr.speed_supported); fcdiag 5987 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, speed); fcdiag 5997 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, speed); fcdiag 6018 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, fcdiag->lb.lock); fcdiag 6022 drivers/scsi/bfa/bfa_svc.c if (fcdiag->lb.lock) { fcdiag 6023 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, fcdiag->lb.lock); fcdiag 6027 drivers/scsi/bfa/bfa_svc.c fcdiag->lb.lock = 1; fcdiag 6032 drivers/scsi/bfa/bfa_svc.c fcdiag->lb.result = result; fcdiag 6033 drivers/scsi/bfa/bfa_svc.c fcdiag->lb.cbfn = cbfn; fcdiag 6034 drivers/scsi/bfa/bfa_svc.c fcdiag->lb.cbarg = cbarg; fcdiag 6036 drivers/scsi/bfa/bfa_svc.c bfa_fcdiag_set_busy_status(fcdiag); fcdiag 6039 drivers/scsi/bfa/bfa_svc.c status = bfa_fcdiag_loopback_send(fcdiag, &loopback); fcdiag 6060 drivers/scsi/bfa/bfa_svc.c struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); fcdiag 6062 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, force); fcdiag 6063 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, queue); fcdiag 6069 drivers/scsi/bfa/bfa_svc.c if (fcdiag->qtest.lock) { fcdiag 6070 drivers/scsi/bfa/bfa_svc.c bfa_trc(fcdiag, fcdiag->qtest.lock); fcdiag 6075 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.lock = 1; fcdiag 6076 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.cbfn = cbfn; fcdiag 6077 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.cbarg = cbarg; fcdiag 6078 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.result = result; fcdiag 6079 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.count = QTEST_CNT_DEFAULT; fcdiag 6082 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.result->status = BFA_STATUS_OK; fcdiag 6083 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.result->count = 0; fcdiag 6087 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.result->queue = (u8)queue; fcdiag 6088 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.queue = (u8)queue; fcdiag 6089 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.all = 0; fcdiag 6091 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.result->queue = 0; fcdiag 6092 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.queue = 0; fcdiag 6093 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.all = 1; fcdiag 6095 drivers/scsi/bfa/bfa_svc.c status = bfa_fcdiag_queuetest_send(fcdiag); fcdiag 6099 drivers/scsi/bfa/bfa_svc.c bfa_timer_start(bfa, &fcdiag->qtest.timer, fcdiag 6100 drivers/scsi/bfa/bfa_svc.c bfa_fcdiag_queuetest_timeout, fcdiag, fcdiag 6102 drivers/scsi/bfa/bfa_svc.c fcdiag->qtest.timer_active = 1; fcdiag 6117 drivers/scsi/bfa/bfa_svc.c struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); fcdiag 6118 drivers/scsi/bfa/bfa_svc.c return fcdiag->lb.lock ? BFA_STATUS_DIAG_BUSY : BFA_STATUS_OK; fcdiag 6643 drivers/scsi/bfa/bfa_svc.c struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); fcdiag 6644 drivers/scsi/bfa/bfa_svc.c struct bfa_dport_s *dport = &fcdiag->dport; fcdiag 6755 drivers/scsi/bfa/bfa_svc.c struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); fcdiag 6756 drivers/scsi/bfa/bfa_svc.c struct bfa_dport_s *dport = &fcdiag->dport; fcdiag 6813 drivers/scsi/bfa/bfa_svc.c struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); fcdiag 6814 drivers/scsi/bfa/bfa_svc.c struct bfa_dport_s *dport = &fcdiag->dport; fcdiag 6873 drivers/scsi/bfa/bfa_svc.c struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); fcdiag 6874 drivers/scsi/bfa/bfa_svc.c struct bfa_dport_s *dport = &fcdiag->dport; fcdiag 734 drivers/scsi/bfa/bfa_svc.h #define BFA_FCDIAG_MOD(__bfa) (&(__bfa)->modules.fcdiag)