UDA driver query
eichelbe at nadc.arpa
eichelbe at nadc.arpa
Sat Mar 22 00:58:53 AEST 1986
---
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.)
---
udprobe(reg, ctlr)
caddr_t reg;
int ctlr;
{
register int br, cvec;
register struct uda_softc *sc = &uda_softc[ctlr];
#ifdef lint
br = 0; cvec = br; br = cvec;
#endif
/* SHOULD CHECK THAT IT REALLY IS A UDA */
br = 0x15;
cvec = sc->sc_ivec = (uba_hd[numuba].uh_lastiv -= 4);
return(1);
}
---
Oh, and here's uba_hd, extracted from /sys/h/ubavar.h.
---
struct uba_hd {
struct uba_regs *uh_uba; /* virt addr of uba */
struct uba_regs *uh_physuba; /* phys addr of uba */
int (**uh_vec)(); /* interrupt vector */
struct uba_device *uh_actf; /* head of queue to transfer */
struct uba_device *uh_actl; /* tail of queue to transfer */
short uh_mrwant; /* someone is waiting for map reg */
short uh_bdpwant; /* someone awaits bdp's */
int uh_bdpfree; /* free bdp's */
int uh_hangcnt; /* number of ticks hung */
int uh_zvcnt; /* number of 0 vectors */
short uh_users; /* transient bdp use count */
short uh_xclu; /* an rk07 is using this uba! */
#define UAMSIZ 25
struct map *uh_map; /* buffered data path regs free */
};
---
Thanks.
Jon Eichelberger
eichelbe at NADC.ARPA
More information about the Comp.unix.wizards
mailing list