Subject: Re: Lucent Wavelan PCI adapter problems
To: None <gson@isc.org>
From: Masanori Kanaoka <kanaoka@ann.hi-ho.ne.jp>
List: port-i386
Date: 08/29/2001 03:43:11
Hi,

       From: gson@isc.org (Andreas Gustafsson)
    Subject: Lucent Wavelan PCI adapter problems
      Date : Sun, 26 Aug 2001 18:56:23 -0700 (PDT)

$ I have tried enabling all the PCIBIOS related kernel options, but they
$ make no difference.  The PCIBIOSVERBOSE output is enclosed below.  Any
$ suggestions?

$ PCI IRQ Routing Table rev. 1.0 found at 0xf82c0, size 144 bytes (7 entries)
$ PCI Interrupt Router at 000:07:0 (VIA Technologies VT82C586 (Apollo VP) PCI-ISA Bridge)
$ PIR Entry 0:
$ 	Bus: 1  Device: 5
$ 		INTA: link 0x02 bitmap 0xdeb8
$ 		INTB: link 0x03 bitmap 0xdeb8
$ 		INTC: link 0x00 bitmap 0x0000
$ 		INTD: link 0x00 bitmap 0x0000
$ PIR Entry 1:
$ 	Bus: 0  Device: 7
$ 		INTA: link 0xfe bitmap 0x4000
$ 		INTB: link 0xff bitmap 0x8000
$ 		INTC: link 0x03 bitmap 0xdeb8
$ 		INTD: link 0x05 bitmap 0xdeb8
$ PIR Entry 2:
$ 	Bus: 0  Device: 3
$ 		INTA: link 0x05 bitmap 0xdeb8
$ 		INTB: link 0x01 bitmap 0xdeb8
$ 		INTC: link 0x02 bitmap 0xdeb8
$ 		INTD: link 0x03 bitmap 0xdeb8
$ PIR Entry 3:
$ 	Bus: 0  Device: 4
$ 		INTA: link 0x01 bitmap 0xdeb8
$ 		INTB: link 0x02 bitmap 0xdeb8
$ 		INTC: link 0x03 bitmap 0xdeb8
$ 		INTD: link 0x05 bitmap 0xdeb8
$ PIR Entry 4:
$ 	Bus: 0  Device: 9
$ 		INTA: link 0x02 bitmap 0xdeb8
$ 		INTB: link 0x03 bitmap 0xdeb8
$ 		INTC: link 0x05 bitmap 0xdeb8
$ 		INTD: link 0x01 bitmap 0xdeb8
$ PIR Entry 5:
$ 	Bus: 0  Device: 6
$ 		INTA: link 0x03 bitmap 0xdeb8
$ 		INTB: link 0x05 bitmap 0xdeb8
$ 		INTC: link 0x01 bitmap 0xdeb8
$ 		INTD: link 0x02 bitmap 0xdeb8
$ PIR Entry 6:
$ 	Bus: 0  Device: 15
$ 		INTA: link 0x05 bitmap 0xdeb8
$ 		INTB: link 0x01 bitmap 0xdeb8
$ 		INTC: link 0x02 bitmap 0xdeb8
$ 		INTD: link 0x03 bitmap 0xdeb8
$ pciintr_link_alloc: bus 0 device 7: link 0xfe invalid
$ pciintr_link_alloc: bus 0 device 7: link 0xff invalid
$ pciintr_link_alloc: bus 0 device 7: link 0x05 invalid
$ pciintr_link_alloc: bus 0 device 3: link 0x05 invalid
$ pciintr_link_alloc: bus 0 device 4: link 0x05 invalid
$ pciintr_link_alloc: bus 0 device 9: link 0x05 invalid
$ pciintr_link_alloc: bus 0 device 6: link 0x05 invalid
$ pciintr_link_alloc: bus 0 device 15: link 0x05 invalid
$ pciintr_link_fixup: PIRQ 0x00 already connected to IRQ 11
$ pciintr_link_fixup: PIRQ 0x01 already connected to IRQ 11
$ pciintr_link_fixup: PIRQ 0x02 already connected to IRQ 11
$ pciintr_link_route: route of PIRQ 0x00 -> IRQ 11 preserved BIOS setting
$ pciintr_link_route: route of PIRQ 0x01 -> IRQ 11 preserved BIOS setting
$ pciintr_link_route: route of PIRQ 0x02 -> IRQ 11 preserved BIOS setting

Your BIOS have link value 0xfe,0xff,0x01,0x02,0x05.
link value should be 0x01,0x02,0x03,0x04,
so PCIBIOS does not fixup your interrupt.

How about next patch?
I think that Next patch is ad hoc.

Regards!
---
 Masanori Kanaoka	kanaoka@ann.hi-ho.ne.jp


Index: via82c586.c
===================================================================
RCS file: /ftp/cvs/syssrc/sys/arch/i386/pci/via82c586.c,v
retrieving revision 1.3
diff -u -r1.3 via82c586.c
--- via82c586.c 2001/01/05 19:08:04     1.3
+++ via82c586.c 2001/08/28 08:05:51
@@ -153,6 +153,11 @@
                return (0);
        }
 
+       if (link == 5) {
+               *clinkp = link - 2;
+               return (0);
+       }
+
        return (1);
 }