Subject: Re: how to stop isapnp interrupt sharing?
To: John Kohl <jtk@kolvir.arlington.ma.us>
From: Rick Byers <rickb@iaw.on.ca>
List: port-i386
Date: 01/03/1999 14:13:56
Hi,
I've been having the same problem.  I just made a minor change in
isa_machdep.c to prevent any type of IRQ sharing and everything works fine
now.  Just apply this patch to /sys/arch/i386/isa/isa_machdep.c (in
-current as of Jan 2) and add "options
ISA_NOIRQSHARE" to your kernel.

*** isa_machdep.c.orig	Sun Jan  3 13:18:02 1999
--- isa_machdep.c	Sun Jan  3 13:43:22 1999
***************
*** 351,357 ****
--- 351,360 ----
  	int *irq;
  {
  	int i, tmp, bestirq, count;
+ 
+ #ifndef ISA_NOIRQSHARE
  	struct intrhand **p, *q;
+ #endif
  
  	if (type == IST_NONE)
  		panic("intr_alloc: bogus type");
***************
*** 382,387 ****
--- 385,394 ----
  
  		case IST_EDGE:
  		case IST_LEVEL:
+ #ifdef ISA_NOIRQSHARE
+ 			/* don't share any IRQs */
+ 			continue;
+ #else
  			if (type != intrtype[i])
  				continue;
  			/*
***************
*** 401,406 ****
--- 408,414 ----
  				count = tmp;
  			}
  			break;
+ #endif
  
  		case IST_PULSE:
  			/* this just isn't shareable */


Hope this helps,
	Rick

 On Wed, 30 Dec 1998, John Kohl wrote:

> Date: Wed, 30 Dec 1998 13:52:04 -0500 (EST)
> From: John Kohl <jtk@kolvir.arlington.ma.us>
> To: port-i386@netbsd.org
> Subject: how to stop isapnp interrupt sharing?
> 
> I have a machine with two isapnp devices in it now (ne2000 clone,
> on-board CS4236B).
> 
> The isapnp code assigns them the same IRQ, on the belief that they'll
> share nicely.  However, neither device works properly when this happens.
> I had to severely beat sys/dev/isapnp/isapnp.c upside the head to force
> the cards onto separate IRQs.
> 
> Is there some supported way to force isapnp cards to use different
> interrupts?  (Maybe make this the default, so that installations have a
> better chance of working in such an environment?)
> 
> Dec 29 21:02:16 kolvir /netbsd: isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
> ...
> Dec 29 21:02:16 kolvir /netbsd: isapnp0: read port 0x203
> Dec 29 21:02:16 kolvir /netbsd: ne0 at isapnp0 port 0x240/32 irq 5
> Dec 29 21:02:16 kolvir /netbsd: ne0: NE2000 Ethernet
> Dec 29 21:02:16 kolvir /netbsd: ne0: Ethernet address 00:40:05:4f:70:44
> Dec 29 21:02:16 kolvir /netbsd: wss0 at isapnp0 port 0x534/4,0x388/4,0x220/16 irq 5 drq 1,0
> Dec 29 21:02:16 kolvir /netbsd: wss0: CS4236B WSS/SB: CS4236/CS4236B
> Dec 29 21:02:16 kolvir /netbsd: audio0 at wss0
> Dec 29 21:02:16 kolvir /netbsd: joy0 at isapnp0 port 0x200/8
> Dec 29 21:02:16 kolvir /netbsd: joy0: CS4236B Game
> Dec 29 21:02:16 kolvir /netbsd: joy0: joystick not connected
> Dec 29 21:02:16 kolvir /netbsd: isapnp0: <CS4236B, CSC0010, , Ctrl> port 0x120/8 not configured
> Dec 29 21:02:16 kolvir /netbsd: isapnp0: <CS4236B, CSC0003, , MPU> port 0x330/2 irq 10 not configured
> Dec 29 21:02:24 kolvir /netbsd: ne0: device timeout
> [etc.]
> 
> -- 
> ==John Kohl <jtk@kolvir.arlington.ma.us>, <john_kohl@alum.mit.edu>
> Write a poem, share your heart!
> Home page: <URL:http://people.ne.mediaone.net/jtk/>
> Note new home zip code as of July 1, 1998: 02476
> 

=========================================================================
Rick Byers                       University of Waterloo, Computer Science
rickb@iaw.on.ca                               http://www.iaw.on.ca/rickb/