diff options
-rw-r--r-- | arch/x86/pci/acpi.c | 25 | ||||
-rw-r--r-- | drivers/pci/irq.c | 10 | ||||
-rw-r--r-- | drivers/pci/pci-driver.c | 6 | ||||
-rw-r--r-- | drivers/pci/pci-stub.c | 2 | ||||
-rw-r--r-- | drivers/pci/pci.c | 28 | ||||
-rw-r--r-- | drivers/pci/pcie/aspm.c | 7 | ||||
-rw-r--r-- | drivers/pci/quirks.c | 39 |
7 files changed, 92 insertions, 25 deletions
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 192397c98606..49e5195223db 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
@@ -22,6 +22,7 @@ struct pci_root_info { | |||
22 | }; | 22 | }; |
23 | 23 | ||
24 | static bool pci_use_crs = true; | 24 | static bool pci_use_crs = true; |
25 | static bool pci_ignore_seg = false; | ||
25 | 26 | ||
26 | static int __init set_use_crs(const struct dmi_system_id *id) | 27 | static int __init set_use_crs(const struct dmi_system_id *id) |
27 | { | 28 | { |
@@ -35,7 +36,14 @@ static int __init set_nouse_crs(const struct dmi_system_id *id) | |||
35 | return 0; | 36 | return 0; |
36 | } | 37 | } |
37 | 38 | ||
38 | static const struct dmi_system_id pci_use_crs_table[] __initconst = { | 39 | static int __init set_ignore_seg(const struct dmi_system_id *id) |
40 | { | ||
41 | printk(KERN_INFO "PCI: %s detected: ignoring ACPI _SEG\n", id->ident); | ||
42 | pci_ignore_seg = true; | ||
43 | return 0; | ||
44 | } | ||
45 | |||
46 | static const struct dmi_system_id pci_crs_quirks[] __initconst = { | ||
39 | /* http://bugzilla.kernel.org/show_bug.cgi?id=14183 */ | 47 | /* http://bugzilla.kernel.org/show_bug.cgi?id=14183 */ |
40 | { | 48 | { |
41 | .callback = set_use_crs, | 49 | .callback = set_use_crs, |
@@ -98,6 +106,16 @@ static const struct dmi_system_id pci_use_crs_table[] __initconst = { | |||
98 | DMI_MATCH(DMI_BIOS_VERSION, "6JET85WW (1.43 )"), | 106 | DMI_MATCH(DMI_BIOS_VERSION, "6JET85WW (1.43 )"), |
99 | }, | 107 | }, |
100 | }, | 108 | }, |
109 | |||
110 | /* https://bugzilla.kernel.org/show_bug.cgi?id=15362 */ | ||
111 | { | ||
112 | .callback = set_ignore_seg, | ||
113 | .ident = "HP xw9300", | ||
114 | .matches = { | ||
115 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | ||
116 | DMI_MATCH(DMI_PRODUCT_NAME, "HP xw9300 Workstation"), | ||
117 | }, | ||
118 | }, | ||
101 | {} | 119 | {} |
102 | }; | 120 | }; |
103 | 121 | ||
@@ -108,7 +126,7 @@ void __init pci_acpi_crs_quirks(void) | |||
108 | if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && year < 2008) | 126 | if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && year < 2008) |
109 | pci_use_crs = false; | 127 | pci_use_crs = false; |
110 | 128 | ||
111 | dmi_check_system(pci_use_crs_table); | 129 | dmi_check_system(pci_crs_quirks); |
112 | 130 | ||
113 | /* | 131 | /* |
114 | * If the user specifies "pci=use_crs" or "pci=nocrs" explicitly, that | 132 | * If the user specifies "pci=use_crs" or "pci=nocrs" explicitly, that |
@@ -455,6 +473,9 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_pci_root *root) | |||
455 | int pxm; | 473 | int pxm; |
456 | #endif | 474 | #endif |
457 | 475 | ||
476 | if (pci_ignore_seg) | ||
477 | domain = 0; | ||
478 | |||
458 | if (domain && !pci_domains_supported) { | 479 | if (domain && !pci_domains_supported) { |
459 | printk(KERN_WARNING "pci_bus %04x:%02x: " | 480 | printk(KERN_WARNING "pci_bus %04x:%02x: " |
460 | "ignored (multiple domains not supported)\n", | 481 | "ignored (multiple domains not supported)\n", |
diff --git a/drivers/pci/irq.c b/drivers/pci/irq.c index e5f69a43b1b1..b008cf86b9c3 100644 --- a/drivers/pci/irq.c +++ b/drivers/pci/irq.c | |||
@@ -14,11 +14,11 @@ static void pci_note_irq_problem(struct pci_dev *pdev, const char *reason) | |||
14 | { | 14 | { |
15 | struct pci_dev *parent = to_pci_dev(pdev->dev.parent); | 15 | struct pci_dev *parent = to_pci_dev(pdev->dev.parent); |
16 | 16 | ||
17 | dev_printk(KERN_ERR, &pdev->dev, | 17 | dev_err(&pdev->dev, |
18 | "Potentially misrouted IRQ (Bridge %s %04x:%04x)\n", | 18 | "Potentially misrouted IRQ (Bridge %s %04x:%04x)\n", |
19 | dev_name(&parent->dev), parent->vendor, parent->device); | 19 | dev_name(&parent->dev), parent->vendor, parent->device); |
20 | dev_printk(KERN_ERR, &pdev->dev, "%s\n", reason); | 20 | dev_err(&pdev->dev, "%s\n", reason); |
21 | dev_printk(KERN_ERR, &pdev->dev, "Please report to linux-kernel@vger.kernel.org\n"); | 21 | dev_err(&pdev->dev, "Please report to linux-kernel@vger.kernel.org\n"); |
22 | WARN_ON(1); | 22 | WARN_ON(1); |
23 | } | 23 | } |
24 | 24 | ||
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 94c6e2aa03d6..11d9c8a9d0d0 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
@@ -1023,10 +1023,10 @@ static int pci_pm_runtime_suspend(struct device *dev) | |||
1023 | return 0; | 1023 | return 0; |
1024 | } | 1024 | } |
1025 | 1025 | ||
1026 | if (!pci_dev->state_saved) | 1026 | if (!pci_dev->state_saved) { |
1027 | pci_save_state(pci_dev); | 1027 | pci_save_state(pci_dev); |
1028 | 1028 | pci_finish_runtime_suspend(pci_dev); | |
1029 | pci_finish_runtime_suspend(pci_dev); | 1029 | } |
1030 | 1030 | ||
1031 | return 0; | 1031 | return 0; |
1032 | } | 1032 | } |
diff --git a/drivers/pci/pci-stub.c b/drivers/pci/pci-stub.c index 775e933c2225..6e47c519c510 100644 --- a/drivers/pci/pci-stub.c +++ b/drivers/pci/pci-stub.c | |||
@@ -28,7 +28,7 @@ MODULE_PARM_DESC(ids, "Initial PCI IDs to add to the stub driver, format is " | |||
28 | 28 | ||
29 | static int pci_stub_probe(struct pci_dev *dev, const struct pci_device_id *id) | 29 | static int pci_stub_probe(struct pci_dev *dev, const struct pci_device_id *id) |
30 | { | 30 | { |
31 | dev_printk(KERN_INFO, &dev->dev, "claimed by stub\n"); | 31 | dev_info(&dev->dev, "claimed by stub\n"); |
32 | return 0; | 32 | return 0; |
33 | } | 33 | } |
34 | 34 | ||
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 54858838f098..485cfa9af2ef 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -1578,15 +1578,25 @@ void pci_pme_active(struct pci_dev *dev, bool enable) | |||
1578 | 1578 | ||
1579 | pci_write_config_word(dev, dev->pm_cap + PCI_PM_CTRL, pmcsr); | 1579 | pci_write_config_word(dev, dev->pm_cap + PCI_PM_CTRL, pmcsr); |
1580 | 1580 | ||
1581 | /* PCI (as opposed to PCIe) PME requires that the device have | 1581 | /* |
1582 | its PME# line hooked up correctly. Not all hardware vendors | 1582 | * PCI (as opposed to PCIe) PME requires that the device have |
1583 | do this, so the PME never gets delivered and the device | 1583 | * its PME# line hooked up correctly. Not all hardware vendors |
1584 | remains asleep. The easiest way around this is to | 1584 | * do this, so the PME never gets delivered and the device |
1585 | periodically walk the list of suspended devices and check | 1585 | * remains asleep. The easiest way around this is to |
1586 | whether any have their PME flag set. The assumption is that | 1586 | * periodically walk the list of suspended devices and check |
1587 | we'll wake up often enough anyway that this won't be a huge | 1587 | * whether any have their PME flag set. The assumption is that |
1588 | hit, and the power savings from the devices will still be a | 1588 | * we'll wake up often enough anyway that this won't be a huge |
1589 | win. */ | 1589 | * hit, and the power savings from the devices will still be a |
1590 | * win. | ||
1591 | * | ||
1592 | * Although PCIe uses in-band PME message instead of PME# line | ||
1593 | * to report PME, PME does not work for some PCIe devices in | ||
1594 | * reality. For example, there are devices that set their PME | ||
1595 | * status bits, but don't really bother to send a PME message; | ||
1596 | * there are PCI Express Root Ports that don't bother to | ||
1597 | * trigger interrupts when they receive PME messages from the | ||
1598 | * devices below. So PME poll is used for PCIe devices too. | ||
1599 | */ | ||
1590 | 1600 | ||
1591 | if (dev->pme_poll) { | 1601 | if (dev->pme_poll) { |
1592 | struct pci_pme_device *pme_dev; | 1602 | struct pci_pme_device *pme_dev; |
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index 213753b283a6..3da9ecc9ab84 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c | |||
@@ -242,8 +242,7 @@ static void pcie_aspm_configure_common_clock(struct pcie_link_state *link) | |||
242 | return; | 242 | return; |
243 | 243 | ||
244 | /* Training failed. Restore common clock configurations */ | 244 | /* Training failed. Restore common clock configurations */ |
245 | dev_printk(KERN_ERR, &parent->dev, | 245 | dev_err(&parent->dev, "ASPM: Could not configure common clock\n"); |
246 | "ASPM: Could not configure common clock\n"); | ||
247 | list_for_each_entry(child, &linkbus->devices, bus_list) | 246 | list_for_each_entry(child, &linkbus->devices, bus_list) |
248 | pcie_capability_write_word(child, PCI_EXP_LNKCTL, | 247 | pcie_capability_write_word(child, PCI_EXP_LNKCTL, |
249 | child_reg[PCI_FUNC(child->devfn)]); | 248 | child_reg[PCI_FUNC(child->devfn)]); |
@@ -507,9 +506,7 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev) | |||
507 | */ | 506 | */ |
508 | pcie_capability_read_dword(child, PCI_EXP_DEVCAP, ®32); | 507 | pcie_capability_read_dword(child, PCI_EXP_DEVCAP, ®32); |
509 | if (!(reg32 & PCI_EXP_DEVCAP_RBER) && !aspm_force) { | 508 | if (!(reg32 & PCI_EXP_DEVCAP_RBER) && !aspm_force) { |
510 | dev_printk(KERN_INFO, &child->dev, "disabling ASPM" | 509 | dev_info(&child->dev, "disabling ASPM on pre-1.1 PCIe device. You can enable it with 'pcie_aspm=force'\n"); |
511 | " on pre-1.1 PCIe device. You can enable it" | ||
512 | " with 'pcie_aspm=force'\n"); | ||
513 | return -EINVAL; | 510 | return -EINVAL; |
514 | } | 511 | } |
515 | } | 512 | } |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 7a451ff56ecc..0c59f7aba12b 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -1790,6 +1790,45 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TOSHIBA_2, | |||
1790 | PCI_DEVICE_ID_TOSHIBA_TC86C001_IDE, | 1790 | PCI_DEVICE_ID_TOSHIBA_TC86C001_IDE, |
1791 | quirk_tc86c001_ide); | 1791 | quirk_tc86c001_ide); |
1792 | 1792 | ||
1793 | /* | ||
1794 | * PLX PCI 9050 PCI Target bridge controller has an errata that prevents the | ||
1795 | * local configuration registers accessible via BAR0 (memory) or BAR1 (i/o) | ||
1796 | * being read correctly if bit 7 of the base address is set. | ||
1797 | * The BAR0 or BAR1 region may be disabled (size 0) or enabled (size 128). | ||
1798 | * Re-allocate the regions to a 256-byte boundary if necessary. | ||
1799 | */ | ||
1800 | static void __devinit quirk_plx_pci9050(struct pci_dev *dev) | ||
1801 | { | ||
1802 | unsigned int bar; | ||
1803 | |||
1804 | /* Fixed in revision 2 (PCI 9052). */ | ||
1805 | if (dev->revision >= 2) | ||
1806 | return; | ||
1807 | for (bar = 0; bar <= 1; bar++) | ||
1808 | if (pci_resource_len(dev, bar) == 0x80 && | ||
1809 | (pci_resource_start(dev, bar) & 0x80)) { | ||
1810 | struct resource *r = &dev->resource[bar]; | ||
1811 | dev_info(&dev->dev, | ||
1812 | "Re-allocating PLX PCI 9050 BAR %u to length 256 to avoid bit 7 bug\n", | ||
1813 | bar); | ||
1814 | r->start = 0; | ||
1815 | r->end = 0xff; | ||
1816 | } | ||
1817 | } | ||
1818 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, | ||
1819 | quirk_plx_pci9050); | ||
1820 | /* | ||
1821 | * The following Meilhaus (vendor ID 0x1402) device IDs (amongst others) | ||
1822 | * may be using the PLX PCI 9050: 0x0630, 0x0940, 0x0950, 0x0960, 0x100b, | ||
1823 | * 0x1400, 0x140a, 0x140b, 0x14e0, 0x14ea, 0x14eb, 0x1604, 0x1608, 0x160c, | ||
1824 | * 0x168f, 0x2000, 0x2600, 0x3000, 0x810a, 0x810b. | ||
1825 | * | ||
1826 | * Currently, device IDs 0x2000 and 0x2600 are used by the Comedi "me_daq" | ||
1827 | * driver. | ||
1828 | */ | ||
1829 | DECLARE_PCI_FIXUP_HEADER(0x1402, 0x2000, quirk_plx_pci9050); | ||
1830 | DECLARE_PCI_FIXUP_HEADER(0x1402, 0x2600, quirk_plx_pci9050); | ||
1831 | |||
1793 | static void __devinit quirk_netmos(struct pci_dev *dev) | 1832 | static void __devinit quirk_netmos(struct pci_dev *dev) |
1794 | { | 1833 | { |
1795 | unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4; | 1834 | unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4; |