Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/dev/ic Pull up tagged queueing policy changes: now ...



details:   https://anonhg.NetBSD.org/src/rev/b96ef4f32db5
branches:  netbsd-1-5
changeset: 489069:b96ef4f32db5
user:      tls <tls%NetBSD.org@localhost>
date:      Fri Aug 11 22:24:44 2000 +0000

description:
Pull up tagged queueing policy changes: now we use ordered tags for sync writes, simple tags for reads and async writes.

diffstat:

 sys/dev/ic/adv.c        |  7 +++++--
 sys/dev/ic/aic7xxx.c    |  7 +++++--
 sys/dev/ic/isp.c        |  8 ++++++--
 sys/dev/ic/isp_netbsd.h |  5 +++--
 4 files changed, 19 insertions(+), 8 deletions(-)

diffs (83 lines):

diff -r 6fed63e42dcf -r b96ef4f32db5 sys/dev/ic/adv.c
--- a/sys/dev/ic/adv.c  Fri Aug 11 22:06:19 2000 +0000
+++ b/sys/dev/ic/adv.c  Fri Aug 11 22:24:44 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: adv.c,v 1.16 2000/03/23 07:01:28 thorpej Exp $ */
+/*     $NetBSD: adv.c,v 1.16.4.1 2000/08/11 22:24:44 tls Exp $ */
 
 /*
  * Generic driver for the Advanced Systems Inc. Narrow SCSI controllers
@@ -663,7 +663,10 @@
            (sc->reqcnt[sc_link->scsipi_scsi.target] % 255) == 0) {
                ccb->scsiq.q2.tag_code = M2_QTAG_MSG_ORDERED;
        } else {
-               ccb->scsiq.q2.tag_code = M2_QTAG_MSG_SIMPLE;
+               if((xs->bp != NULL) && xs->bp->b_flags & B_ASYNC)
+                       ccb->scsiq.q2.tag_code = M2_QTAG_MSG_SIMPLE;
+               else
+                       ccb->scsiq.q2.tag_code = M2_QTAG_MSG_ORDERED;
        }
 
 
diff -r 6fed63e42dcf -r b96ef4f32db5 sys/dev/ic/aic7xxx.c
--- a/sys/dev/ic/aic7xxx.c      Fri Aug 11 22:06:19 2000 +0000
+++ b/sys/dev/ic/aic7xxx.c      Fri Aug 11 22:24:44 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aic7xxx.c,v 1.55.2.2 2000/06/30 00:01:25 thorpej Exp $ */
+/*     $NetBSD: aic7xxx.c,v 1.55.2.3 2000/08/11 22:24:45 tls Exp $     */
 
 /*
  * Generic driver for the aic7xxx based adaptec SCSI controllers
@@ -4015,7 +4015,10 @@
        hscb->tcl = tcl;
 
        if (ahc_istagged_device(ahc, xs, 0))
-               scb->hscb->control |= MSG_SIMPLE_Q_TAG;
+               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
                ahc_busy_tcl(ahc, scb);
 
diff -r 6fed63e42dcf -r b96ef4f32db5 sys/dev/ic/isp.c
--- a/sys/dev/ic/isp.c  Fri Aug 11 22:06:19 2000 +0000
+++ b/sys/dev/ic/isp.c  Fri Aug 11 22:24:44 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isp.c,v 1.53 2000/06/03 22:44:43 fair Exp $ */
+/* $NetBSD: isp.c,v 1.53.2.1 2000/08/11 22:24:46 tls Exp $ */
 /*
  * Copyright (C) 1997, 1998, 1999 National Aeronautics & Space Administration
  * All rights reserved.
@@ -2168,7 +2168,11 @@
                        if (XS_CDBP(xs)[0] == 0x3)      /* REQUEST SENSE */
                                t2reqp->req_flags = REQFLAG_HTAG;
                        else
-                               t2reqp->req_flags = REQFLAG_OTAG;
+                               if((xs->bp != NULL) && 
+                                   xs->bp->b_flags & B_ASYNC)
+                                       t2reqp->req_flags = REQFLAG_STAG;
+                               else
+                                       t2reqp->req_flags = REQFLAG_OTAG;
                }
        } else {
                sdparam *sdp = (sdparam *)isp->isp_param;
diff -r 6fed63e42dcf -r b96ef4f32db5 sys/dev/ic/isp_netbsd.h
--- a/sys/dev/ic/isp_netbsd.h   Fri Aug 11 22:06:19 2000 +0000
+++ b/sys/dev/ic/isp_netbsd.h   Fri Aug 11 22:24:44 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isp_netbsd.h,v 1.23 2000/03/23 07:01:31 thorpej Exp $ */
+/* $NetBSD: isp_netbsd.h,v 1.23.4.1 2000/08/11 22:24:48 tls Exp $ */
 /*
  * NetBSD Specific definitions for the Qlogic ISP Host Adapter
  * Matthew Jacob <mjacob%nas.nasa.gov@localhost>
@@ -177,7 +177,8 @@
  * This is our default tag (simple).
  */
 #define        XS_KINDOF_TAG(xs)       \
-       (((xs)->xs_control & XS_CTL_URGENT) ? REQFLAG_HTAG : REQFLAG_OTAG)
+       (((xs)->xs_control & XS_CTL_URGENT) ? REQFLAG_HTAG : \
+       ((xs)->bp && xs->bp->b_flags & B_ASYNC) ? REQFLAG_STAG : REQFLAG_OTAG)
 
 /*
  * These get turned into NetBSD midlayer codes



Home | Main Index | Thread Index | Old Index