diff options
| author | bouyer <bouyer@NetBSD.org> | 2002-04-22 15:48:55 +0000 |
|---|---|---|
| committer | bouyer <bouyer@NetBSD.org> | 2002-04-22 15:48:55 +0000 |
| commit | e3f96dde51c8ae2102454e540e156f652302adf0 (patch) | |
| tree | 75f2e90cfa5195e9323eae9cdf529bc61b0bc359 /sys/dev | |
| parent | 458fca4e6a9c884fff8f7cdb414f1f2105a6dcb9 (diff) | |
Fix last change: assign siop_cmd->tag in callers instead of siop_setuptables(),
and use siop_cmd->tag instead of xs->xs_tag_id. This way siop can use
xs->xs_tag_id + 1 without interferences with esiop.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ic/siop.c | 15 | ||||
| -rw-r--r-- | sys/dev/ic/siop_common.c | 11 |
2 files changed, 15 insertions, 11 deletions
diff --git a/sys/dev/ic/siop.c b/sys/dev/ic/siop.c index 8d5d5abf33d..f7c80492031 100644 --- a/sys/dev/ic/siop.c +++ b/sys/dev/ic/siop.c @@ -1,4 +1,4 @@ -/* $NetBSD: siop.c,v 1.54 2002/04/22 09:43:44 bouyer Exp $ */ +/* $NetBSD: siop.c,v 1.55 2002/04/22 15:48:55 bouyer Exp $ */ /* * Copyright (c) 2000 Manuel Bouyer. @@ -33,7 +33,7 @@ /* SYM53c7/8xx PCI-SCSI I/O Processors driver */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: siop.c,v 1.54 2002/04/22 09:43:44 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: siop.c,v 1.55 2002/04/22 15:48:55 bouyer Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1371,12 +1371,13 @@ siop_scsipi_request(chan, req, arg) siop_cmd->cmd_c.dmamap_cmd->dm_mapsize, BUS_DMASYNC_PREWRITE); + if (xs->xs_tag_type) { + /* use tag_id + 1, tag 0 is reserved for untagged cmds*/ + siop_cmd->cmd_c.tag = xs->xs_tag_id + 1; + } else { + siop_cmd->cmd_c.tag = 0; + } siop_setuptables(&siop_cmd->cmd_c); - /* we want tag to start at 1 for tagged commands (0 reserved - * for untagged - */ - if (siop_cmd->cmd_c.flags & CMDFL_TAG) - siop_cmd->cmd_c.tag++; siop_table_sync(siop_cmd, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); siop_start(sc, siop_cmd); diff --git a/sys/dev/ic/siop_common.c b/sys/dev/ic/siop_common.c index 34732eb1586..fa023c921a2 100644 --- a/sys/dev/ic/siop_common.c +++ b/sys/dev/ic/siop_common.c @@ -1,4 +1,4 @@ -/* $NetBSD: siop_common.c,v 1.18 2002/04/22 09:43:44 bouyer Exp $ */ +/* $NetBSD: siop_common.c,v 1.19 2002/04/22 15:48:56 bouyer Exp $ */ /* * Copyright (c) 2000 Manuel Bouyer. @@ -33,7 +33,7 @@ /* SYM53c7/8xx PCI-SCSI I/O Processors driver */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: siop_common.c,v 1.18 2002/04/22 09:43:44 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: siop_common.c,v 1.19 2002/04/22 15:48:56 bouyer Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -158,10 +158,13 @@ siop_setuptables(siop_cmd) } siop_cmd->flags |= CMDFL_TAG; siop_cmd->siop_tables->msg_out[1] = siop_cmd->xs->xs_tag_type; - siop_cmd->siop_tables->msg_out[2] = siop_cmd->xs->xs_tag_id + 1; + /* + * use siop_cmd->tag not xs->xs_tag_id, caller may want a + * different one + */ + siop_cmd->siop_tables->msg_out[2] = siop_cmd->tag; siop_cmd->siop_tables->t_msgout.count = htole32(3); msgoffset = 3; - siop_cmd->tag = siop_cmd->xs->xs_tag_id; } else siop_cmd->tag = 0; if (sc->targets[target]->status == TARST_ASYNC) { |
