diff options
Diffstat (limited to 'drivers/pci/quirks.c')
-rw-r--r-- | drivers/pci/quirks.c | 175 |
1 files changed, 174 insertions, 1 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index d1d7333bb71..17e709e7d72 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -400,6 +400,7 @@ static void __devinit quirk_piix4_acpi(struct pci_dev *dev) | |||
400 | piix4_io_quirk(dev, "PIIX4 devres J", 0x7c, 1 << 20); | 400 | piix4_io_quirk(dev, "PIIX4 devres J", 0x7c, 1 << 20); |
401 | } | 401 | } |
402 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, quirk_piix4_acpi ); | 402 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, quirk_piix4_acpi ); |
403 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443MX_3, quirk_piix4_acpi ); | ||
403 | 404 | ||
404 | /* | 405 | /* |
405 | * ICH4, ICH4-M, ICH5, ICH5-M ACPI: Three IO regions pointed to by longwords at | 406 | * ICH4, ICH4-M, ICH5, ICH5-M ACPI: Three IO regions pointed to by longwords at |
@@ -437,6 +438,7 @@ static void __devinit quirk_ich6_lpc_acpi(struct pci_dev *dev) | |||
437 | pci_read_config_dword(dev, 0x48, ®ion); | 438 | pci_read_config_dword(dev, 0x48, ®ion); |
438 | 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"); |
439 | } | 440 | } |
441 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_0, quirk_ich6_lpc_acpi ); | ||
440 | 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 ); |
441 | 443 | ||
442 | /* | 444 | /* |
@@ -665,6 +667,7 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_0, quirk_vi | |||
665 | DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, quirk_via_irq); | 667 | DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, quirk_via_irq); |
666 | DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_2, quirk_via_irq); | 668 | DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_2, quirk_via_irq); |
667 | DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_via_irq); | 669 | DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_via_irq); |
670 | DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235_USB_2, quirk_via_irq); | ||
668 | DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_irq); | 671 | DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_irq); |
669 | DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_irq); | 672 | DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_irq); |
670 | DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irq); | 673 | DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irq); |
@@ -682,6 +685,33 @@ static void __devinit quirk_vt82c598_id(struct pci_dev *dev) | |||
682 | } | 685 | } |
683 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C597_0, quirk_vt82c598_id ); | 686 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C597_0, quirk_vt82c598_id ); |
684 | 687 | ||
688 | #ifdef CONFIG_ACPI_SLEEP | ||
689 | |||
690 | /* | ||
691 | * Some VIA systems boot with the abnormal status flag set. This can cause | ||
692 | * the BIOS to re-POST the system on resume rather than passing control | ||
693 | * back to the OS. Clear the flag on boot | ||
694 | */ | ||
695 | static void __devinit quirk_via_abnormal_poweroff(struct pci_dev *dev) | ||
696 | { | ||
697 | u32 reg; | ||
698 | |||
699 | acpi_hw_register_read(ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_STATUS, | ||
700 | ®); | ||
701 | |||
702 | if (reg & 0x800) { | ||
703 | printk("Clearing abnormal poweroff flag\n"); | ||
704 | acpi_hw_register_write(ACPI_MTX_DO_NOT_LOCK, | ||
705 | ACPI_REGISTER_PM1_STATUS, | ||
706 | (u16)0x800); | ||
707 | } | ||
708 | } | ||
709 | |||
710 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, quirk_via_abnormal_poweroff); | ||
711 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, quirk_via_abnormal_poweroff); | ||
712 | |||
713 | #endif | ||
714 | |||
685 | /* | 715 | /* |
686 | * CardBus controllers have a legacy base address that enables them | 716 | * CardBus controllers have a legacy base address that enables them |
687 | * to respond as i82365 pcmcia controllers. We don't want them to | 717 | * to respond as i82365 pcmcia controllers. We don't want them to |
@@ -962,6 +992,11 @@ static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev) | |||
962 | case 0x8070: /* P4G8X Deluxe */ | 992 | case 0x8070: /* P4G8X Deluxe */ |
963 | asus_hides_smbus = 1; | 993 | asus_hides_smbus = 1; |
964 | } | 994 | } |
995 | if (dev->device == PCI_DEVICE_ID_INTEL_E7501_MCH) | ||
996 | switch (dev->subsystem_device) { | ||
997 | case 0x80c9: /* PU-DLS */ | ||
998 | asus_hides_smbus = 1; | ||
999 | } | ||
965 | if (dev->device == PCI_DEVICE_ID_INTEL_82855GM_HB) | 1000 | if (dev->device == PCI_DEVICE_ID_INTEL_82855GM_HB) |
966 | switch (dev->subsystem_device) { | 1001 | switch (dev->subsystem_device) { |
967 | case 0x1751: /* M2N notebook */ | 1002 | case 0x1751: /* M2N notebook */ |
@@ -1030,6 +1065,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82845G_HB, asu | |||
1030 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82850_HB, asus_hides_smbus_hostbridge ); | 1065 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82850_HB, asus_hides_smbus_hostbridge ); |
1031 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82865_HB, asus_hides_smbus_hostbridge ); | 1066 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82865_HB, asus_hides_smbus_hostbridge ); |
1032 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_7205_0, asus_hides_smbus_hostbridge ); | 1067 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_7205_0, asus_hides_smbus_hostbridge ); |
1068 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7501_MCH, asus_hides_smbus_hostbridge ); | ||
1033 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82855PM_HB, asus_hides_smbus_hostbridge ); | 1069 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82855PM_HB, asus_hides_smbus_hostbridge ); |
1034 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82855GM_HB, asus_hides_smbus_hostbridge ); | 1070 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82855GM_HB, asus_hides_smbus_hostbridge ); |
1035 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82915GM_HB, asus_hides_smbus_hostbridge ); | 1071 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82915GM_HB, asus_hides_smbus_hostbridge ); |
@@ -1053,10 +1089,10 @@ static void __init asus_hides_smbus_lpc(struct pci_dev *dev) | |||
1053 | } | 1089 | } |
1054 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, asus_hides_smbus_lpc ); | 1090 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, asus_hides_smbus_lpc ); |
1055 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, asus_hides_smbus_lpc ); | 1091 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, asus_hides_smbus_lpc ); |
1092 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, asus_hides_smbus_lpc ); | ||
1056 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, asus_hides_smbus_lpc ); | 1093 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, asus_hides_smbus_lpc ); |
1057 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, asus_hides_smbus_lpc ); | 1094 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, asus_hides_smbus_lpc ); |
1058 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, asus_hides_smbus_lpc ); | 1095 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, asus_hides_smbus_lpc ); |
1059 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, asus_hides_smbus_lpc ); | ||
1060 | 1096 | ||
1061 | static void __init asus_hides_smbus_lpc_ich6(struct pci_dev *dev) | 1097 | static void __init asus_hides_smbus_lpc_ich6(struct pci_dev *dev) |
1062 | { | 1098 | { |
@@ -1174,6 +1210,55 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_962, quirk_sis_96x_ | |||
1174 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_963, quirk_sis_96x_smbus ); | 1210 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_963, quirk_sis_96x_smbus ); |
1175 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_LPC, quirk_sis_96x_smbus ); | 1211 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_LPC, quirk_sis_96x_smbus ); |
1176 | 1212 | ||
1213 | #if defined(CONFIG_SCSI_SATA) || defined(CONFIG_SCSI_SATA_MODULE) | ||
1214 | |||
1215 | /* | ||
1216 | * If we are using libata we can drive this chip properly but must | ||
1217 | * do this early on to make the additional device appear during | ||
1218 | * the PCI scanning. | ||
1219 | */ | ||
1220 | |||
1221 | static void __devinit quirk_jmicron_dualfn(struct pci_dev *pdev) | ||
1222 | { | ||
1223 | u32 conf; | ||
1224 | u8 hdr; | ||
1225 | |||
1226 | /* Only poke fn 0 */ | ||
1227 | if (PCI_FUNC(pdev->devfn)) | ||
1228 | return; | ||
1229 | |||
1230 | switch(pdev->device) { | ||
1231 | case PCI_DEVICE_ID_JMICRON_JMB365: | ||
1232 | case PCI_DEVICE_ID_JMICRON_JMB366: | ||
1233 | /* Redirect IDE second PATA port to the right spot */ | ||
1234 | pci_read_config_dword(pdev, 0x80, &conf); | ||
1235 | conf |= (1 << 24); | ||
1236 | /* Fall through */ | ||
1237 | pci_write_config_dword(pdev, 0x80, conf); | ||
1238 | case PCI_DEVICE_ID_JMICRON_JMB361: | ||
1239 | case PCI_DEVICE_ID_JMICRON_JMB363: | ||
1240 | pci_read_config_dword(pdev, 0x40, &conf); | ||
1241 | /* Enable dual function mode, AHCI on fn 0, IDE fn1 */ | ||
1242 | /* Set the class codes correctly and then direct IDE 0 */ | ||
1243 | conf &= ~0x000F0200; /* Clear bit 9 and 16-19 */ | ||
1244 | conf |= 0x00C20002; /* Set bit 1, 17, 22, 23 */ | ||
1245 | pci_write_config_dword(pdev, 0x40, conf); | ||
1246 | |||
1247 | /* Reconfigure so that the PCI scanner discovers the | ||
1248 | device is now multifunction */ | ||
1249 | |||
1250 | pci_read_config_byte(pdev, PCI_HEADER_TYPE, &hdr); | ||
1251 | pdev->hdr_type = hdr & 0x7f; | ||
1252 | pdev->multifunction = !!(hdr & 0x80); | ||
1253 | |||
1254 | break; | ||
1255 | } | ||
1256 | } | ||
1257 | |||
1258 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, quirk_jmicron_dualfn); | ||
1259 | |||
1260 | #endif | ||
1261 | |||
1177 | #ifdef CONFIG_X86_IO_APIC | 1262 | #ifdef CONFIG_X86_IO_APIC |
1178 | static void __init quirk_alder_ioapic(struct pci_dev *pdev) | 1263 | static void __init quirk_alder_ioapic(struct pci_dev *pdev) |
1179 | { | 1264 | { |
@@ -1341,6 +1426,37 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXH_0, quirk_pc | |||
1341 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXH_1, quirk_pcie_pxh); | 1426 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXH_1, quirk_pcie_pxh); |
1342 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXHV, quirk_pcie_pxh); | 1427 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXHV, quirk_pcie_pxh); |
1343 | 1428 | ||
1429 | /* | ||
1430 | * Some Intel PCI Express chipsets have trouble with downstream | ||
1431 | * device power management. | ||
1432 | */ | ||
1433 | static void quirk_intel_pcie_pm(struct pci_dev * dev) | ||
1434 | { | ||
1435 | pci_pm_d3_delay = 120; | ||
1436 | dev->no_d1d2 = 1; | ||
1437 | } | ||
1438 | |||
1439 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x25e2, quirk_intel_pcie_pm); | ||
1440 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x25e3, quirk_intel_pcie_pm); | ||
1441 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x25e4, quirk_intel_pcie_pm); | ||
1442 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x25e5, quirk_intel_pcie_pm); | ||
1443 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x25e6, quirk_intel_pcie_pm); | ||
1444 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x25e7, quirk_intel_pcie_pm); | ||
1445 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x25f7, quirk_intel_pcie_pm); | ||
1446 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x25f8, quirk_intel_pcie_pm); | ||
1447 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x25f9, quirk_intel_pcie_pm); | ||
1448 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x25fa, quirk_intel_pcie_pm); | ||
1449 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x2601, quirk_intel_pcie_pm); | ||
1450 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x2602, quirk_intel_pcie_pm); | ||
1451 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x2603, quirk_intel_pcie_pm); | ||
1452 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x2604, quirk_intel_pcie_pm); | ||
1453 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x2605, quirk_intel_pcie_pm); | ||
1454 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x2606, quirk_intel_pcie_pm); | ||
1455 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x2607, quirk_intel_pcie_pm); | ||
1456 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x2608, quirk_intel_pcie_pm); | ||
1457 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x2609, quirk_intel_pcie_pm); | ||
1458 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x260a, quirk_intel_pcie_pm); | ||
1459 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x260b, quirk_intel_pcie_pm); | ||
1344 | 1460 | ||
1345 | /* | 1461 | /* |
1346 | * Fixup the cardbus bridges on the IBM Dock II docking station | 1462 | * Fixup the cardbus bridges on the IBM Dock II docking station |
@@ -1403,6 +1519,63 @@ static void __devinit quirk_netmos(struct pci_dev *dev) | |||
1403 | } | 1519 | } |
1404 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NETMOS, PCI_ANY_ID, quirk_netmos); | 1520 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NETMOS, PCI_ANY_ID, quirk_netmos); |
1405 | 1521 | ||
1522 | static void __devinit quirk_e100_interrupt(struct pci_dev *dev) | ||
1523 | { | ||
1524 | u16 command; | ||
1525 | u32 bar; | ||
1526 | u8 __iomem *csr; | ||
1527 | u8 cmd_hi; | ||
1528 | |||
1529 | switch (dev->device) { | ||
1530 | /* PCI IDs taken from drivers/net/e100.c */ | ||
1531 | case 0x1029: | ||
1532 | case 0x1030 ... 0x1034: | ||
1533 | case 0x1038 ... 0x103E: | ||
1534 | case 0x1050 ... 0x1057: | ||
1535 | case 0x1059: | ||
1536 | case 0x1064 ... 0x106B: | ||
1537 | case 0x1091 ... 0x1095: | ||
1538 | case 0x1209: | ||
1539 | case 0x1229: | ||
1540 | case 0x2449: | ||
1541 | case 0x2459: | ||
1542 | case 0x245D: | ||
1543 | case 0x27DC: | ||
1544 | break; | ||
1545 | default: | ||
1546 | return; | ||
1547 | } | ||
1548 | |||
1549 | /* | ||
1550 | * Some firmware hands off the e100 with interrupts enabled, | ||
1551 | * which can cause a flood of interrupts if packets are | ||
1552 | * received before the driver attaches to the device. So | ||
1553 | * disable all e100 interrupts here. The driver will | ||
1554 | * re-enable them when it's ready. | ||
1555 | */ | ||
1556 | pci_read_config_word(dev, PCI_COMMAND, &command); | ||
1557 | pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &bar); | ||
1558 | |||
1559 | if (!(command & PCI_COMMAND_MEMORY) || !bar) | ||
1560 | return; | ||
1561 | |||
1562 | csr = ioremap(bar, 8); | ||
1563 | if (!csr) { | ||
1564 | printk(KERN_WARNING "PCI: Can't map %s e100 registers\n", | ||
1565 | pci_name(dev)); | ||
1566 | return; | ||
1567 | } | ||
1568 | |||
1569 | cmd_hi = readb(csr + 3); | ||
1570 | if (cmd_hi == 0) { | ||
1571 | printk(KERN_WARNING "PCI: Firmware left %s e100 interrupts " | ||
1572 | "enabled, disabling\n", pci_name(dev)); | ||
1573 | writeb(1, csr + 3); | ||
1574 | } | ||
1575 | |||
1576 | iounmap(csr); | ||
1577 | } | ||
1578 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_e100_interrupt); | ||
1406 | 1579 | ||
1407 | static void __devinit fixup_rev1_53c810(struct pci_dev* dev) | 1580 | static void __devinit fixup_rev1_53c810(struct pci_dev* dev) |
1408 | { | 1581 | { |