pnp code and irq 2 problem

From: John Hay <jhay_at_icomtek.csir.co.za>
Date: Thu, 24 Jul 2003 08:20:34 +0200
Hi,

Somewhere along the line the code in FreeBSD that maps irq 2 to irq 9 has
gone away and a panic was added if one tries to use irq 2. This is all
well and fine, except that the pnp code was not notified of this. :-) So
if you have a pnp device that have irq 2 in its mask and FreeBSD then
decides that irq 2 is a good irq to use for this device, you have an
instant panic.

I have worked around it with this crude patch below. Crude because:
1) I don't know if it should be an i386 only fix, and
2) I used 0x04 directly, maybe IRQ_SLAVE from i386/isa/icu.h or
some other difine should be used?

John
-- 
John Hay -- John.Hay_at_icomtek.csir.co.za / jhay_at_FreeBSD.org


Index: isa/pnpparse.c
===================================================================
RCS file: /home/ncvs/src/sys/isa/pnpparse.c,v
retrieving revision 1.13
diff -u -r1.13 pnpparse.c
--- isa/pnpparse.c	16 Oct 2002 09:07:30 -0000	1.13
+++ isa/pnpparse.c	19 Jun 2003 06:00:02 -0000
_at__at_ -110,7 +110,8 _at__at_
 			if (bootverbose)
 				pnp_printf(id, "adding irq mask %#02x\n",
 					   I16(res));
-			config->ic_irqmask[config->ic_nirq] = I16(res);
+			config->ic_irqmask[config->ic_nirq] = I16(res) &
+			    ~0x04;
 			config->ic_nirq++;
 			break;
 
Received on Wed Jul 23 2003 - 21:20:41 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:16 UTC