Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci undo the non-script changes from rev 1.87. They...



details:   https://anonhg.NetBSD.org/src/rev/b21b8fd8f0c0
branches:  trunk
changeset: 483770:b21b8fd8f0c0
user:      cgd <cgd%NetBSD.org@localhost>
date:      Sat Mar 18 06:47:28 2000 +0000

description:
undo the non-script changes from rev 1.87.  They caused problems in
1.4.x and i have concerns (but no concrete proof) they will cause/have caused
problems in -current as well.  Really, the right way to fix this is to
rewrite the driver, and push up tagged queueing handling into a common
middle layer that'll do it right in a low-level-driver-independent manner.
I'll fix my particular issues by using the ncr driver quirk mechanism.

diffstat:

 sys/dev/pci/ncr.c |  43 ++-----------------------------------------
 1 files changed, 2 insertions(+), 41 deletions(-)

diffs (75 lines):

diff -r 6afb0b43fd29 -r b21b8fd8f0c0 sys/dev/pci/ncr.c
--- a/sys/dev/pci/ncr.c Sat Mar 18 02:41:58 2000 +0000
+++ b/sys/dev/pci/ncr.c Sat Mar 18 06:47:28 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ncr.c,v 1.95 2000/03/17 11:30:14 soren Exp $   */
+/*     $NetBSD: ncr.c,v 1.96 2000/03/18 06:47:28 cgd Exp $     */
 
 /**************************************************************************
 **
@@ -1532,7 +1532,7 @@
 
 #if 0
 static char ident[] =
-       "\n$NetBSD: ncr.c,v 1.95 2000/03/17 11:30:14 soren Exp $\n";
+       "\n$NetBSD: ncr.c,v 1.96 2000/03/18 06:47:28 cgd Exp $\n";
 #endif
 
 static const u_long    ncr_version = NCR_VERSION       * 11
@@ -5843,19 +5843,8 @@
        tmp = lp->actlink;
        if (tmp < reqtags) tmp = reqtags;
        lp->reqccbs = tmp;
-
-#if 0
-       /*
-        * XXX unless we do this, we'll end up wasting ccbs (since
-        * XXX they are never freed back to the system), but wasting
-        * XXX CCBs is better than keeping reqlink high, because that
-        * XXX allows high numbers of tags to continue to be used...
-        * XXX which in turn prevents 'queue full' problems from ever
-        * XXX being solved.
-        */
        if (lp->reqlink < lp->reqccbs)
                lp->reqlink = lp->reqccbs;
-#endif
 }
 
 /*----------------------------------------------------
@@ -7254,36 +7243,8 @@
 
                /*
                **      Try to disable tagged transfers.
-               **
-               **      XXX The right thing to do here is to back off
-               **      XXX gracefully, i.e. issue one fewer command
-               **      XXX at a time, since this command should be
-               **      XXX triggered by the first command beyond what
-               **      XXX the device can handle.
-               **      XXX
-               **      XXX However, that doesn't work right now, because
-               **      XXX of a combination of two bugs: some (Quantum)
-               **      XXX drives seem to interpret the tags (tags are
-               **      XXX supposed to be opaque) and reject tags over
-               **      XXX a certain number, and this driver doesn't free
-               **      XXX 'extra' CCBs which will never be used for
-               **      XXX transfters (based on the fact that there are
-               **      XXX more CCBs than tags allowed).
-               **      XXX
-               **      XXX Therefore, though it costs performance on
-               **      XXX some drives that could do better, for hardware
-               **      XXX compatibility we just disable tagged queueing
-               **      XXX when we see a QUEUE FULL message.
-               **      XXX
-               **      XXX This driver should be shot from a cannon.
                */
-#if 0 /* XXX this, or something like it, is better, but doesn't work */
-               assert(cp->tag);
-               if (cp->tag) /* XXX should be a better way than cp->tag - 1 */
-                       ncr_setmaxtags (&np->target[target], cp->tag - 1);
-#else
                ncr_setmaxtags (&np->target[target], 0);
-#endif
 
                /*
                ** @QUEUE@



Home | Main Index | Thread Index | Old Index