diff options
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/hotplug/Kconfig | 2 | ||||
-rw-r--r-- | drivers/pci/quirks.c | 57 |
2 files changed, 58 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/Kconfig b/drivers/pci/hotplug/Kconfig index 3c148eaf2f4d..8a60f391ffcf 100644 --- a/drivers/pci/hotplug/Kconfig +++ b/drivers/pci/hotplug/Kconfig | |||
@@ -76,7 +76,7 @@ config HOTPLUG_PCI_IBM | |||
76 | 76 | ||
77 | config HOTPLUG_PCI_ACPI | 77 | config HOTPLUG_PCI_ACPI |
78 | tristate "ACPI PCI Hotplug driver" | 78 | tristate "ACPI PCI Hotplug driver" |
79 | depends on ACPI_DOCK && HOTPLUG_PCI | 79 | depends on (!ACPI_DOCK && ACPI && HOTPLUG_PCI) || (ACPI_DOCK && HOTPLUG_PCI) |
80 | help | 80 | help |
81 | Say Y here if you have a system that supports PCI Hotplug using | 81 | Say Y here if you have a system that supports PCI Hotplug using |
82 | ACPI. | 82 | ACPI. |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index fb08bc951ac0..04618d4d7d74 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -1518,6 +1518,63 @@ static void __devinit quirk_netmos(struct pci_dev *dev) | |||
1518 | } | 1518 | } |
1519 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NETMOS, PCI_ANY_ID, quirk_netmos); | 1519 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NETMOS, PCI_ANY_ID, quirk_netmos); |
1520 | 1520 | ||
1521 | static void __devinit quirk_e100_interrupt(struct pci_dev *dev) | ||
1522 | { | ||
1523 | u16 command; | ||
1524 | u32 bar; | ||
1525 | u8 __iomem *csr; | ||
1526 | u8 cmd_hi; | ||
1527 | |||
1528 | switch (dev->device) { | ||
1529 | /* PCI IDs taken from drivers/net/e100.c */ | ||
1530 | case 0x1029: | ||
1531 | case 0x1030 ... 0x1034: | ||
1532 | case 0x1038 ... 0x103E: | ||
1533 | case 0x1050 ... 0x1057: | ||
1534 | case 0x1059: | ||
1535 | case 0x1064 ... 0x106B: | ||
1536 | case 0x1091 ... 0x1095: | ||
1537 | case 0x1209: | ||
1538 | case 0x1229: | ||
1539 | case 0x2449: | ||
1540 | case 0x2459: | ||
1541 | case 0x245D: | ||
1542 | case 0x27DC: | ||
1543 | break; | ||
1544 | default: | ||
1545 | return; | ||
1546 | } | ||
1547 | |||
1548 | /* | ||
1549 | * Some firmware hands off the e100 with interrupts enabled, | ||
1550 | * which can cause a flood of interrupts if packets are | ||
1551 | * received before the driver attaches to the device. So | ||
1552 | * disable all e100 interrupts here. The driver will | ||
1553 | * re-enable them when it's ready. | ||
1554 | */ | ||
1555 | pci_read_config_word(dev, PCI_COMMAND, &command); | ||
1556 | pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &bar); | ||
1557 | |||
1558 | if (!(command & PCI_COMMAND_MEMORY) || !bar) | ||
1559 | return; | ||
1560 | |||
1561 | csr = ioremap(bar, 8); | ||
1562 | if (!csr) { | ||
1563 | printk(KERN_WARNING "PCI: Can't map %s e100 registers\n", | ||
1564 | pci_name(dev)); | ||
1565 | return; | ||
1566 | } | ||
1567 | |||
1568 | cmd_hi = readb(csr + 3); | ||
1569 | if (cmd_hi == 0) { | ||
1570 | printk(KERN_WARNING "PCI: Firmware left %s e100 interrupts " | ||
1571 | "enabled, disabling\n", pci_name(dev)); | ||
1572 | writeb(1, csr + 3); | ||
1573 | } | ||
1574 | |||
1575 | iounmap(csr); | ||
1576 | } | ||
1577 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_e100_interrupt); | ||
1521 | 1578 | ||
1522 | static void __devinit fixup_rev1_53c810(struct pci_dev* dev) | 1579 | static void __devinit fixup_rev1_53c810(struct pci_dev* dev) |
1523 | { | 1580 | { |