]> git.hungrycats.org Git - linux/commitdiff
[PATCH] correct irq logic for x86
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Thu, 6 Mar 2003 09:43:02 +0000 (01:43 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Thu, 6 Mar 2003 09:43:02 +0000 (01:43 -0800)
We must not look for a PCI IRQ for a non native mode IDE device
We must write PCI_INTERRUPT_LINE for VIA

arch/i386/pci/irq.c

index fa1a6e9b966345e1622e0e723044761e41a6ae5d..890bede1181341597c9d000cda778f58e2b1c9e4 100644 (file)
@@ -804,6 +804,7 @@ void pcibios_penalize_isa_irq(int irq)
 int pirq_enable_irq(struct pci_dev *dev)
 {
        u8 pin;
+       extern int interrupt_line_quirk;
        pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
        if (pin && !pcibios_lookup_irq(dev, 1) && !dev->irq) {
                char *msg;
@@ -813,9 +814,17 @@ int pirq_enable_irq(struct pci_dev *dev)
                        msg = "";
                else
                        msg = " Please try using pci=biosirq.";
+                       
+               /* With IDE legacy devices the IRQ lookup failure is not a problem.. */
+               if (dev->class >> 8 == PCI_CLASS_STORAGE_IDE && !(dev->class & 0x5))
+                       return;
+                       
                printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of device %s.%s\n",
                       'A' + pin - 1, dev->slot_name, msg);
        }
-
+       /* VIA bridges use interrupt line for apic/pci steering across
+          the V-Link */
+       else if (interrupt_line_quirk)
+               pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
        return 0;
 }