Lines Matching defs:ctlr

103 	cpqary3_t		*ctlr;
118 if (NULL == (ctlr = (cpqary3_t *)arg))
121 ctp = (CfgTable_t *)ctlr->ct;
124 if (ctlr->heartbeat == DDI_GET32(ctlr, &ctp->HeartBeat)) {
125 if (ctlr->lockup_logged == CPQARY3_FALSE) {
127 "%s HBA firmware Locked !!!", ctlr->hba_name);
130 cpqary3_intr_onoff(ctlr, CPQARY3_INTR_DISABLE);
131 if (ctlr->host_support & 0x4)
132 cpqary3_lockup_intr_onoff(ctlr,
134 ctlr->controller_lockup = CPQARY3_TRUE;
135 ctlr->lockup_logged = CPQARY3_TRUE;
139 no_cmds = (uint32_t)((ctlr->ctlr_maxcmds / 3) *
141 mutex_enter(&ctlr->sw_mutex);
144 local = &ctlr->cmdmemlistp->pool[i];
174 mutex_exit(&ctlr->sw_mutex);
177 mutex_enter(&ctlr->sw_mutex);
185 ctlr->heartbeat = DDI_GET32(ctlr, &ctp->HeartBeat);
186 mutex_exit(&ctlr->sw_mutex);
187 ctlr->tick_tmout_id = timeout(cpqary3_tick_hdlr,
188 (caddr_t)ctlr, drv_usectohz(CPQARY3_TICKTMOUT_VALUE));
204 cpqary3_init_ctlr_resource(cpqary3_t *ctlr)
220 RETURN_FAILURE_IF_NULL(ctlr);
222 if (CPQARY3_FAILURE == cpqary3_init_ctlr(ctlr))
225 if (CPQARY3_FAILURE == cpqary3_meminit(ctlr))
239 if (CPQARY3_SUCCESS != cpqary3_meminit(ctlr)) {
246 cpqary3_memfini(ctlr, CPQARY3_MEMLIST_DONE |
254 ctlr->cpqary3_tgtp[CTLR_SCSI_ID] = MEM_ZALLOC(sizeof (cpqary3_tgt_t));
255 if (!(ctlr->cpqary3_tgtp[CTLR_SCSI_ID])) {
257 cpqary3_memfini(ctlr, CPQARY3_MEMLIST_DONE |
261 ctlr->cpqary3_tgtp[CTLR_SCSI_ID]->type = CPQARY3_TARGET_CTLR;
263 cpqary3_intr_onoff(ctlr, CPQARY3_INTR_DISABLE);
273 cv_init(&ctlr->cv_immediate_wait, NULL, CV_DRIVER, NULL);
274 cv_init(&ctlr->cv_noe_wait, NULL, CV_DRIVER, NULL);
275 cv_init(&ctlr->cv_flushcache_wait, NULL, CV_DRIVER, NULL);
276 cv_init(&ctlr->cv_abort_wait, NULL, CV_DRIVER, NULL);
277 cv_init(&ctlr->cv_ioctl_wait, NULL, CV_DRIVER, NULL);
293 cpqary3_t *ctlr = SA2CTLR(sa);
294 cpqary3_tgt_t *tgtp = ctlr->cpqary3_tgtp[SA2TGT(sa)];
588 cpqary3_detect_target_geometry(cpqary3_t *ctlr)
597 RETURN_FAILURE_IF_NULL(ctlr);
610 cpqary3_cmdpvtp = cpqary3_synccmd_alloc(ctlr, sizeof (IdLogDrive));
649 if (ctlr->legacy_mapping == 1) {
650 loop_cnt = ((ctlr->num_of_targets > CTLR_SCSI_ID) ?
651 (ctlr->num_of_targets + 1) : (ctlr->num_of_targets));
659 ctlr->cpqary3_tgtp[i]->logical_id;
673 (ctlr->cpqary3_tgtp[i]->logical_id) >> 16;
692 if (cpqary3_synccmd_send(ctlr, cpqary3_cmdpvtp, 90000,
695 cpqary3_synccmd_free(ctlr, cpqary3_cmdpvtp);
704 cpqary3_synccmd_free(ctlr, cpqary3_cmdpvtp);
709 ctlr->cpqary3_tgtp[i]->properties.drive.heads =
711 ctlr->cpqary3_tgtp[i]->properties.drive.sectors =
729 for (i = 0; ld_count < ctlr->num_of_targets; i++) {
731 ctlr->cpqary3_tgtp[i] == NULL)
736 ctlr->cpqary3_tgtp[i]->logical_id;
748 (ctlr->cpqary3_tgtp[i]->logical_id) >> 16;
766 if (cpqary3_synccmd_send(ctlr, cpqary3_cmdpvtp, 90000,
769 cpqary3_synccmd_free(ctlr, cpqary3_cmdpvtp);
778 cpqary3_synccmd_free(ctlr, cpqary3_cmdpvtp);
783 ctlr->cpqary3_tgtp[i]->properties.drive.heads =
785 ctlr->cpqary3_tgtp[i]->properties.drive.sectors =
796 cpqary3_synccmd_free(ctlr, cpqary3_cmdpvtp);