]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/pci/probe.c
PCI: Apply _HPX Link Control settings to all devices with a link
authorYinghai Lu <yinghai@kernel.org>
Tue, 11 Nov 2014 20:09:46 +0000 (12:09 -0800)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 13 Nov 2014 22:43:42 +0000 (15:43 -0700)
commit7a1562d4f2d01721ad07c3a326db7512077ceea9
tree4b146df04163b8de218cdaa9ae79b49ac7735355
parent2801f7252d5be3f4f3886c2a5890284232801afe
PCI: Apply _HPX Link Control settings to all devices with a link

Previously we applied _HPX type 2 record Link Control register settings
only to bridges with a subordinate bus.  But it's better to apply them to
all devices with a link because if the subordinate bus has not been
allocated yet, we won't apply settings to the device.

Use pcie_cap_has_lnkctl() to determine whether the device has a Link
Control register instead of looking at dev->subordinate.

[bhelgaas: changelog]
Fixes: 6cd33649fa83 ("PCI: Add pci_configure_device() during enumeration")
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/access.c
drivers/pci/pci.h
drivers/pci/probe.c