summaryrefslogtreecommitdiff
path: root/drivers/acpi/pci_mcfg.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2017-01-02 14:04:24 -0600
committerBjorn Helgaas <bhelgaas@google.com>2017-01-02 15:56:25 -0600
commit977509f7c5c6fb992ffcdf4291051af343b91645 (patch)
tree79be557858195950189b700cb4171d41f803a951 /drivers/acpi/pci_mcfg.c
parent7ce7d89f48834cefece7804d38fc5d85382edf77 (diff)
PCI: Apply _HPX settings only to relevant devices
Previously we didn't check the type of device before trying to apply Type 1 (PCI-X) or Type 2 (PCIe) Setting Records from _HPX. We don't support PCI-X Setting Records, so this was harmless, but the warning was useless. We do support PCIe Setting Records, and we didn't check whether a device was PCIe before applying settings. I don't think anything bad happened on non-PCIe devices because pcie_capability_clear_and_set_word(), pcie_cap_has_lnkctl(), etc., would fail before doing any harm. But it's ugly to depend on those internals. Check the device type before attempting to apply Type 1 and Type 2 Setting Records (Type 0 records are applicable to PCI, PCI-X, and PCIe devices). A side benefit is that this prevents useless "not supported" warnings when a BIOS supplies a Type 1 (PCI-X) Setting Record and we try to apply it to every single device: pci 0000:00:00.0: PCI-X settings not supported After this patch, we'll get the warning only when a BIOS supplies a Type 1 record and we have a PCI-X device to which it should be applied. Link: https://bugzilla.kernel.org/show_bug.cgi?id=187731 Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/acpi/pci_mcfg.c')
0 files changed, 0 insertions, 0 deletions