linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI MPS settings on rescan
@ 2018-10-15 14:37 Jon Derrick
  2018-10-15 14:37 ` [PATCH] PCI: Configure MPS " Jon Derrick
  0 siblings, 1 reply; 2+ messages in thread
From: Jon Derrick @ 2018-10-15 14:37 UTC (permalink / raw)
  To: linux-pci; +Cc: Bjorn Helgaas, Lorenzo Pieralisi, Jon Derrick

Hi Bjorn, Lorenzo,

This is an alternative patch to the VMD-targeted patch to perform MPS setting
generically for callers of pci_rescan_bus.

Ref:
https://patchwork.ozlabs.org/patch/966129/

Jon Derrick (1):
  PCI: Configure MPS on rescan

 drivers/pci/probe.c | 3 +++
 1 file changed, 3 insertions(+)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] PCI: Configure MPS on rescan
  2018-10-15 14:37 [PATCH] PCI MPS settings on rescan Jon Derrick
@ 2018-10-15 14:37 ` Jon Derrick
  0 siblings, 0 replies; 2+ messages in thread
From: Jon Derrick @ 2018-10-15 14:37 UTC (permalink / raw)
  To: linux-pci; +Cc: Bjorn Helgaas, Lorenzo Pieralisi, Jon Derrick

During pci_rescan_bus(), we may encounter new busses and devices which
don't have MPS set for compatibility. Using this path, newly discovered
busses and devices would then require their MPS to be configured after
driver attachment, which will often be too later for drivers which do
memory transactions on probe. This additionally ensures that any
pcie_bus_config kernel settings will be applied to the busses and devices
discovered through this path prior to driver attachment.

Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
---
 drivers/pci/probe.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 201f9e5..c0406d9 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -3149,10 +3149,13 @@ unsigned int pci_rescan_bus_bridge_resize(struct pci_dev *bridge)
  */
 unsigned int pci_rescan_bus(struct pci_bus *bus)
 {
+	struct pci_bus *child;
 	unsigned int max;
 
 	max = pci_scan_child_bus(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);
 
 	return max;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-15 14:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-15 14:37 [PATCH] PCI MPS settings on rescan Jon Derrick
2018-10-15 14:37 ` [PATCH] PCI: Configure MPS " Jon Derrick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).