Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/thorpej_scsipi]: src/sys/dev/ic Use the tag type passed from upper level...
details: https://anonhg.NetBSD.org/src/rev/1763fe03f163
branches: thorpej_scsipi
changeset: 477458:1763fe03f163
user: bouyer <bouyer%NetBSD.org@localhost>
date: Mon Apr 02 16:58:59 2001 +0000
description:
Use the tag type passed from upper level. Tag number is still handled locally
as they're allocated statically to ccbs.
Don't decide ourselve which commands shall run tagged or untagged; the
upper level does this for us.
diffstat:
sys/dev/ic/aic7xxx.c | 32 ++++++++++++--------------------
1 files changed, 12 insertions(+), 20 deletions(-)
diffs (74 lines):
diff -r 4909979790e6 -r 1763fe03f163 sys/dev/ic/aic7xxx.c
--- a/sys/dev/ic/aic7xxx.c Mon Apr 02 16:29:50 2001 +0000
+++ b/sys/dev/ic/aic7xxx.c Mon Apr 02 16:58:59 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: aic7xxx.c,v 1.37.2.13 2001/04/02 16:22:55 bouyer Exp $ */
+/* $NetBSD: aic7xxx.c,v 1.37.2.14 2001/04/02 16:58:59 bouyer Exp $ */
/*
* Generic driver for the aic7xxx based adaptec SCSI controllers
@@ -2297,7 +2297,7 @@
u_int tag;
tag = SCB_LIST_NULL;
- if ((scb->hscb->control & MSG_SIMPLE_Q_TAG) != 0)
+ if ((scb->hscb->control & TAG_ENB) != 0)
tag = scb->hscb->tag;
ahc_abort_scbs(ahc, SCB_TARGET(scb), SCB_CHANNEL(scb),
@@ -2398,8 +2398,8 @@
ahc->msgout_len++;
if ((scb->hscb->control & TAG_ENB) != 0) {
- /* XXX fvdl FreeBSD has tag action passed down */
- ahc->msgout_buf[ahc->msgout_index++] = MSG_SIMPLE_Q_TAG;
+ ahc->msgout_buf[ahc->msgout_index++] =
+ scb->xs->xs_tag_type;
ahc->msgout_buf[ahc->msgout_index++] = scb->hscb->tag;
ahc->msgout_len += 2;
}
@@ -2526,7 +2526,7 @@
devinfo->channel, devinfo->target);
#endif
ahc_update_xfer_mode(ahc, devinfo);
- } else if ((scb->hscb->control & MSG_SIMPLE_Q_TAG) != 0) {
+ } else if ((scb->hscb->control & TAG_ENB) != 0) {
printf("%s:%c:%d: refuses tagged commands. Performing "
"non-tagged I/O\n", ahc_name(ahc),
devinfo->channel, devinfo->target);
@@ -3879,12 +3879,13 @@
hscb = scb->hscb;
hscb->tcl = tcl;
- if (ahc_istagged_device(ahc, xs, 0))
- if((xs->bp != NULL) && xs->bp->b_flags & B_ASYNC)
- scb->hscb->control |= MSG_SIMPLE_Q_TAG;
- else
- scb->hscb->control |= MSG_ORDERED_Q_TAG;
- else
+ if (xs->xs_tag_type) {
+#ifdef DIAGNOSTIC
+ if (ahc_istagged_device(ahc, xs, 0) == 0)
+ panic("ahc_action: taggged command for untagged device");
+#endif
+ scb->hscb->control |= TAG_ENB;
+ } else
ahc_busy_tcl(ahc, scb);
splx(s);
@@ -5536,15 +5537,6 @@
struct tmode_tstate *tstate;
struct ahc_devinfo devinfo;
- /*
- * XXX never do these commands with tags. Should really be
- * in a higher layer.
- */
- if (!nocmdcheck && (xs->cmd->opcode == INQUIRY ||
- xs->cmd->opcode == TEST_UNIT_READY ||
- xs->cmd->opcode == REQUEST_SENSE))
- return 0;
-
channel = SIM_CHANNEL(ahc, xs->xs_periph);
our_id = SIM_SCSI_ID(ahc, xs->xs_periph);
target = xs->xs_periph->periph_target;
Home |
Main Index |
Thread Index |
Old Index