Subject: port-i386/6642: PNP assigned IRQ conflicts with legacy ISA card.
To: None <gnats-bugs@gnats.netbsd.org>
From: Martin J. Laubach <mjl@emsi.priv.at>
List: netbsd-bugs
Date: 12/24/1998 02:32:41
>Number:         6642
>Category:       port-i386
>Synopsis:       The pnp assigned int 5 conflicts with legacy isa COM port
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 23 17:35:01 1998
>Last-Modified:
>Originator:     Martin J. Laubach
>Organization:
	
>Release:        1.3.3
>Environment:
	
System: NetBSD asparagus 1.3.3 NetBSD 1.3.3 (ASPARAGUS) #3: Thu Dec 24 01:42:49 CET 1998 mjl@asparagus:/home/temp/devel/kernel/sys/arch/i386/compile/ASPARAGUS i386


>Description:
  I have a machine with 3 serial ports, and a Sound blaster isapnp card.
The PNP code in the kernel assigns an interrupt used by one of the serial
ports to the SB -- and as we all know, com ports don't share interrupts
easily.

  Note that marking the interrupt as being "used by ISA" in the BIOS
did not help.

>How-To-Repeat:

  Try to keep an int away from pnp cards.

>Fix:

  Include the code below, and you can use a line like

	options ISAPNP_INT_MASK=0xff80

  to keep those interrupts from being assigned by pnp.


*** dev/isapnp/isapnp.c.orig	Thu Dec 24 02:29:19 1998
--- dev/isapnp/isapnp.c	Thu Dec 24 01:22:36 1998
***************
*** 238,244 ****
  		return 0;
  	}
  
! 	if (isa_intr_alloc(ic, i->bits, i->type, &irq) == 0) {
  		i->num = irq;
  		return 0;
  	}
--- 238,249 ----
  		return 0;
  	}
  
! #ifndef ISAPNP_INT_MASK
! #define ISAPNP_INT_MASK 0
! #endif
! 
! 	if (isa_intr_alloc(ic, ISAPNP_INT_MASK & i->bits, i->type, &irq) == 0) {
  		i->num = irq;
  		return 0;
  	}
>Audit-Trail:
>Unformatted: