Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbosgd!gatech!seismo!umcp-cs!chris From: chris@umcp-cs.UUCP (Chris Torek) Newsgroups: net.unix-wizards Subject: Re: UDA driver query Message-ID: <451@umcp-cs.UUCP> Date: Sun, 23-Mar-86 16:52:36 EST Article-I.D.: umcp-cs.451 Posted: Sun Mar 23 16:52:36 1986 Date-Received: Tue, 25-Mar-86 04:44:10 EST References: <1986@brl-smoke.ARPA> Organization: U of Maryland, Computer Science Dept., College Park, MD Lines: 66 In article <1986@brl-smoke.ARPA> eichelbe@nadc.arpa writes: >I have a VAX 11/780 under 4.1 BSD UNIX and [a] (UDA50/RA81) driver >that compiles but for one error. In the routine udprobe ... there >is a reference to a variable uh_lastiv in the uba_hd structure. ... >I don't find a uh_lastiv in the structure. Ah, at last, I can show off my wizardly skills again! :-) Actually, I had the exact same thing happen when I installed a uda.c on a 4.1 system, long ago. >(1) What is uh_lastiv supposed to do? It is the `last interrupt vector' address, for devices with programmable interrupt vectors. These did not appear until well after the 4.1 release, so only `late 4.1s' have the code. The variable is set to 0x200 (01000) in autoconf.c, and predecremented by the appropriate amount by any driver needing a programmable interrupt vector. >(2) Can I (and how if I can) change udprobe to get rid of the uh_lastiv > reference safely? If you have exactly one UDA50, no DMF32s, no DMZ32s, and so forth, you can use br = 0x15; cvec = sc->sc_ivec = 0774; but this creates a bug just waiting until the time is ripe to leap out and strangle you. >(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 .... 1) Add `uh_lastiv' to `struct uba_hd' in ubavar.h (at the end; that may be unnecessary, but is definitely safe). 2) In autoconf.c, find the routine named `unifind' or `UNIfind' or some variation thereof. In there will be code resembling the following: if (numuba == 0) uhp->uh_vec = UNIvec; else uhp->uh_vec = (int(**)())calloc(512); for (i = 0; i < 128; i++) uhp->uh_vec[i] = scbentry(&catcher[i*2], SCB_ISTACK); After this, add: /* * Set last free interrupt vector for devices with * programmable interrupt vectors. Use is to decrement * this number and use result as interrupt vector. */ uhp->uh_lastiv = 0x200; Unfortunately, that uda.c is fairly buggy. If I had to run RA81s on a 4.1 system, I would reconvert my new driver to 4.1 code. But if you must run that driver on a 780, use it on a Unibus all by itself, or at least with nothing else that uses BDPs. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1415) UUCP: seismo!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@mimsy.umd.edu