Subject: Re: "IRQ not configured"
To: None <seebs@plethora.net>
From: Masanori Kanaoka <kanaoka@ann.hi-ho.ne.jp>
List: port-i386
Date: 12/31/2001 09:56:33
Hi,

       From: seebs@plethora.net (Peter Seebach)
    Subject: "IRQ not configured"
      Date : Sun, 30 Dec 2001 11:11:43 -0600
 Message-ID: <200112301711.fBUHBhP01391@guild.plethora.net>

$ So, I have a machine that has problems with cardbus because it claims the IRQ
$ isn't configured.  I have enclosed the verbose BIOS output, and the thing that
$ catches my eye is that it looks like the IRQ *is* configured - but, for some
$ reason, NetBSD doesn't like this.  It's worth noticing that all the gizmos on
$ this machine are on IRQ 11, and under Windows, it also has the cardbus slot on
$ IRQ 11.


$ NetBSD 1.5ZA (ANNE) #1: Sun Dec 30 12:43:11 MST 2001

 <..snip..>

$ using 2426 buffers containing 9704 KB of memory
$ BIOS32 rev. 0 found at 0xfd720
$ PCI BIOS rev. 2.1 found at 0xfd83e
$ pcibios: config mechanism [1][x], special cycles [x][x], last bus 1
$ PCI IRQ Routing Table rev. 1.0 found at 0xfdf70, size 112 bytes (5 entries)
$ PCI Interrupt Router at 000:07:0 (VIA Technologies VT82C596A (Apollo Pro) PCI-ISA Bridge)
$ pciintr_link_alloc: bus 0 device 10: link 0x05 invalid
$ pciintr_link_alloc: bus 0 device 7: link 0x05 invalid

  1. sys/arch/i386/pci/pci_intr_fixup.c does not have entry for VT82C596A.
  2. Your BIOS have 0x05 link.

PCIBIOS assume that the value of link should be 0x01,0x02,0x03,0x04.

How about next patch?
Regards!
---
 Masanori Kanaoka	kanaoka@ann.hi-ho.ne.jp

Index: sys/arch/i386/pci/pci_intr_fixup.c
===================================================================
RCS file: /ftp/cvs/syssrc/sys/arch/i386/pci/pci_intr_fixup.c,v
retrieving revision 1.19
diff -u -r1.19 pci_intr_fixup.c
--- sys/arch/i386/pci/pci_intr_fixup.c	2001/12/07 08:07:57	1.19
+++ sys/arch/i386/pci/pci_intr_fixup.c	2001/12/31 00:43:22
@@ -150,6 +150,8 @@
 
 	{ PCI_VENDOR_VIATECH,	PCI_PRODUCT_VIATECH_VT82C586_ISA,
 	  via82c586_init },
+	{ PCI_VENDOR_VIATECH,	PCI_PRODUCT_VIATECH_VT82C596A,
+	  via82c586_init },
 	{ PCI_VENDOR_VIATECH,	PCI_PRODUCT_VIATECH_VT82C686A_ISA,
 	  via82c586_init },
 
Index: sys/arch/i386/pci/via82c586.c
===================================================================
RCS file: /ftp/cvs/syssrc/sys/arch/i386/pci/via82c586.c,v
retrieving revision 1.4
diff -u -r1.4 via82c586.c
--- sys/arch/i386/pci/via82c586.c	2001/11/15 07:03:35	1.4
+++ sys/arch/i386/pci/via82c586.c	2001/12/31 00:50:04
@@ -156,6 +156,12 @@
 		return (0);
 	}
 
+	/* Some BIOS have 0x05 link. */
+	if (link == 5) {
+		*clinkp = link -2;
+		return (0);
+	}
+
 	return (1);
 }