Lines Matching defs:tgt

237 static void fas_revert_to_async(struct fas *fas, int tgt);
250 static void fas_update_props(struct fas *fas, int tgt);
465 int tgt = sd->sd_address.a_target;
476 fas_force_renegotiation(fas, tgt);
489 ((fas->f_target_scsi_options_defined & (1 << tgt)) == 0)) {
494 fas->f_target_scsi_options[tgt] = options;
496 "?target%x-scsi-options = 0x%x\n", tgt,
497 fas->f_target_scsi_options[tgt]);
498 fas_force_renegotiation(fas, tgt);
504 tgt, fas->f_target_scsi_options[tgt]);
2004 DPRINTF3("fas_scsi_getcap: tgt=%x, cap=%s, whom=%x\n",
2014 IPRINTF4("fas_scsi_setcap: tgt=%x, cap=%s, value=%x, whom=%x\n",
2270 caddr_t cdbp, scbp, tgt;
2273 tgt = cdbp = scbp = NULL;
2283 if ((tgt = kmem_zalloc(tgtlen, kf)) == NULL) {
2287 sp->cmd_pkt->pkt_private = tgt;
4837 uchar_t stat, fifoamt, tgt;
4843 tgt = Tgt(sp);
4873 if (fas_ptest_data_in & (1<<tgt)) {
4912 if (fas->f_wide_enabled & (1<<tgt)) {
4969 if (fas->f_offset[tgt]) {
5553 int tgt = Tgt(sp);
5574 garbled ? "Garbled" : "Identify", msgin, tgt);
5634 msgout = (TAGGED(tgt)? MSG_ABORT_TAG : MSG_ABORT);
5643 fas_set_wide_conf3(fas, tgt, 0);
5644 fas->f_nowide |= (1<<tgt);
5649 if ((fas->f_nosync & (1<<tgt)) == 0) {
5651 fas_make_sdtr(fas, 0, tgt);
5655 fas_revert_to_async(fas, tgt);
5656 fas->f_nosync |= (1<<tgt);
5695 if (TAGGED(tgt)) {
5715 tgt, scsi_mname(lastmsg));
5751 scsi_mname(msgin), tgt);
6061 int tgt = Tgt(sp);
6079 DPRINTF3("received period %d offset %d from tgt %d\n",
6080 period, offset, tgt);
6081 DPRINTF3("calculated minsync %d, maxsync %d for tgt %d\n",
6082 minsync, maxsync, tgt);
6084 fas->f_sync_period[tgt], fas->f_neg_period[tgt]);
6098 tgt);
6105 if (fas->f_backoff & (1<<tgt)) {
6107 max(period, fas->f_neg_period[tgt]) : 0;
6161 fas->f_offset[tgt] = offset;
6162 fas->f_neg_period[tgt] = period;
6169 fas_make_sdtr(fas, 0, tgt);
6170 period = fas->f_neg_period[tgt];
6171 offset = (fas->f_offset[tgt] & 0xf);
6175 fas->f_sync_period[tgt] = regval & SYNC_PERIOD_MASK;
6177 fas->f_sync_period[tgt]);
6179 fas->f_offset[tgt] = offset | fas->f_req_ack_delay;
6181 fas->f_offset[tgt]);
6188 fas->f_fasconf3[tgt] |= FAS_CONF3_FASTSCSI;
6190 fas->f_fasconf3[tgt] &= ~FAS_CONF3_FASTSCSI;
6194 fas->f_fasconf3[tgt]);
6196 DPRINTF4("period %d (%d), offset %d to tgt %d\n",
6198 fas->f_sync_period[tgt] & SYNC_PERIOD_MASK,
6199 fas->f_offset[tgt] & 0xf, tgt);
6201 DPRINTF1("conf3 = %x\n", fas->f_fasconf3[tgt]);
6211 xfer_rate = ((fas->f_nowide & (1<<tgt))? 1 : 2) *
6218 IPRINTF3(mbs, tgt, xfer_div, xfer_mod);
6220 IPRINTF3(mbs1, tgt, xfer_div, xfer_mod);
6222 IPRINTF3(mbs2, tgt, xfer_div, xfer_mod);
6225 fas->f_sync_enabled |= (1<<tgt);
6231 fas_revert_to_async(fas, tgt);
6239 fas->f_nosync |= (1<<tgt);
6242 fas->f_props_update |= (1<<tgt);
6256 tgt);
6261 fas->f_nowide &= ~(1<<tgt);
6262 fas_make_wdtr(fas, 0, tgt, width);
6271 fas_revert_to_async(fas, tgt);
6272 fas->f_sync_known &= ~(1<<tgt);
6277 fas_set_wide_conf3(fas, tgt, width);
6280 if ((fas->f_nosync & (1<<tgt)) == 0) {
6281 fas_make_sdtr(fas, 0, tgt);
6287 fas->f_props_update |= (1<<tgt);
6294 scsi_mname(MSG_EXTENDED), emsg, tgt);
6307 fas_revert_to_async(struct fas *fas, int tgt)
6311 fas->f_sync_period[tgt] = 0;
6313 fas->f_offset[tgt] = 0;
6315 fas->f_fasconf3[tgt] &= ~FAS_CONF3_FASTSCSI;
6316 fas_reg_write(fas, &fasreg->fas_conf3, fas->f_fasconf3[tgt]);
6317 fas->f_sync_enabled &= ~(1<<tgt);
7484 uchar_t tgt = slot / NLUNS_PER_TARGET;
7485 uint_t tshift = 1 << tgt;
7492 tgt, state, phase, (void *)sp);
7511 "Target %d disabled wide SCSI mode", tgt);
7519 fas->f_target_scsi_options[tgt] &= ~SCSI_OPTIONS_WIDE;
7526 if (fas->f_offset[tgt] != 0) {
7535 tgt);
7537 fas->f_target_scsi_options[tgt] &=
7541 fas->f_neg_period[tgt] *= 2;
7544 "Target %d reducing sync. transfer rate", tgt);
7561 fas_force_renegotiation(fas, tgt);
7562 fas->f_props_update |= (1<<tgt);
7572 int tgt = Tgt(sp);
7576 fas->f_nowide |= (1<<tgt);
7577 fas->f_fasconf3[tgt] &= ~FAS_CONF3_WIDE;
7579 fas->f_fasconf3[tgt]);
7590 fas->f_nosync |= (1<<tgt);
7591 fas->f_offset[tgt] = 0;
7592 fas->f_sync_period[tgt] = 0;
7597 fas->f_offset[tgt] = 0;
7598 fas->f_fasconf3[tgt] &= ~FAS_CONF3_FASTSCSI;
7600 fas->f_fasconf3[tgt]);
7603 fas_force_renegotiation(fas, tgt);
8973 /* do not allow with active tgt */
9127 "fas_commoncap:tgt=%x,cap=%s,tgtonly=%x,doset=%x,val=%x,rval=%x\n",
9139 fas_update_props(struct fas *fas, int tgt)
9145 uint_t regval = fas->f_sync_period[tgt];
9146 int offset = fas->f_offset[tgt];
9148 wide_enabled = ((fas->f_nowide & (1<<tgt)) == 0);
9154 (void) sprintf(property, "target%x-sync-speed", tgt);
9157 (void) sprintf(property, "target%x-wide", tgt);
9160 (void) sprintf(property, "target%x-TQ", tgt);
9161 tq_enabled = ((fas->f_notag & (1<<tgt))? 0 : 1);