Article View: comp.bugs.2bsd
Article #150dhu/dhv bug in 2.9CSS (and Fix)
From: taylor
Date: Thu, 12 Mar 1987 20:58
Date: Thu, 12 Mar 1987 20:58
167 lines
5345 bytes
5345 bytes
Subject: Bug in 2.9CSS dhu driver (with patch)
Index: sys/dev/dhu.c 2.9CSS/Harvard
Description:
The dhu/dhv driver will send very strange characters to the
dhu/dhv terminal (Eg. 30 K's, 25 spaces, ...) when running
on a Q_BUS (Non unibus mapped machine) based machine with
UCB_CLISTS enabled.
Repeat-By:
Configure a kernel with a dhu/dhv and UCB_CLIST enabled.
Fix:
See context diffs included.
*** dhu.c Thu Mar 12 10:46:22 1987
--- dhu.c.orig Fri Feb 13 16:19:19 1987
***************
*** 32,37
extern int hz;
#ifdef UCB_CLIST
extern struct cblock *cfree;
#else UCB_CLIST
--- 32,41 -----
extern int hz;
+ #if defined (UNIBUS_MAP) || defined (UCB_CLIST)
+
+ extern ubadr_t clstaddr;
+
#ifdef UCB_CLIST
extern struct cblock *cfree;
#else UCB_CLIST
***************
*** 38,45
extern struct cblock cfree[];
#endif UCB_CLIST
- #if defined (UNIBUS_MAP) || defined (UCB_CLIST)
- extern ubadr_t clstaddr;
#define cpaddr(x) (clstaddr + (ubadr_t)((x) - cfree))
#else defined (UNIBUS_MAP) || defined (UCB_CLIST)
#define cpaddr(x) ((u_short)(x))
--- 42,47 -----
extern struct cblock cfree[];
#endif UCB_CLIST
#define cpaddr(x) (clstaddr + (ubadr_t)((x) - cfree))
#else defined (UNIBUS_MAP) || defined (UCB_CLIST)
***************
*** 41,46
#if defined (UNIBUS_MAP) || defined (UCB_CLIST)
extern ubadr_t clstaddr;
#define cpaddr(x) (clstaddr + (ubadr_t)((x) - cfree))
#else defined (UNIBUS_MAP) || defined (UCB_CLIST)
#define cpaddr(x) ((u_short)(x))
#endif defined (UNIBUS_MAP) || defined (UCB_CLIST)
--- 43,49 -----
#endif UCB_CLIST
#define cpaddr(x) (clstaddr + (ubadr_t)((x) - cfree))
+
#else defined (UNIBUS_MAP) || defined (UCB_CLIST)
#define cpaddr(x) ((u_short)(x))
#endif defined (UNIBUS_MAP) || defined (UCB_CLIST)
***************
*** 562,568
register struct dhusoftc *sc;
register int line, t;
u_short cntr;
- ubadr_t base;
sc = &dhu_softc[dhu];
tp0 = &dhu11[dhu << NDHUSHIFT];
--- 565,570 -----
register struct dhusoftc *sc;
register int line, t;
u_short cntr;
sc = &dhu_softc[dhu];
tp0 = &dhu11[dhu << NDHUSHIFT];
***************
*** 589,595
*
* In either case, the extension bits are 0.
*/
- #if !defined(UCB_CLIST) || defined(UNIBUS_MAP)
cntr = addr->dhubar1 - cpaddr(tp->t_outq.c_cf);
#else /* defined (UCB_CLIST) && !defined(UNIBUS_MAP) */
base = (ubadr_t) addr->dhubar1
--- 591,596 -----
*
* In either case, the extension bits are 0.
*/
cntr = addr->dhubar1 - cpaddr(tp->t_outq.c_cf);
ndflush(&tp->t_outq,cntr);
}
***************
*** 591,601
*/
#if !defined(UCB_CLIST) || defined(UNIBUS_MAP)
cntr = addr->dhubar1 - cpaddr(tp->t_outq.c_cf);
- #else /* defined (UCB_CLIST) && !defined(UNIBUS_MAP) */
- base = (ubadr_t) addr->dhubar1
- | (ubadr_t) (( addr->dhubar2 & 037) << 16);
- cntr = base - cpaddr(tp->t_outq.c_cf);
- #endif !defined(UCB_CLIST) || defined(UNIBUS_MAP)
ndflush(&tp->t_outq,cntr);
}
#ifndef pdp11
--- 592,597 -----
* In either case, the extension bits are 0.
*/
cntr = addr->dhubar1 - cpaddr(tp->t_outq.c_cf);
ndflush(&tp->t_outq,cntr);
}
#ifndef pdp11
***************
*** 683,689
addr->dhulcr &= ~DHU_LC_TXABORT;
addr->dhubcr = nch;
addr->dhubar1 = loint(car);
- #if !defined(UCB_CLIST) || defined(UNIBUS_MAP)
addr->dhubar2 = (hiint(car) & DHU_BA2_XBA) | DHU_BA2_DMAGO;
#else /* defined (UCB_CLIST) && !defined(UNIBUS_MAP) */
addr->dhubar2 = (hiint(car) & 037) | DHU_BA2_DMAGO;
--- 679,684 -----
addr->dhulcr &= ~DHU_LC_TXABORT;
addr->dhubcr = nch;
addr->dhubar1 = loint(car);
addr->dhubar2 = (hiint(car) & DHU_BA2_XBA) | DHU_BA2_DMAGO;
tp->t_state |= BUSY;
}
***************
*** 685,693
addr->dhubar1 = loint(car);
#if !defined(UCB_CLIST) || defined(UNIBUS_MAP)
addr->dhubar2 = (hiint(car) & DHU_BA2_XBA) | DHU_BA2_DMAGO;
- #else /* defined (UCB_CLIST) && !defined(UNIBUS_MAP) */
- addr->dhubar2 = (hiint(car) & 037) | DHU_BA2_DMAGO;
- #endif !defined(UCB_CLIST) || defined(UNIBUS_MAP)
tp->t_state |= BUSY;
}
out:
--- 680,685 -----
addr->dhubcr = nch;
addr->dhubar1 = loint(car);
addr->dhubar2 = (hiint(car) & DHU_BA2_XBA) | DHU_BA2_DMAGO;
tp->t_state |= BUSY;
}
out:
--
UUCP: sunybcs\ U.S.MAIL: Paul R. Taylor
allegra!warrior\ Systems Programmer
seismo!rochester!rocksvax!oswego!taylor Instructional Computing Center
{batcomputer|gould}!tundra/ Oswego, NY 13126
Technical Details
Message-ID:
<343@oswego.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!rochester!ritcv!rocksvax!oswego!taylorShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!rochester!ritcv!rocksvax!oswego!taylor From: taylor@oswego.UUCP Newsgroups: comp.bugs.2bsd Subject: dhu/dhv bug in 2.9CSS (and Fix) Message-ID: <343@oswego.UUCP> Date: Thu, 12-Mar-87 15:58:48 EST Article-I.D.: oswego.343 Posted: Thu Mar 12 15:58:48 1987 Date-Received: Wed, 25-Mar-87 03:56:22 EST Reply-To: taylor@oswego.UUCP (Paul R. Taylor) Distribution: comp Organization: Instructional Computing Center, SUNY at Oswego, Oswego, NY Lines: 167