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.
This commit is contained in:
cgd 2000-03-18 06:47:28 +00:00
parent d926d6fa47
commit 52b7212c58
1 changed files with 2 additions and 41 deletions

View File

@ -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 @@ static int read_tekram_eeprom
#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 @@ static void ncr_settags (tcb_p tp, lcb_p lp, u_long usrtags)
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 @@ void ncr_int_sir (ncb_p np)
/*
** 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@