Lines Matching defs:fc

111 	struct isp_fc *fc = ISP_FC_PC(isp, chan);
138 fc->sim = sim;
139 fc->path = path;
140 fc->isp = isp;
141 fc->ready = 1;
145 callout_init_mtx(&fc->gdt, &isp->isp_lock, 0);
146 TASK_INIT(&fc->gtask, 1, isp_gdt_task, fc);
148 TAILQ_INIT(&fc->waitq);
149 STAILQ_INIT(&fc->ntfree);
151 STAILQ_INSERT_TAIL(&fc->ntfree, &fc->ntpool[i], next);
152 LIST_INIT(&fc->atfree);
154 LIST_INSERT_HEAD(&fc->atfree, &fc->atpool[i], next);
156 LIST_INIT(&fc->atused[i]);
160 if (kproc_create(isp_kthread, fc, &fc->kproc, 0, 0,
162 xpt_free_path(fc->path);
163 xpt_bus_deregister(cam_sim_path(fc->sim));
164 cam_sim_free(fc->sim, FALSE);
167 fc->num_threads += 1;
181 "loop_down_limit", CTLFLAG_RW, &fc->loop_down_limit, 0,
184 "gone_device_time", CTLFLAG_RW, &fc->gone_device_time, 0,
188 "inject_lost_data_frame", CTLFLAG_RW, &fc->inject_lost_data_frame, 0,
230 struct isp_fc *fc = ISP_FC_PC(isp, chan);
232 xpt_free_path(fc->path);
233 xpt_bus_deregister(cam_sim_path(fc->sim));
234 cam_sim_free(fc->sim, FALSE);
237 wakeup(fc);
238 while (fc->num_threads != 0)
239 mtx_sleep(&fc->num_threads, &isp->isp_lock, PRIBIO, "isp_reap", 0);
307 struct isp_fc *fc = ISP_FC_PC(isp, chan);
309 if (fc->sim == NULL)
311 if (fc->simqfrozen == 0) {
314 fc->simqfrozen = SIMQFRZ_LOOPDOWN;
316 xpt_freeze_simq(fc->sim, 1);
320 fc->simqfrozen |= SIMQFRZ_LOOPDOWN;
327 struct isp_fc *fc = ISP_FC_PC(isp, chan);
329 if (fc->sim == NULL)
331 int wasfrozen = fc->simqfrozen & SIMQFRZ_LOOPDOWN;
332 fc->simqfrozen &= ~SIMQFRZ_LOOPDOWN;
333 if (wasfrozen && fc->simqfrozen == 0) {
336 xpt_release_simq(fc->sim, 1);
348 struct isp_fc *fc = ISP_FC_PC(isp, 0);
350 if (isp->isp_rqovf || fc->sim == NULL)
353 xpt_freeze_simq(fc->sim, 1);
361 struct isp_fc *fc = ISP_FC_PC(isp, 0);
363 if (!isp->isp_rqovf || fc->sim == NULL)
366 xpt_release_simq(fc->sim, 0);
653 struct isp_fc *fc = ISP_FC_PC(isp, bus);
656 SLIST_FOREACH(tptr, &fc->lun_hash[LUN_HASH_FUNC(lun)], next) {
693 struct isp_fc *fc;
699 fc = ISP_FC_PC(isp, bus);
701 SLIST_FOREACH(tptr, &fc->lun_hash[i], next)
708 ccb = (union ccb *)TAILQ_FIRST(&fc->waitq);
710 TAILQ_REMOVE(&fc->waitq, &ccb->ccb_h, sim_links.tqe);
721 struct isp_fc *fc = ISP_FC_PC(isp, chan);
724 atp = LIST_FIRST(&fc->atfree);
729 LIST_INSERT_HEAD(&fc->atused[ATPDPHASH(tag)], atp, next);
737 struct isp_fc *fc = ISP_FC_PC(isp, chan);
740 LIST_FOREACH(atp, &fc->atused[ATPDPHASH(tag)], next) {
754 struct isp_fc *fc = ISP_FC_PC(isp, chan);
757 LIST_FOREACH(atp, &fc->atused[ATPDPHASH(tag)], next) {
767 struct isp_fc *fc = ISP_FC_PC(isp, chan);
773 LIST_INSERT_HEAD(&fc->atfree, atp, next);
779 struct isp_fc *fc = ISP_FC_PC(isp, chan);
783 for (atp = fc->atpool; atp < &fc->atpool[ATPDPSIZE]; atp++) {
794 struct isp_fc *fc = ISP_FC_PC(isp, chan);
797 ntp = STAILQ_FIRST(&fc->ntfree);
799 STAILQ_REMOVE_HEAD(&fc->ntfree, next);
806 struct isp_fc *fc = ISP_FC_PC(isp, chan);
809 for (ntp = fc->ntpool; ntp < &fc->ntpool[ATPDPSIZE]; ntp++) {
819 struct isp_fc *fc = ISP_FC_PC(isp, chan);
822 STAILQ_INSERT_HEAD(&fc->ntfree, ntp, next);
828 struct isp_fc *fc = ISP_FC_PC(isp, bus);
840 SLIST_INSERT_HEAD(&fc->lun_hash[LUN_HASH_FUNC(lun)], tptr, next);
848 struct isp_fc *fc = ISP_FC_PC(isp, bus);
867 SLIST_REMOVE(&fc->lun_hash[LUN_HASH_FUNC(tptr->ts_lun)], tptr, tstate, next);
1986 struct isp_fc *fc = ISP_FC_PC(isp, chan);
1996 if (xpt_create_path(&ccb->ccb_h.path, NULL, cam_sim_path(fc->sim),
2009 struct isp_fc *fc = ISP_FC_PC(isp, chan);
2011 if (xpt_create_path(&tp, NULL, cam_sim_path(fc->sim), tgt, CAM_LUN_WILDCARD) == CAM_REQ_CMP) {
2030 struct isp_fc *fc = arg;
2031 taskqueue_enqueue(taskqueue_thread, &fc->gtask);
2037 struct isp_fc *fc = arg;
2038 ispsoftc_t *isp = fc->isp;
2039 int chan = fc - ISP_FC_PC(isp, 0);
2071 xpt_async(AC_CONTRACT, fc->path, &ac);
2075 if (fc->ready) {
2077 callout_reset(&fc->gdt, hz, isp_gdt, fc);
2079 callout_deactivate(&fc->gdt);
2099 struct isp_fc *fc = ISP_FC_PC(isp, chan);
2101 if (fc->loop_down_time)
2106 fc->loop_down_time = time_uptime;
2107 wakeup(fc);
2113 struct isp_fc *fc = ISP_FC_PC(isp, chan);
2116 fc->loop_seen_once = 1;
2117 fc->loop_down_time = 0;
2125 struct isp_fc *fc = ISP_FC_PC(isp, chan);
2189 xpt_async(AC_CONTRACT, fc->path, &ac);
2194 fc->loop_down_time = 0;
2200 struct isp_fc *fc = arg;
2201 ispsoftc_t *isp = fc->isp;
2202 int chan = fc - ISP_FC_PC(isp, 0);
2232 if (fc->loop_seen_once == 0)
2235 lim = fc->loop_down_limit;
2236 d = time_uptime - fc->loop_down_time;
2260 msleep(fc, &isp->isp_lock, PRIBIO, "ispf", slp * hz);
2262 fc->num_threads -= 1;
2263 wakeup(&fc->num_threads);
2612 struct ccb_trans_settings_fc *fc;
2616 fc = &cts->xport_specific.fc;
2627 fc->valid = CTS_FC_VALID_SPEED;
2628 fc->bitrate = fcp->isp_gbspeed * 100000;
2631 fc->wwnn = lp->node_wwn;
2632 fc->wwpn = lp->port_wwn;
2633 fc->port = lp->portid;
2634 fc->valid |= CTS_FC_VALID_WWNN | CTS_FC_VALID_WWPN | CTS_FC_VALID_PORT;
2670 if (kp->xport_specific.fc.valid & KNOB_VALID_ADDRESS) {
2671 fcp->isp_wwnn = ISP_FC_PC(isp, bus)->def_wwnn = kp->xport_specific.fc.wwnn;
2672 fcp->isp_wwpn = ISP_FC_PC(isp, bus)->def_wwpn = kp->xport_specific.fc.wwpn;
2676 if (kp->xport_specific.fc.valid & KNOB_VALID_ROLE) {
2680 switch (kp->xport_specific.fc.role) {
2725 kp->xport_specific.fc.wwnn = fcp->isp_wwnn;
2726 kp->xport_specific.fc.wwpn = fcp->isp_wwpn;
2729 kp->xport_specific.fc.role = KNOB_ROLE_NONE;
2732 kp->xport_specific.fc.role = KNOB_ROLE_TARGET;
2735 kp->xport_specific.fc.role = KNOB_ROLE_INITIATOR;
2738 kp->xport_specific.fc.role = KNOB_ROLE_BOTH;
2741 kp->xport_specific.fc.valid = KNOB_VALID_ADDRESS | KNOB_VALID_ROLE;
2783 cpi->xport_specific.fc.wwnn = fcp->isp_wwnn;
2784 cpi->xport_specific.fc.wwpn = fcp->isp_wwpn;
2785 cpi->xport_specific.fc.port = fcp->isp_portid;
2786 cpi->xport_specific.fc.bitrate = fcp->isp_gbspeed * 1000;
2848 struct isp_fc *fc;
2904 fc = ISP_FC_PC(isp, bus);
2923 xpt_async(AC_CONTRACT, fc->path, &ac);
2936 fc = ISP_FC_PC(isp, bus);
2972 xpt_async(AC_CONTRACT, fc->path, &ac);
2986 fc = ISP_FC_PC(isp, bus);
2995 lp->gone_timer = fc->gone_device_time;
2997 if (fc->ready && !callout_active(&fc->gdt)) {
2999 callout_reset(&fc->gdt, hz, isp_gdt, fc);
3179 struct isp_fc *fc = ISP_FC_PC(isp, chan);
3182 seed = iswwnn ? fc->def_wwnn : fc->def_wwpn;
3273 struct isp_fc *fc = ISP_FC_PC(isp, chan);
3275 if (fc->fcbsy)
3277 fc->fcbsy = 1;
3415 struct isp_fc *fc = ISP_FC_PC(isp, chan);
3427 for (nxp = fc->nexus_hash[i]; nxp != NULL; nxp = nxp->next) {
3439 struct isp_fc *fc;
3446 fc = ISP_FC_PC(isp, chan);
3448 nxp = fc->nexus_hash[idx];
3456 nxp = fc->nexus_free_list;
3463 fc->nexus_free_list = nxp->next;
3467 nxp->next = fc->nexus_hash[idx];
3468 fc->nexus_hash[idx] = nxp;