diff options
Diffstat (limited to 'drivers/pci/quirks.c')
-rw-r--r-- | drivers/pci/quirks.c | 59 |
1 files changed, 58 insertions, 1 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index fb08bc951ac0..73177429fe74 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -438,6 +438,7 @@ static void __devinit quirk_ich6_lpc_acpi(struct pci_dev *dev) | |||
438 | pci_read_config_dword(dev, 0x48, ®ion); | 438 | pci_read_config_dword(dev, 0x48, ®ion); |
439 | quirk_io_region(dev, region, 64, PCI_BRIDGE_RESOURCES+1, "ICH6 GPIO"); | 439 | quirk_io_region(dev, region, 64, PCI_BRIDGE_RESOURCES+1, "ICH6 GPIO"); |
440 | } | 440 | } |
441 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_0, quirk_ich6_lpc_acpi ); | ||
441 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, quirk_ich6_lpc_acpi ); | 442 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, quirk_ich6_lpc_acpi ); |
442 | 443 | ||
443 | /* | 444 | /* |
@@ -1091,7 +1092,6 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, asu | |||
1091 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, asus_hides_smbus_lpc ); | 1092 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, asus_hides_smbus_lpc ); |
1092 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, asus_hides_smbus_lpc ); | 1093 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, asus_hides_smbus_lpc ); |
1093 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, asus_hides_smbus_lpc ); | 1094 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, asus_hides_smbus_lpc ); |
1094 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, asus_hides_smbus_lpc ); | ||
1095 | 1095 | ||
1096 | static void __init asus_hides_smbus_lpc_ich6(struct pci_dev *dev) | 1096 | static void __init asus_hides_smbus_lpc_ich6(struct pci_dev *dev) |
1097 | { | 1097 | { |
@@ -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 | { |