diff options
| -rw-r--r-- | arch/powerpc/kernel/pci_of_scan.c | 2 | ||||
| -rw-r--r-- | arch/sparc/kernel/pci.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/pci_root.c | 7 | ||||
| -rw-r--r-- | drivers/pci/pcie/aspm.c | 16 | ||||
| -rw-r--r-- | drivers/pci/quirks.c | 25 |
5 files changed, 43 insertions, 9 deletions
diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c index 2a67e9baa59f..d2d407d65344 100644 --- a/arch/powerpc/kernel/pci_of_scan.c +++ b/arch/powerpc/kernel/pci_of_scan.c | |||
| @@ -165,7 +165,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node, | |||
| 165 | pr_debug(" class: 0x%x\n", dev->class); | 165 | pr_debug(" class: 0x%x\n", dev->class); |
| 166 | pr_debug(" revision: 0x%x\n", dev->revision); | 166 | pr_debug(" revision: 0x%x\n", dev->revision); |
| 167 | 167 | ||
| 168 | dev->current_state = 4; /* unknown power state */ | 168 | dev->current_state = PCI_UNKNOWN; /* unknown power state */ |
| 169 | dev->error_state = pci_channel_io_normal; | 169 | dev->error_state = pci_channel_io_normal; |
| 170 | dev->dma_mask = 0xffffffff; | 170 | dev->dma_mask = 0xffffffff; |
| 171 | 171 | ||
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index baf4366e2d6a..972892a0aa11 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c | |||
| @@ -327,7 +327,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, | |||
| 327 | if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) | 327 | if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) |
| 328 | pci_set_master(dev); | 328 | pci_set_master(dev); |
| 329 | 329 | ||
| 330 | dev->current_state = 4; /* unknown power state */ | 330 | dev->current_state = PCI_UNKNOWN; /* unknown power state */ |
| 331 | dev->error_state = pci_channel_io_normal; | 331 | dev->error_state = pci_channel_io_normal; |
| 332 | dev->dma_mask = 0xffffffff; | 332 | dev->dma_mask = 0xffffffff; |
| 333 | 333 | ||
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 1dd6f6c85874..f6c0998f248a 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c | |||
| @@ -100,13 +100,12 @@ get_root_bridge_busnr_callback(struct acpi_resource *resource, void *data) | |||
| 100 | { | 100 | { |
| 101 | struct resource *res = data; | 101 | struct resource *res = data; |
| 102 | struct acpi_resource_address64 address; | 102 | struct acpi_resource_address64 address; |
| 103 | acpi_status status; | ||
| 103 | 104 | ||
| 104 | if (resource->type != ACPI_RESOURCE_TYPE_ADDRESS16 && | 105 | status = acpi_resource_to_address64(resource, &address); |
| 105 | resource->type != ACPI_RESOURCE_TYPE_ADDRESS32 && | 106 | if (ACPI_FAILURE(status)) |
| 106 | resource->type != ACPI_RESOURCE_TYPE_ADDRESS64) | ||
| 107 | return AE_OK; | 107 | return AE_OK; |
| 108 | 108 | ||
| 109 | acpi_resource_to_address64(resource, &address); | ||
| 110 | if ((address.address_length > 0) && | 109 | if ((address.address_length > 0) && |
| 111 | (address.resource_type == ACPI_BUS_NUMBER_RANGE)) { | 110 | (address.resource_type == ACPI_BUS_NUMBER_RANGE)) { |
| 112 | res->start = address.minimum; | 111 | res->start = address.minimum; |
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index d320df6375a2..faa83b632a84 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c | |||
| @@ -724,9 +724,6 @@ static void __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem, | |||
| 724 | struct pci_dev *parent = pdev->bus->self; | 724 | struct pci_dev *parent = pdev->bus->self; |
| 725 | struct pcie_link_state *link; | 725 | struct pcie_link_state *link; |
| 726 | 726 | ||
| 727 | if (aspm_disabled && !force) | ||
| 728 | return; | ||
| 729 | |||
| 730 | if (!pci_is_pcie(pdev)) | 727 | if (!pci_is_pcie(pdev)) |
| 731 | return; | 728 | return; |
| 732 | 729 | ||
| @@ -736,6 +733,19 @@ static void __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem, | |||
| 736 | if (!parent || !parent->link_state) | 733 | if (!parent || !parent->link_state) |
| 737 | return; | 734 | return; |
| 738 | 735 | ||
| 736 | /* | ||
| 737 | * A driver requested that ASPM be disabled on this device, but | ||
| 738 | * if we don't have permission to manage ASPM (e.g., on ACPI | ||
| 739 | * systems we have to observe the FADT ACPI_FADT_NO_ASPM bit and | ||
| 740 | * the _OSC method), we can't honor that request. Windows has | ||
| 741 | * a similar mechanism using "PciASPMOptOut", which is also | ||
| 742 | * ignored in this situation. | ||
| 743 | */ | ||
| 744 | if (aspm_disabled && !force) { | ||
| 745 | dev_warn(&pdev->dev, "can't disable ASPM; OS doesn't have ASPM control\n"); | ||
| 746 | return; | ||
| 747 | } | ||
| 748 | |||
| 739 | if (sem) | 749 | if (sem) |
| 740 | down_read(&pci_bus_sem); | 750 | down_read(&pci_bus_sem); |
| 741 | mutex_lock(&aspm_lock); | 751 | mutex_lock(&aspm_lock); |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 7d68aeebf56b..7f492574dcf4 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
| @@ -2865,6 +2865,31 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata); | |||
| 2865 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata); | 2865 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata); |
| 2866 | 2866 | ||
| 2867 | 2867 | ||
| 2868 | /* | ||
| 2869 | * Ivytown NTB BAR sizes are misreported by the hardware due to an erratum. To | ||
| 2870 | * work around this, query the size it should be configured to by the device and | ||
| 2871 | * modify the resource end to correspond to this new size. | ||
| 2872 | */ | ||
| 2873 | static void quirk_intel_ntb(struct pci_dev *dev) | ||
| 2874 | { | ||
| 2875 | int rc; | ||
| 2876 | u8 val; | ||
| 2877 | |||
| 2878 | rc = pci_read_config_byte(dev, 0x00D0, &val); | ||
| 2879 | if (rc) | ||
| 2880 | return; | ||
| 2881 | |||
| 2882 | dev->resource[2].end = dev->resource[2].start + ((u64) 1 << val) - 1; | ||
| 2883 | |||
| 2884 | rc = pci_read_config_byte(dev, 0x00D1, &val); | ||
| 2885 | if (rc) | ||
| 2886 | return; | ||
| 2887 | |||
| 2888 | dev->resource[4].end = dev->resource[4].start + ((u64) 1 << val) - 1; | ||
| 2889 | } | ||
| 2890 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e08, quirk_intel_ntb); | ||
| 2891 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e0d, quirk_intel_ntb); | ||
| 2892 | |||
| 2868 | static ktime_t fixup_debug_start(struct pci_dev *dev, | 2893 | static ktime_t fixup_debug_start(struct pci_dev *dev, |
| 2869 | void (*fn)(struct pci_dev *dev)) | 2894 | void (*fn)(struct pci_dev *dev)) |
| 2870 | { | 2895 | { |
