Lines Matching defs:tag

885 	    ddi_prop_get_int(DDI_DEV_T_ANY, dip, 0, "scsi-tag-age-limit",
1231 ushort_t tag;
1232 for (tag = 0; tag < active->f_n_slots; tag++) {
1233 struct fas_cmd *sp = active->f_slot[tag];
1241 active->f_slot[tag] = NULL;
1910 ushort_t tag, t;
1921 for (n = tag = 0; tag < t; tag++) {
1922 if (fas->f_active[slot]->f_slot[tag] != 0) {
2628 * no need to reset tag bits since tag queueing will
2912 * allocate a tag byte and check for tag aging
2921 int tag;
2931 tag = (fas->f_active[slot]->f_tags)++;
2934 * we reserve tag 0 for non-tagged cmds
2938 EPRINTF1("tagged cmd, tag = %d\n", tag);
2940 /* Validate tag, should never fail. */
2941 if (tag_slots->f_slot[tag] == 0) {
2943 * Store assigned tag and tag queue type.
2946 ASSERT(tag < NTAGS);
2947 sp->cmd_tag[1] = (uchar_t)tag;
2950 EPRINTF1("tag= %d\n", tag);
2951 tag_slots->f_slot[tag] = sp;
2962 * Check tag age. If timeouts enabled and
2963 * tag age greater than 1, print warning msg.
2964 * If timeouts enabled and tag age greater than
2965 * age limit, begin draining tag que to check for
2966 * lost tag cmd.
2968 age = tag_slots->f_slot[tag]->cmd_age++;
2970 tag_slots->f_slot[tag]->cmd_pkt->pkt_time) {
2971 IPRINTF2("tag %d in use, age= %d\n", tag, age);
2972 DPRINTF("draining tag queue\n");
2978 /* If tag in use, scan until a free one is found. */
2980 tag = fas->f_active[slot]->f_tags;
2981 if (!tag_slots->f_slot[tag]) {
2982 EPRINTF1("found free tag %d\n", tag);
2987 * we reserve tag 0 for non-tagged cmds
2991 EPRINTF1("found in use tag %d\n", tag);
2999 if (tag_slots->f_slot[tag]) {
3056 * If all cmds drained from tag Q, back to full throttle and
3149 * allocate a tag; if no tag available then put request back
3159 * tag slot 0 is reserved for non-tagged cmds
3204 * (proxy msg's don't have tag flag set)
3210 EPRINTF("tag cmd\n");
3248 /* First the tag message bytes */
3259 EPRINTF1("cmd with wdtr msg, tag=%x\n", sp->cmd_tag[1]);
3639 int tag = sp->cmd_tag[1];
3644 EPRINTF4("remove tag %d slot %d for target %d.%d\n",
3645 tag, slot, Tgt(sp), Lun(sp));
3647 if (sp == tag_slots->f_slot[tag]) {
3648 tag_slots->f_slot[tag] = NULL;
3662 * Figure out what to set tag Q timeout for...
3668 * If no duplicates, we have to scan through tag que and
4127 * for the tag
4158 * If tag queueing in use, DMA in tag.
4160 * if tag 0 slot is non-empty, a non-tagged cmd is
4223 int id, tag;
4231 IPRINTF1("no tag for slot %x\n", slot);
4274 bad_reselect = "timeout on receiving tag msg";
4283 * around till the tag byte flips
4309 bad_reselect = "botched tag";
4312 tag = *c;
4317 sp = tag_slots->f_slot[tag];
4319 bad_reselect = "Invalid tag";
5698 * target rejected our tag
7373 int target, lun, i, n, tag, ncmds;
7419 for (ncmds = tag = 0; tag < n; tag++) {
7420 ssp = fas->f_active[slot]->f_slot[tag];
7884 ushort_t tag;
7886 for (tag = 0; tag < fas->f_active[slot]->f_n_slots; tag++) {
7887 if ((sp = fas->f_active[slot]->f_slot[tag]) != 0) {
7949 * due to tag allocation failure or preemption we have to return
8004 * cleanup the tag queue
8005 * preserve some order by starting with the oldest tag
8010 ushort_t tag, starttag;
8018 DPRINTF2("flushing entire tag queue, slot=%x, tcmds=%x\n",
8024 for (tag = 0; tag < fas->f_active[slot]->f_n_slots; tag++) {
8025 if ((sp = tagque->f_slot[tag]) != 0) {
8039 tag = starttag = fas->f_active[slot]->f_tags;
8042 if ((sp = tagque->f_slot[tag]) != 0) {
8045 tag = ((ushort_t)(tag + 1)) %
8047 } while (tag != starttag);
8198 * to include the tag
8225 int tag = sp->cmd_tag[1];
8226 ASSERT(sp == fas->f_active[slot]->f_slot[tag]);
8228 MSG_SIMPLE_QTAG, tag, msg);
8849 int tag;
8851 * find the oldest tag
8853 for (tag = NTAGS-1; tag >= 0; tag--) {
8854 if ((sp = fas->f_active[slot]->f_slot[tag])
9216 * reserve tag 0 for non-tagged cmds to tagged targets