msm: pcie: add support to update MPS for all child PCI devices

Update Max Payload size (MPS) for all child PCI devices of RC.
Child PCI devices will have their MPS scaled to at most RC MPS.
Configuring all child PCI devices with the largest MPS possible
will help improve overall PCIe link bandwidth performance.

Change-Id: I871b49a5ec07d020a445a59f622ceec6061dfc26
Signed-off-by: Tony Truong <truong@codeaurora.org>
This commit is contained in:
Tony Truong 2021-02-08 17:27:58 -08:00 • committed by Gerrit - the friendly Code Review server
commit b96fd565f8

View file

@ -4848,7 +4848,7 @@ int msm_pcie_enumerate(u32 rc_idx)
struct pci_dev *pcidev = NULL;
struct pci_host_bridge *bridge;
bool found = false;
struct pci_bus *bus;
struct pci_bus *bus, *child;
resource_size_t iobase = 0;
u32 ids, vendor_id, device_id;
LIST_HEAD(res);
@ -4930,6 +4930,9 @@ int msm_pcie_enumerate(u32 rc_idx)
bus = bridge->bus;
pci_assign_unassigned_bus_resources(bus);
list_for_each_entry(child, &bus->children, node)
pcie_bus_configure_settings(child);
pci_bus_add_devices(bus);
dev->enumerated = true;