Skip to contentSkip to conversation

Vaio IRQ routing / USB problem

PATCH Manfred Spraul 3 participants 4 messages Nov 4, 2001

lore
Share & tools
lore
#0 lore raw

It seems that the PCI subsystem notices that all irq sources share irq 9 and reroutes interrupts.
But after rerouting the interrupts it notices that something is wrong and aborts the irq change, without undoing the rerouting.

Thus the usb controller waits on irq 9, and doesn't receive the interrupts.
If you play sound, you effectively poll the irq handler of the USB controller, and then you can use your mouse.

Could you apply the attached patch, reboot and post the dmesg output? And append cat /proc/interrupts.

--
Manfred

arch/i386/kernel/pci-irq.c +2 -0
@@ -48,6 +48,8 @@
  *  Search 0xf0000 -- 0xfffff for the PCI IRQ Routing Table.
  */
 
+#undef DBG
+#define DBG	printk
 static struct irq_routing_table * __init pirq_find_routing_table(void)
 {
 	u8 *addr;
#1 lore raw

arch/i386/kernel/pci-irq.c Sun Nov 4 11:57:00 2001 line 55

Quoted 11 lines · Manfred Spraul
arch/i386/kernel/pci-irq.c Sun Nov 4 11:57:00 2001 renamed from arch/i386/kernel/pci-irq.c Sat Nov 3 19:51:08 2001 +2 -0
@@ -48,6 +48,8 @@
  *  Search 0xf0000 -- 0xfffff for the PCI IRQ Routing Table.
  */
 
+#undef DBG
+#define DBG    printk
 static struct irq_routing_table * __init pirq_find_routing_table(void)
 {
        u8 *addr;

This patch is probably preferred, it turns on all PCI and PCI IRQ-related debugging, including dumping the PCI IRQ table.

Tom, please CC me a copy of the output as well, if you don't mind.

Signature · 3 lines
Jeff Garzik      | Only so many songs can be sung
Building 1024    | with two lips, two lungs, and one tongue.
MandrakeSoft     |         - nomeansno

Index: arch/i386/kernel/pci-i386.h
===================================================================
RCS file: /cvsroot/gkernel/linux_2_4/arch/i386/kernel/pci-i386.h,v retrieving revision 1.3

i386/kernel/pci-i386.h +1 -1
diff -u -r1.3 pci-i386.h
@@ -4,7 +4,7 @@
  *	(c) 1999 Martin Mares <[email protected]>
  */
 
-#undef DEBUG
+#define DEBUG 1
 
 #ifdef DEBUG
 #define DBG(x...) printk(x)
#2 lore raw
In reply to Manfred Spraul

[cc to linux-kernel added]

Quoted 7 lines · Tom Winkler

usb-uhci.c: High bandwidth mode enabled
IRQ for 00:1f.2:3 -> PIRQ 63, mask 0200, excl 0000 -> newirq=9 -> got IRQ 10
PCI: Found IRQ 10 for device 00:1f.2
IRQ routing conflict for 00:1f.2, have irq 9, want irq 10
PCI: Setting latency timer of device 00:1f.2 to 64

That's interesting. It's obivously a bios bug:
The USB controller only supports interrupt 9 (mask==0x200 -->bit 9), is right now running on irq 9 according to the bios data.
But according to the piix irq router, it's connected to irq 10.

First we must figure out where the bios lies. Could you try the attached patches?
The patches are alternatives, first try option 1, then option 2.

--

arch/i386/kernel/pci-irq.c +1 -1
@@ -626,7 +626,7 @@
 			continue;
 		if (info->irq[pin].link == pirq) {
 			/* We refuse to override the dev->irq information. Give a warning! */
-		    	if (dev2->irq && dev2->irq != irq) {
+		    	if (dev2->irq && dev2->irq != irq && 0) {
 		    		printk(KERN_INFO "IRQ routing conflict for %s, have irq %d, want irq %d\n",
 				       dev2->slot_name, dev2->irq, irq);
 		    		continue;
arch/i386/kernel/pci-irq.c +12 -0
@@ -629,6 +629,18 @@
 		    	if (dev2->irq && dev2->irq != irq) {
 		    		printk(KERN_INFO "IRQ routing conflict for %s, have irq %d, want irq %d\n",
 				       dev2->slot_name, dev2->irq, irq);
+				if (!strcmp(msg, "Found")) {
+					/* ok, the bios lied. Try to recover */
+					if (r->set && (dev->class >> 8) != PCI_CLASS_DISPLAY_VGA) {
+						printk(KERN_ERR "trying set.\n");
+						if (r->set(pirq_router_dev, dev2, pirq, dev2->irq)) {
+							printk(KERN_ERR "set succedded.\n");
+							eisa_set_level_irq(dev2->irq);
+						} else {
+							printk(KERN_ERR "set failed.\n");
+						}
+					}
+				}
 		    		continue;
 		    	}
 			dev2->irq = irq;
#3 lore raw
In reply to Manfred Spraul

Hi,

I tested both patches from Manfred and both of them worked! My Vaio now works perfectly with USB. I've put together some short information at http://www.sbox.tugraz.at/home/t/twinkler/vaio/
(dmesg and interrupts - if you're interested in something else let me know). I'm not really sure which of the patches to use since both are working. For now I'll stick with the first one I guess. Just a questinon: Will this patch (wich as far as I saw on the web will be interesting for many other vaio users) be part of one of the next kernel releases? If you need me to test something related to this patch just drop me a line.

Thank you very much Manfred and Jeff for your help,
Tom