Is *your* Unibus Device Driver wrong?
chris at eneevax.UUCP
chris at eneevax.UUCP
Sat Feb 4 11:32:37 AEST 1984
I wonder if this particular problem is ubiquitous. I've seen it in two
4.1BSD device drivers now.
Index: Unibus Device Drivers: uda.c, ts.c; Fix
Description:
After a Unibus reset, the console prints "IVMR" errors every
once in a while. (IVMR is InValid Map Register). This is
caused by a Unibus device that mapped itself to the Unibus and
thinks it's still mapped. Typically there is an "sc_mapped"
field in the structure describing the device which is not being
cleared.
Repeat-By:
Reset the Unibus after using the UDA50 or TS11. Try to use it
again.
Fix:
In uda.c and in ts.c the "xx_softc" structure has a field
called "sc_mapped"; this should be cleared in the reset
routine.
This seems to be a ``general'' bug. The Unibus reset code clears the
UBA map, but the drivers don't know that. I imagine someone forgot to
clear sc_mapped in one driver, and every driver since then was written
by first copying the buggy code and then modifying it for the
particular device. (Interestingly, there is code in ubarelse() to check
for zeros and ignore the release. I suppose this is useful for devices
which release their UBA resources as soon as they've finished their
I/O, but it also serves well to hide this other bug.)
--
Chris Torek, Dept of CS, Univeristy of Maryland, College Park, MD
...!umcp-cs!chris chris%umcp-cs at CSNet-Relay
More information about the Comp.unix.wizards
mailing list