Source-Changes-HG archive

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

[src/thorpej_scsipi]: src/sys/dev/scsipi When we send a untagged command, blo...



details:   https://anonhg.NetBSD.org/src/rev/046c4262cec7
branches:  thorpej_scsipi
changeset: 477461:046c4262cec7
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Tue Apr 03 15:27:18 2001 +0000

description:
When we send a untagged command, block the queue until this command is
complete.

diffstat:

 sys/dev/scsipi/scsipi_base.c |  9 +++++++--
 sys/dev/scsipi/scsipiconf.h  |  3 ++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diffs (54 lines):

diff -r 0626b680a83e -r 046c4262cec7 sys/dev/scsipi/scsipi_base.c
--- a/sys/dev/scsipi/scsipi_base.c      Tue Apr 03 10:05:31 2001 +0000
+++ b/sys/dev/scsipi/scsipi_base.c      Tue Apr 03 15:27:18 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsipi_base.c,v 1.26.2.12 2001/03/28 09:39:40 bouyer Exp $     */
+/*     $NetBSD: scsipi_base.c,v 1.26.2.13 2001/04/03 15:27:18 bouyer Exp $     */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -1073,6 +1073,8 @@
         */
        if (XS_CTL_TAGTYPE(xs) != 0)
                scsipi_put_tag(xs);
+       else
+               periph->periph_flags &= ~PERIPH_UNTAG;
 
        /* Mark the command as `done'. */
        xs->xs_status |= XS_STS_DONE;
@@ -1539,7 +1541,8 @@
                     xs = TAILQ_NEXT(xs, channel_q)) {
                        periph = xs->xs_periph;
 
-                       if ((periph->periph_active > periph->periph_openings) ||                            periph->periph_qfreeze != 0)
+                       if ((periph->periph_active > periph->periph_openings) ||                            periph->periph_qfreeze != 0 ||
+                           (periph->periph_flags & PERIPH_UNTAG) != 0)
                                continue;
 
                        if ((periph->periph_flags &
@@ -1601,6 +1604,8 @@
                 */
                if (XS_CTL_TAGTYPE(xs) != 0)
                        scsipi_get_tag(xs);
+               else
+                       periph->periph_flags |= PERIPH_UNTAG;
                splx(s);
 
                scsipi_adapter_request(chan, ADAPTER_REQ_RUN_XFER, xs);
diff -r 0626b680a83e -r 046c4262cec7 sys/dev/scsipi/scsipiconf.h
--- a/sys/dev/scsipi/scsipiconf.h       Tue Apr 03 10:05:31 2001 +0000
+++ b/sys/dev/scsipi/scsipiconf.h       Tue Apr 03 15:27:18 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsipiconf.h,v 1.32.2.11 2001/03/27 15:32:16 bouyer Exp $      */
+/*     $NetBSD: scsipiconf.h,v 1.32.2.12 2001/04/03 15:27:18 bouyer Exp $      */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -405,6 +405,7 @@
 #define        PERIPH_RECOVERY_ACTIVE  0x0100  /* a recovery command is active */
 #define PERIPH_KEEP_LABEL      0x0200  /* retain label after 'full' close */
 #define        PERIPH_SENSE            0x0400  /* periph has sense pending */
+#define PERIPH_UNTAG           0x0800  /* untagged command running */
 
 /* periph_quirks */
 #define        PQUIRK_AUTOSAVE         0x00000001      /* do implicit SAVE POINTERS */



Home | Main Index | Thread Index | Old Index