Lines Matching full: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);
1011 * Does the initiator expect FC-Tape style responses?
1976 struct isp_fc *fc = ISP_FC_PC(isp, chan);
1986 if (xpt_create_path(&ccb->ccb_h.path, NULL, cam_sim_path(fc->sim),
1999 struct isp_fc *fc = ISP_FC_PC(isp, chan);
2001 if (xpt_create_path(&tp, NULL, cam_sim_path(fc->sim), tgt, CAM_LUN_WILDCARD) == CAM_REQ_CMP) {
2020 struct isp_fc *fc = arg;
2021 taskqueue_enqueue(taskqueue_thread, &fc->gtask);
2027 struct isp_fc *fc = arg;
2028 ispsoftc_t *isp = fc->isp;
2029 int chan = fc - ISP_FC_PC(isp, 0);
2061 xpt_async(AC_CONTRACT, fc->path, &ac);
2065 if (fc->ready) {
2067 callout_reset(&fc->gdt, hz, isp_gdt, fc);
2069 callout_deactivate(&fc->gdt);
2089 struct isp_fc *fc = ISP_FC_PC(isp, chan);
2091 if (fc->loop_down_time)
2096 fc->loop_down_time = time_uptime;
2097 wakeup(fc);
2103 struct isp_fc *fc = ISP_FC_PC(isp, chan);
2106 fc->loop_seen_once = 1;
2107 fc->loop_down_time = 0;
2115 struct isp_fc *fc = ISP_FC_PC(isp, chan);
2179 xpt_async(AC_CONTRACT, fc->path, &ac);
2184 fc->loop_down_time = 0;
2190 struct isp_fc *fc = arg;
2191 ispsoftc_t *isp = fc->isp;
2192 int chan = fc - ISP_FC_PC(isp, 0);
2199 "Chan %d Checking FC state", chan);
2202 "Chan %d FC got to %s state", chan,
2222 if (fc->loop_seen_once == 0)
2225 lim = fc->loop_down_limit;
2226 d = time_uptime - fc->loop_down_time;
2250 msleep(fc, &isp->isp_lock, PRIBIO, "ispf", slp * hz);
2252 fc->num_threads -= 1;
2253 wakeup(&fc->num_threads);
2543 * If we have a FC device, reset the Command
2597 struct ccb_trans_settings_fc *fc;
2601 fc = &cts->xport_specific.fc;
2612 fc->valid = CTS_FC_VALID_SPEED;
2613 fc->bitrate = fcp->isp_gbspeed * 100000;
2616 fc->wwnn = lp->node_wwn;
2617 fc->wwpn = lp->port_wwn;
2618 fc->port = lp->portid;
2619 fc->valid |= CTS_FC_VALID_WWNN | CTS_FC_VALID_WWPN | CTS_FC_VALID_PORT;
2655 if (kp->xport_specific.fc.valid & KNOB_VALID_ADDRESS) {
2656 fcp->isp_wwnn = ISP_FC_PC(isp, bus)->def_wwnn = kp->xport_specific.fc.wwnn;
2657 fcp->isp_wwpn = ISP_FC_PC(isp, bus)->def_wwpn = kp->xport_specific.fc.wwpn;
2661 if (kp->xport_specific.fc.valid & KNOB_VALID_ROLE) {
2665 switch (kp->xport_specific.fc.role) {
2710 kp->xport_specific.fc.wwnn = fcp->isp_wwnn;
2711 kp->xport_specific.fc.wwpn = fcp->isp_wwpn;
2714 kp->xport_specific.fc.role = KNOB_ROLE_NONE;
2717 kp->xport_specific.fc.role = KNOB_ROLE_TARGET;
2720 kp->xport_specific.fc.role = KNOB_ROLE_INITIATOR;
2723 kp->xport_specific.fc.role = KNOB_ROLE_BOTH;
2726 kp->xport_specific.fc.valid = KNOB_VALID_ADDRESS | KNOB_VALID_ROLE;
2768 cpi->xport_specific.fc.wwnn = fcp->isp_wwnn;
2769 cpi->xport_specific.fc.wwpn = fcp->isp_wwpn;
2770 cpi->xport_specific.fc.port = fcp->isp_portid;
2771 cpi->xport_specific.fc.bitrate = fcp->isp_gbspeed * 1000;
2833 struct isp_fc *fc;
2889 fc = ISP_FC_PC(isp, bus);
2908 xpt_async(AC_CONTRACT, fc->path, &ac);
2921 fc = ISP_FC_PC(isp, bus);
2957 xpt_async(AC_CONTRACT, fc->path, &ac);
2971 fc = ISP_FC_PC(isp, bus);
2980 lp->gone_timer = fc->gone_device_time;
2982 if (fc->ready && !callout_active(&fc->gdt)) {
2984 callout_reset(&fc->gdt, hz, isp_gdt, fc);
3164 struct isp_fc *fc = ISP_FC_PC(isp, chan);
3167 seed = iswwnn ? fc->def_wwnn : fc->def_wwpn;
3258 struct isp_fc *fc = ISP_FC_PC(isp, chan);
3260 if (fc->fcbsy)
3262 fc->fcbsy = 1;
3400 struct isp_fc *fc = ISP_FC_PC(isp, chan);
3412 for (nxp = fc->nexus_hash[i]; nxp != NULL; nxp = nxp->next) {
3424 struct isp_fc *fc;
3431 fc = ISP_FC_PC(isp, chan);
3433 nxp = fc->nexus_hash[idx];
3441 nxp = fc->nexus_free_list;
3448 fc->nexus_free_list = nxp->next;
3452 nxp->next = fc->nexus_hash[idx];
3453 fc->nexus_hash[idx] = nxp;