Lines Matching defs:tgt

82 #define	AAC_DEVCFG_BEGIN(softs, tgt) \
83 aac_devcfg((softs), (tgt), 1)
84 #define AAC_DEVCFG_END(softs, tgt) \
85 aac_devcfg((softs), (tgt), 0)
2951 uint32_t bus, tgt;
2977 for (tgt = 0; tgt < softs->tgt_max; tgt++) {
2982 dvp->tid = tgt;
3568 aac_probe_jbod(struct aac_softstate *softs, int tgt, int event)
3570 ASSERT(AAC_MAX_LD <= tgt);
3571 ASSERT(tgt < AAC_MAX_DEV(softs));
3573 dvp = AAC_DEV(softs, tgt);
3578 ">>> Jbod %d added", tgt - AAC_MAX_LD);
3584 ">>> Jbod %d deleted", tgt - AAC_MAX_LD);
3590 (void) aac_handle_dr(softs, tgt, 0, event);
3841 aac_lun_serialno(struct aac_softstate *softs, int tgt, uchar_t *buf)
3846 ASSERT(tgt >= 0 && tgt < AAC_MAX_LD);
3848 uid = softs->containers[tgt].uid;
3864 int tgt = pkt->pkt_address.a_target;
3912 (void) aac_lun_serialno(softs, tgt, sp);
3941 sp = aac_lun_serialno(softs, tgt, sp);
4128 int tgt, lun;
4130 tgt = ddi_prop_get_int(DDI_DEV_T_ANY, dip,
4132 if (tgt == -1)
4139 (void) snprintf(name, len, "%x,%x", tgt, lun);
4152 uint16_t tgt = sd->sd_address.a_target;
4163 if (aac_find_child(softs, tgt, lun) != NULL) {
4177 if (tgt >= AAC_MAX_DEV(softs)) {
4179 "aac_tran_tgt_init: c%dt%dL%d out", ctl, tgt, lun);
4184 if (tgt < AAC_MAX_LD) {
4185 dvp = (struct aac_device *)&softs->containers[tgt];
4188 ctl, tgt, lun);
4194 * already. Dip's for non-existance tgt's will be cleared in
4197 if (softs->containers[tgt].dev.dip == NULL &&
4199 softs->containers[tgt].dev.dip = tgt_dip;
4201 dvp = (struct aac_device *)&softs->nondasds[AAC_PD(tgt)];
4204 * already. Dip's for non-existance tgt's will be cleared in
4208 if (softs->nondasds[AAC_PD(tgt)].dev.dip == NULL &&
4210 softs->nondasds[AAC_PD(tgt)].dev.dip = tgt_dip;
4217 "property for t%dL%d (buf_break)", tgt, lun);
4222 "aac_tran_tgt_init: c%dt%dL%d ok (%s)", ctl, tgt, lun,
4237 int tgt = sd->sd_address.a_target;
4240 if (tgt < AAC_MAX_LD) {
4241 if (softs->containers[tgt].dev.dip == tgt_dip)
4242 softs->containers[tgt].dev.dip = NULL;
4244 if (softs->nondasds[AAC_PD(tgt)].dev.dip == tgt_dip)
4245 softs->nondasds[AAC_PD(tgt)].dev.dip = NULL;
4246 softs->nondasds[AAC_PD(tgt)].dev.flags &= ~AAC_DFLAG_VALID;
7061 aac_parse_devname(char *devnm, int *tgt, int *lun)
7089 if (tgt && tp) {
7092 *tgt = (int)num;
7103 aac_find_child(struct aac_softstate *softs, uint16_t tgt, uint8_t lun)
7109 if (tgt < AAC_MAX_LD) {
7111 struct aac_device *dvp = &softs->containers[tgt].dev;
7116 (void) sprintf(addr, "%x,%x", tgt, lun);
7142 int tgt = sd->sd_address.a_target;
7153 "found no comptible driver for t%dL%d", tgt, lun);
7163 if (ndi_prop_update_int(DDI_DEV_T_NONE, ldip, "target", tgt)
7166 "property for t%dL%d (target)", tgt, lun);
7173 "property for t%dL%d (lun)", tgt, lun);
7181 "property for t%dL%d (compatible)", tgt, lun);
7189 tgt, lun);
7206 int tgt = sd->sd_address.a_target;
7211 if (tgt < AAC_MAX_LD) {
7216 event = aac_probe_container(softs, tgt);
7237 "Phys. device found: tgt %d dtype %d: %s",
7238 tgt, dtype, sd->sd_inq->inq_vid);
7246 AACDB_PRINT(softs, CE_NOTE, "non-DASD %d found", tgt);
7251 AACDB_PRINT(softs, CE_NOTE, "JBOD DASD %d found", tgt);
7255 softs->nondasds[AAC_PD(tgt)].dev.flags |= AAC_DFLAG_VALID;
7262 aac_config_lun(struct aac_softstate *softs, uint16_t tgt, uint8_t lun,
7271 if ((child = aac_find_child(softs, tgt, lun)) != NULL) {
7279 sd.sd_address.a_target = (uint16_t)tgt;
7292 aac_config_tgt(struct aac_softstate *softs, int tgt)
7303 ap.a_target = (uint16_t)tgt;
7378 if (aac_config_lun(softs, tgt, lun, &ldip) ==
7388 if (aac_config_lun(softs, tgt, 0, &ldip) == NDI_SUCCESS)
7396 aac_devcfg(struct aac_softstate *softs, int tgt, int en)
7401 dvp = AAC_DEV(softs, tgt);
7437 int tgt, lun;
7439 if (aac_parse_devname(arg, &tgt, &lun) != AACOK) {
7443 if (tgt >= AAC_MAX_LD) {
7444 if (tgt >= AAC_MAX_DEV(softs)) {
7450 AAC_DEVCFG_BEGIN(softs, tgt);
7451 rval = aac_config_lun(softs, tgt, lun, childp);
7452 AAC_DEVCFG_END(softs, tgt);
7458 uint32_t bus, tgt;
7461 for (tgt = 0; tgt < AAC_MAX_LD; tgt++) {
7462 AAC_DEVCFG_BEGIN(softs, tgt);
7463 (void) aac_config_lun(softs, tgt, 0, NULL);
7464 AAC_DEVCFG_END(softs, tgt);
7472 for (tgt = 0; tgt < softs->tgt_max; tgt++, index++) {
7494 aac_handle_dr(struct aac_softstate *softs, int tgt, int lun, int event)
7504 dvp = AAC_DEV(softs, tgt);
7517 (void) aac_config_lun(softs, tgt, 0, NULL);
7519 softs->instance, tgt, lun);
7530 softs->instance, tgt, lun);
8169 int tgt = ap->a_target;
8175 if (tgt >= AAC_MAX_LD) {
8178 tgt = ((struct aac_nondasd *)acp->dvp)->tid;
8186 cmd, ctl, tgt, lun, is_pd ? "(pd)" : "");
8197 ctl, tgt, lun, is_pd ? "(pd)" : "");
8205 ctl, tgt, lun, is_pd ? "(pd)" : "");
8214 ctl, tgt, lun, is_pd ? "(pd)" : "");
8222 ctl, tgt, lun, is_pd ? "(pd)" : "");
8226 desc, ctl, tgt, lun, is_pd ? "(pd)" : "");