aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorLen Brown <lenb@toshiba.hsd1.ma.comcast.net>2005-05-27 04:21:50 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-27 11:15:04 -0400
commit25be5e6ccc5c9cab77012fabbb72520f9b6e4618 (patch)
tree4c1b48179d7f18b3e037a473d8e04708b619ac5c /drivers/pci
parent2efe86b809d97debaaf9fcc13b041aedf15bd3d2 (diff)
[PATCH] VIA IRQ quirk
Delete quirk_via_bridge(), restore quirk_via_irqpic() -- but now improved to be invoked upon device ENABLE, and now only for VIA devices -- not all devices behind VIA bridges. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/quirks.c40
1 files changed, 24 insertions, 16 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 026aa04669a2..afc9d29acd8a 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -18,6 +18,7 @@
18#include <linux/pci.h> 18#include <linux/pci.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/delay.h> 20#include <linux/delay.h>
21#include <linux/acpi.h>
21#include "pci.h" 22#include "pci.h"
22 23
23/* Deal with broken BIOS'es that neglect to enable passive release, 24/* Deal with broken BIOS'es that neglect to enable passive release,
@@ -467,9 +468,6 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_APIC,
467 * non-x86 architectures (yes Via exists on PPC among other places), 468 * non-x86 architectures (yes Via exists on PPC among other places),
468 * we must mask the PCI_INTERRUPT_LINE value versus 0xf to get 469 * we must mask the PCI_INTERRUPT_LINE value versus 0xf to get
469 * interrupts delivered properly. 470 * interrupts delivered properly.
470 *
471 * TODO: When we have device-specific interrupt routers,
472 * quirk_via_irqpic will go away from quirks.
473 */ 471 */
474 472
475/* 473/*
@@ -494,6 +492,29 @@ static void __devinit quirk_via_acpi(struct pci_dev *d)
494DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_via_acpi ); 492DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_via_acpi );
495DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_acpi ); 493DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_acpi );
496 494
495static void __devinit quirk_via_irqpic(struct pci_dev *dev)
496{
497 u8 irq, new_irq;
498
499#ifdef CONFIG_X86_IO_APIC
500 if (nr_ioapics && !skip_ioapic_setup)
501 return;
502#endif
503#ifdef CONFIG_ACPI
504 if (acpi_irq_model != ACPI_IRQ_MODEL_PIC)
505 return;
506#endif
507 new_irq = dev->irq & 0xf;
508 pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
509 if (new_irq != irq) {
510 printk(KERN_INFO "PCI: Via PIC IRQ fixup for %s, from %d to %d\n",
511 pci_name(dev), irq, new_irq);
512 udelay(15); /* unknown if delay really needed */
513 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq);
514 }
515}
516DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_irqpic);
517
497/* 518/*
498 * PIIX3 USB: We have to disable USB interrupts that are 519 * PIIX3 USB: We have to disable USB interrupts that are
499 * hardwired to PIRQD# and may be shared with an 520 * hardwired to PIRQD# and may be shared with an
@@ -683,19 +704,6 @@ static void __init quirk_disable_pxb(struct pci_dev *pdev)
683} 704}
684DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, quirk_disable_pxb ); 705DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, quirk_disable_pxb );
685 706
686/*
687 * VIA northbridges care about PCI_INTERRUPT_LINE
688 */
689int via_interrupt_line_quirk;
690
691static void __devinit quirk_via_bridge(struct pci_dev *pdev)
692{
693 if(pdev->devfn == 0) {
694 printk(KERN_INFO "PCI: Via IRQ fixup\n");
695 via_interrupt_line_quirk = 1;
696 }
697}
698DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_bridge );
699 707
700/* 708/*
701 * Serverworks CSB5 IDE does not fully support native mode 709 * Serverworks CSB5 IDE does not fully support native mode