Lines Matching refs:fc

163 		struct isp_fc *fc = ISP_FC_PC(isp, chan);
169 fc->sim = sim;
170 fc->path = path;
171 fc->isp = isp;
172 fc->ready = 1;
176 callout_init_mtx(&fc->gdt, &isp->isp_lock, 0);
177 TASK_INIT(&fc->gtask, 1, isp_gdt_task, fc);
179 TAILQ_INIT(&fc->waitq);
180 STAILQ_INIT(&fc->ntfree);
182 STAILQ_INSERT_TAIL(&fc->ntfree, &fc->ntpool[i], next);
183 LIST_INIT(&fc->atfree);
185 LIST_INSERT_HEAD(&fc->atfree, &fc->atpool[i], next);
187 LIST_INIT(&fc->atused[i]);
191 if (kproc_create(isp_kthread, fc, &fc->kproc, 0, 0,
193 xpt_free_path(fc->path);
195 xpt_bus_deregister(cam_sim_path(fc->sim));
197 cam_sim_free(fc->sim, FALSE);
200 fc->num_threads += 1;
213 "loop_down_limit", CTLFLAG_RW, &fc->loop_down_limit, 0,
216 "gone_device_time", CTLFLAG_RW, &fc->gone_device_time, 0,
220 "inject_lost_data_frame", CTLFLAG_RW, &fc->inject_lost_data_frame, 0,
351 struct isp_fc *fc = ISP_FC_PC(isp, chan);
353 if (fc->sim == NULL)
355 if (fc->simqfrozen == 0) {
358 fc->simqfrozen = SIMQFRZ_LOOPDOWN;
360 xpt_freeze_simq(fc->sim, 1);
364 fc->simqfrozen |= SIMQFRZ_LOOPDOWN;
371 struct isp_fc *fc = ISP_FC_PC(isp, chan);
373 if (fc->sim == NULL)
375 int wasfrozen = fc->simqfrozen & SIMQFRZ_LOOPDOWN;
376 fc->simqfrozen &= ~SIMQFRZ_LOOPDOWN;
377 if (wasfrozen && fc->simqfrozen == 0) {
380 xpt_release_simq(fc->sim, 1);
2597 struct isp_fc *fc = ISP_FC_PC(isp, chan);
2607 if (xpt_create_path(&ccb->ccb_h.path, NULL, cam_sim_path(fc->sim),
2620 struct isp_fc *fc = ISP_FC_PC(isp, chan);
2622 if (xpt_create_path(&tp, NULL, cam_sim_path(fc->sim), tgt, CAM_LUN_WILDCARD) == CAM_REQ_CMP) {
2641 struct isp_fc *fc = arg;
2642 taskqueue_enqueue(taskqueue_thread, &fc->gtask);
2648 struct isp_fc *fc = arg;
2649 ispsoftc_t *isp = fc->isp;
2650 int chan = fc - isp->isp_osinfo.pc.fc;
2682 xpt_async(AC_CONTRACT, fc->path, &ac);
2686 if (fc->ready) {
2688 callout_reset(&fc->gdt, hz, isp_gdt, fc);
2690 callout_deactivate(&fc->gdt);
2710 struct isp_fc *fc = ISP_FC_PC(isp, chan);
2712 if (fc->loop_down_time)
2717 fc->loop_down_time = time_uptime;
2718 wakeup(fc);
2724 struct isp_fc *fc = ISP_FC_PC(isp, chan);
2727 fc->loop_seen_once = 1;
2728 fc->loop_down_time = 0;
2736 struct isp_fc *fc = ISP_FC_PC(isp, chan);
2802 xpt_async(AC_CONTRACT, fc->path, &ac);
2807 fc->loop_down_time = 0;
2813 struct isp_fc *fc = arg;
2814 ispsoftc_t *isp = fc->isp;
2815 int chan = fc - isp->isp_osinfo.pc.fc;
2845 if (fc->loop_seen_once == 0)
2848 lim = fc->loop_down_limit;
2849 d = time_uptime - fc->loop_down_time;
2873 msleep(fc, &isp->isp_lock, PRIBIO, "ispf", slp * hz);
2875 fc->num_threads -= 1;
3269 struct ccb_trans_settings_fc *fc = &cts->xport_specific.fc;
3278 fc->valid = CTS_FC_VALID_SPEED;
3279 fc->bitrate = 100000;
3280 fc->bitrate *= fcp->isp_gbspeed;
3283 fc->wwnn = lp->node_wwn;
3284 fc->wwpn = lp->port_wwn;
3285 fc->port = lp->portid;
3286 fc->valid |= CTS_FC_VALID_WWNN | CTS_FC_VALID_WWPN | CTS_FC_VALID_PORT;
3390 if (kp->xport_specific.fc.valid & KNOB_VALID_ADDRESS) {
3391 fcp->isp_wwnn = ISP_FC_PC(isp, bus)->def_wwnn = kp->xport_specific.fc.wwnn;
3392 fcp->isp_wwpn = ISP_FC_PC(isp, bus)->def_wwpn = kp->xport_specific.fc.wwpn;
3396 if (kp->xport_specific.fc.valid & KNOB_VALID_ROLE) {
3400 switch (kp->xport_specific.fc.role) {
3449 kp->xport_specific.fc.wwnn = fcp->isp_wwnn;
3450 kp->xport_specific.fc.wwpn = fcp->isp_wwpn;
3453 kp->xport_specific.fc.role = KNOB_ROLE_NONE;
3456 kp->xport_specific.fc.role = KNOB_ROLE_TARGET;
3459 kp->xport_specific.fc.role = KNOB_ROLE_INITIATOR;
3462 kp->xport_specific.fc.role = KNOB_ROLE_BOTH;
3465 kp->xport_specific.fc.valid = KNOB_VALID_ADDRESS | KNOB_VALID_ROLE;
3521 cpi->xport_specific.fc.wwnn = fcp->isp_wwnn;
3522 cpi->xport_specific.fc.wwpn = fcp->isp_wwpn;
3523 cpi->xport_specific.fc.port = fcp->isp_portid;
3524 cpi->xport_specific.fc.bitrate = fcp->isp_gbspeed * 1000;
3594 struct isp_fc *fc;
3719 fc = ISP_FC_PC(isp, bus);
3738 xpt_async(AC_CONTRACT, fc->path, &ac);
3751 fc = ISP_FC_PC(isp, bus);
3787 xpt_async(AC_CONTRACT, fc->path, &ac);
3801 fc = ISP_FC_PC(isp, bus);
3810 lp->gone_timer = fc->gone_device_time;
3812 if (fc->ready && !callout_active(&fc->gdt)) {
3814 callout_reset(&fc->gdt, hz, isp_gdt, fc);
4016 struct isp_fc *fc = ISP_FC_PC(isp, chan);
4019 seed = iswwnn ? fc->def_wwnn : fc->def_wwpn;
4168 if (isp->isp_osinfo.pc.fc[chan].fcbsy) {
4171 isp->isp_osinfo.pc.fc[chan].fcbsy = 1;
4233 struct isp_fc *fc = ISP_FC_PC(isp, chan);
4245 for (nxp = fc->nexus_hash[i]; nxp != NULL; nxp = nxp->next) {
4257 struct isp_fc *fc;
4267 fc = &isp->isp_osinfo.pc.fc[chan];
4269 nxp = fc->nexus_hash[idx];
4277 nxp = fc->nexus_free_list;
4284 fc->nexus_free_list = nxp->next;
4288 nxp->next = fc->nexus_hash[idx];
4289 fc->nexus_hash[idx] = nxp;