Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic In siop_setuptables(), use the proposed tag_id, n...



details:   https://anonhg.NetBSD.org/src/rev/1b63a6fa4d05
branches:  trunk
changeset: 525948:1b63a6fa4d05
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Mon Apr 22 09:43:44 2002 +0000

description:
In siop_setuptables(), use the proposed tag_id, not tag_id +1.
In siop.c bump siop_cmd->tag by one as tag id 0 is reserved for untagged cmds.

diffstat:

 sys/dev/ic/siop.c        |  9 +++++++--
 sys/dev/ic/siop_common.c |  6 +++---
 2 files changed, 10 insertions(+), 5 deletions(-)

diffs (57 lines):

diff -r cd1ab39c2a8e -r 1b63a6fa4d05 sys/dev/ic/siop.c
--- a/sys/dev/ic/siop.c Mon Apr 22 09:41:19 2002 +0000
+++ b/sys/dev/ic/siop.c Mon Apr 22 09:43:44 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: siop.c,v 1.53 2002/04/20 00:15:54 bouyer Exp $ */
+/*     $NetBSD: siop.c,v 1.54 2002/04/22 09:43:44 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.53 2002/04/20 00:15:54 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siop.c,v 1.54 2002/04/22 09:43:44 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1372,6 +1372,11 @@
                    BUS_DMASYNC_PREWRITE);
 
                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 -r cd1ab39c2a8e -r 1b63a6fa4d05 sys/dev/ic/siop_common.c
--- a/sys/dev/ic/siop_common.c  Mon Apr 22 09:41:19 2002 +0000
+++ b/sys/dev/ic/siop_common.c  Mon Apr 22 09:43:44 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: siop_common.c,v 1.17 2002/04/20 00:15:54 bouyer Exp $  */
+/*     $NetBSD: siop_common.c,v 1.18 2002/04/22 09:43:44 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.17 2002/04/20 00:15:54 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siop_common.c,v 1.18 2002/04/22 09:43:44 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -161,7 +161,7 @@
                siop_cmd->siop_tables->msg_out[2] = siop_cmd->xs->xs_tag_id + 1;
                siop_cmd->siop_tables->t_msgout.count = htole32(3);
                msgoffset = 3;
-               siop_cmd->tag = siop_cmd->xs->xs_tag_id + 1;
+               siop_cmd->tag = siop_cmd->xs->xs_tag_id;
        } else
                siop_cmd->tag = 0;
        if (sc->targets[target]->status == TARST_ASYNC) {



Home | Main Index | Thread Index | Old Index