diff options
author | Yinghai Lu <yinghai@kernel.org> | 2014-11-11 12:09:46 -0800 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-11-13 15:43:42 -0700 |
commit | 7a1562d4f2d01721ad07c3a326db7512077ceea9 (patch) | |
tree | 4b146df04163b8de218cdaa9ae79b49ac7735355 /drivers/pci/probe.c | |
parent | 2801f7252d5be3f4f3886c2a5890284232801afe (diff) |
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>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 5ed99309c758..6244b1834dfe 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1323,7 +1323,7 @@ static void program_hpp_type2(struct pci_dev *dev, struct hpp_type2 *hpp) ~hpp->pci_exp_devctl_and, hpp->pci_exp_devctl_or); /* Initialize Link Control Register */ - if (dev->subordinate) + if (pcie_cap_has_lnkctl(dev)) pcie_capability_clear_and_set_word(dev, PCI_EXP_LNKCTL, ~hpp->pci_exp_lnkctl_and, hpp->pci_exp_lnkctl_or); |