diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2019-03-07 00:30:24 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2019-03-07 00:30:24 +0300 |
commit | dd92b6677e3d0d78e261a7f00f28e753bab41d24 (patch) | |
tree | b82b192a9eac7d6bea432aae2986f407b5ceeecf /drivers | |
parent | 5b90fc562cbc59cef10689ab0716c724d927c600 (diff) | |
parent | 0294951030eb8e7d808d7f151a2cf0a2ef1afb64 (diff) | |
download | linux-dd92b6677e3d0d78e261a7f00f28e753bab41d24.tar.xz |
Merge branch 'remotes/lorenzo/pci/vmd'
- Configure MPS settings for VMD root ports (Jon Derrick)
* remotes/lorenzo/pci/vmd:
PCI/VMD: Configure MPS settings before adding devices
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/controller/vmd.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c index 3890812cdf87..cf6816b55b5e 100644 --- a/drivers/pci/controller/vmd.c +++ b/drivers/pci/controller/vmd.c @@ -571,6 +571,7 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features) LIST_HEAD(resources); resource_size_t offset[2] = {0}; resource_size_t membar2_offset = 0x2000, busn_start = 0; + struct pci_bus *child; /* * Shadow registers may exist in certain VMD device ids which allow @@ -698,7 +699,19 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features) vmd_attach_resources(vmd); vmd_setup_dma_ops(vmd); dev_set_msi_domain(&vmd->bus->dev, vmd->irq_domain); - pci_rescan_bus(vmd->bus); + + pci_scan_child_bus(vmd->bus); + pci_assign_unassigned_bus_resources(vmd->bus); + + /* + * VMD root buses are virtual and don't return true on pci_is_pcie() + * and will fail pcie_bus_configure_settings() early. It can instead be + * run on each of the real root ports. + */ + list_for_each_entry(child, &vmd->bus->children, node) + pcie_bus_configure_settings(child); + + pci_bus_add_devices(vmd->bus); WARN(sysfs_create_link(&vmd->dev->dev.kobj, &vmd->bus->dev.kobj, "domain"), "Can't create symlink to domain\n"); |