UDA driver query

Ed Gould ed at mtxinu.UUCP
Tue Mar 25 08:43:48 AEST 1986


In article <1986 at brl-smoke.ARPA> eichelbe at nadc.arpa writes:
>---
>Here's a problem that asks wizards to test out their long-term memory.
>I have a VAX 11/780 under 4.1 BSD UNIX and I have a version of a supposedly
>4.1 BSD UNIX uda.c (UDA50/RA81) driver that compiles but for one error.
>In the routine udprobe (which is shown below) there is a reference to
>a variable uh_lastiv in the uba_hd structure.  This structure is in the header
>file /sys/h/ubavar.h, but I don't find a uh_lastiv in the structure.  Here come
>the questions:
>(1) What is uh_lastiv supposed to do?
>(2) Can I (and how if I can) change udprobe to get rid of the uh_lastiv
>    reference safely?
>(3) If I can't get rid of the reference, how should I change the uba_hd
>    structure in /sys/h/ubavar.h so I too can use uh_lastiv, and if I do this
>    will I have to change any code anywhere else in the kernel, etc. ?
>    (This last part, about changes to other code, is important since I am
>     really at a loss here.  If someone could just do a grep for uh_lastiv
>     through the system code if you have uh_lastiv in your /sys/h/ubavar.h.)

It sounds like you really have a 4.2 driver.  4.1 didn't have uh_lastiv,
nor did it support UDA50's or DMF32's or any other devices with software-
programmable interrupt vectors.  Uh_lastiv (last interrupt vector) was
added to support these kind of devices.  It is initialized to 01000 before
autoconfiguration starts.  When it's needed, as in the UDA probe routine,
it is decremented by the size of the vector space (4 for the UDA), and
the result is handed to the device to use as its interrupt vector:

	cvec = sc->sc_ivec = (uba_hd[numuba].uh_lastiv -= 4);

(sc_ivec is later handed to the device; cvec is the return-in-register
from probe).

-- 
Ed Gould                    mt Xinu, 2910 Seventh St., Berkeley, CA  94710  USA
{ucbvax,decvax}!mtxinu!ed   +1 415 644 0146

"A man of quality is not threatened by a woman of equality."



More information about the Comp.unix.wizards mailing list