[PATCH v1 1/3] PCI: xilinx: Configure PCIe MPS settings

Bjorn Helgaas helgaas at kernel.org
Fri Feb 10 21:58:29 UTC 2017


On Wed, Feb 08, 2017 at 11:19:56PM -0800, Christoph Hellwig wrote:
> On Wed, Feb 08, 2017 at 04:49:30PM -0600, Bjorn Helgaas wrote:
> > +	list_for_each_entry(child, &bus->children, node)
> > +		pcie_bus_configure_settings(child);
> 
> This loop is duplicated in just about every driver, so it it
> might be a good idea to provide a littler helper for it.

Yeah, you're right.  One reason I didn't is because I would like to
remove these if we can move the MPS setup into the pci_device_add()
path.

We ought to be able to do at least the minimal "configure this new
device to match the existing hierarchy; if that's impossible, disable
the device" sort of thing there.

We probably would still want some sort of bus- or root port- or host
bridge-level configuration that can take a broader view, and that
might be done where we currently have this loop.  But I don't know 
exactly what that should look like.

Bjorn


More information about the devel mailing list