Xref: utzoo comp.unix.wizards:10509 comp.unix.questions:8842
Path: utzoo!utgpu!water!watmath!clyde!att!rutgers!gatech!ncar!oddjob!mimsy!chris
From: chris@mimsy.UUCP (Chris Torek)
Newsgroups: comp.unix.wizards,comp.unix.questions
Subject: Re: two interrupt service routines
Keywords: double vector, driver question
Message-ID: <13040@mimsy.UUCP>
Date: 17 Aug 88 11:38:58 GMT
References: <3486@phoenix.Princeton.EDU>
Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742
Lines: 31

In article <3486@phoenix.Princeton.EDU> paul@phoenix.Princeton.EDU
(Paul Lansky) writes:
>I have a device which is capable of interrupting to two different
>interrupt vectors.  How do I write a probe routine in the driver
>(under Ultrix 2.0 or 4.3) ...?  The device is the Dec DRQ3B DMA
>card, by the way.

While I am not familiar with that particular card, most if not all
DEC hardware that uses multiple vectors also uses adjacent vectors.
What you must do is arrange for an interrupt to occur at the lowest
numbered vector.  If the vector(s) is/are programmable, one uses
uba_hd[uban].uh_lastiv to select the vectors; in that case, it may
not be necessary to have the device interrupt, although it will not
hurt.

If for some reason it is inconvenient or impossible to make the device
interrupt at its lowest vector, use some other vector, then adjust
`cvec' afterward by the difference:

		addr->foo_csr = FOO_MAINT_INTR;
		DELAY(1000);
		addr->foo_csr = 0;
		if (cvec && cvec != 0x200)
			cvec -= 4;	/* 1 vector's worth */

Note that in recent Ultrix kernels, br and cvec must NOT be
declared in the probe routine, while in 4.xBSD kernels, they
MUST be the first two register variables.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris@mimsy.umd.edu	Path:	uunet!mimsy!chris