linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/3] PCI: Configure PCIe MPS settings
@ 2017-02-08 22:49 Bjorn Helgaas
  2017-02-08 22:49 ` [PATCH v1 1/3] PCI: xilinx: " Bjorn Helgaas
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Bjorn Helgaas @ 2017-02-08 22:49 UTC (permalink / raw)
  To: linux-pci
  Cc: Rob Herring, Haiyang Zhang, Michal Simek, Jon Mason, Ray Jui,
	linux-arm-kernel, devel, K. Y. Srinivasan, Sören Brinkmann,
	Tanmay Inamdar

[Some of you will get this twice because Gmail and I aren't getting along
today; sorry]

The PCI core doesn't configure the PCIe MPS settings by itself.  Each
host bridge driver has to call pcie_bus_configure_settings() to make
this happen.

Jon fixed this already for pcie-iproc.c.  I propose these similar
patches for other drivers.

HV guys, I included you because create_root_hv_pci_bus() is one place
that calls pci_scan_child_bus() but does not call
pcie_bus_configure_settings().  I know you probably don't strictly
*need* to configure MPS settings in a paravirtual front-end, but the
PCI core does other device configuration in this path:

  pci_scan_child_bus
    pci_scan_slot
      pci_scan_single_device
        pci_device_add
          pci_configure_device
          pci_init_capabilities

and I would like to eventually migrate the MPS configuration into that
same path.  Since we do this other configuration for HV devices
already, I think pcie_bus_configure_settings() should also work (even
if it ends up not doing anything to real devices).

It would make that eventual migration easier if all the
pci_scan_child_bus() callers had the same pattern of calling
pcie_bus_configure_settings().

So would it make sense to make a similar patch for HV?  It looks easy
to add it to create_root_hv_pci_bus(), but I don't know exactly what
to do about pci_devices_present_work().

---

Bjorn Helgaas (3):
      PCI: xilinx: Configure PCIe MPS settings
      PCI: versatile: Configure PCIe MPS settings
      PCI: xgene: Configure PCIe MPS settings


 drivers/pci/host/pci-versatile.c |    4 +++-
 drivers/pci/host/pci-xgene.c     |    4 +++-
 drivers/pci/host/pcie-xilinx.c   |    4 +++-
 3 files changed, 9 insertions(+), 3 deletions(-)

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v1 1/3] PCI: xilinx: Configure PCIe MPS settings
  2017-02-08 22:49 [PATCH v1 0/3] PCI: Configure PCIe MPS settings Bjorn Helgaas
@ 2017-02-08 22:49 ` Bjorn Helgaas
  2017-02-09  7:19   ` Christoph Hellwig
  2017-02-08 22:49 ` [PATCH v1 2/3] PCI: versatile: " Bjorn Helgaas
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Bjorn Helgaas @ 2017-02-08 22:49 UTC (permalink / raw)
  To: linux-pci
  Cc: Rob Herring, Haiyang Zhang, Michal Simek, Jon Mason, Ray Jui,
	linux-arm-kernel, devel, K. Y. Srinivasan, Sören Brinkmann,
	Tanmay Inamdar

From: Bjorn Helgaas <bhelgaas@google.com>

Make sure PCIe MPS settings are valid when we enumerate a new hierarchy.

Based-on-patch-by: Jon Mason <jon.mason@broadcom.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/host/pcie-xilinx.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
index c8616fadccf1..7f030f5d750b 100644
--- a/drivers/pci/host/pcie-xilinx.c
+++ b/drivers/pci/host/pcie-xilinx.c
@@ -632,7 +632,7 @@ static int xilinx_pcie_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct xilinx_pcie_port *port;
-	struct pci_bus *bus;
+	struct pci_bus *bus, *child;
 	int err;
 	resource_size_t iobase = 0;
 	LIST_HEAD(res);
@@ -686,6 +686,8 @@ static int xilinx_pcie_probe(struct platform_device *pdev)
 #ifndef CONFIG_MICROBLAZE
 	pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci);
 #endif
+	list_for_each_entry(child, &bus->children, node)
+		pcie_bus_configure_settings(child);
 	pci_bus_add_devices(bus);
 	return 0;
 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v1 2/3] PCI: versatile: Configure PCIe MPS settings
  2017-02-08 22:49 [PATCH v1 0/3] PCI: Configure PCIe MPS settings Bjorn Helgaas
  2017-02-08 22:49 ` [PATCH v1 1/3] PCI: xilinx: " Bjorn Helgaas
@ 2017-02-08 22:49 ` Bjorn Helgaas
  2017-02-08 22:49 ` [PATCH v1 3/3] PCI: xgene: " Bjorn Helgaas
  2017-02-10 21:59 ` [PATCH v1 0/3] PCI: " Bjorn Helgaas
  3 siblings, 0 replies; 10+ messages in thread
From: Bjorn Helgaas @ 2017-02-08 22:49 UTC (permalink / raw)
  To: linux-pci
  Cc: Rob Herring, Haiyang Zhang, Michal Simek, Jon Mason, Ray Jui,
	linux-arm-kernel, devel, K. Y. Srinivasan, Sören Brinkmann,
	Tanmay Inamdar

From: Bjorn Helgaas <bhelgaas@google.com>

Make sure PCIe MPS settings are valid when we enumerate a new hierarchy.

Based-on-patch-by: Jon Mason <jon.mason@broadcom.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/host/pci-versatile.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/host/pci-versatile.c b/drivers/pci/host/pci-versatile.c
index b7dc07002f13..5ebee7d37ff5 100644
--- a/drivers/pci/host/pci-versatile.c
+++ b/drivers/pci/host/pci-versatile.c
@@ -124,7 +124,7 @@ static int versatile_pci_probe(struct platform_device *pdev)
 	int ret, i, myslot = -1;
 	u32 val;
 	void __iomem *local_pci_cfg_base;
-	struct pci_bus *bus;
+	struct pci_bus *bus, *child;
 	LIST_HEAD(pci_res);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -204,6 +204,8 @@ static int versatile_pci_probe(struct platform_device *pdev)
 
 	pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci);
 	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 0;


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v1 3/3] PCI: xgene: Configure PCIe MPS settings
  2017-02-08 22:49 [PATCH v1 0/3] PCI: Configure PCIe MPS settings Bjorn Helgaas
  2017-02-08 22:49 ` [PATCH v1 1/3] PCI: xilinx: " Bjorn Helgaas
  2017-02-08 22:49 ` [PATCH v1 2/3] PCI: versatile: " Bjorn Helgaas
@ 2017-02-08 22:49 ` Bjorn Helgaas
  2017-02-10 21:59 ` [PATCH v1 0/3] PCI: " Bjorn Helgaas
  3 siblings, 0 replies; 10+ messages in thread
From: Bjorn Helgaas @ 2017-02-08 22:49 UTC (permalink / raw)
  To: linux-pci
  Cc: Rob Herring, Haiyang Zhang, Michal Simek, Jon Mason, Ray Jui,
	Sören Brinkmann, devel, K. Y. Srinivasan, linux-arm-kernel,
	Tanmay Inamdar

From: Bjorn Helgaas <bhelgaas@google.com>

Make sure PCIe MPS settings are valid when we enumerate a new hierarchy.

Based-on-patch-by: Jon Mason <jon.mason@broadcom.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/host/pci-xgene.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c
index 7c3b54b9eb17..8091a8778ae7 100644
--- a/drivers/pci/host/pci-xgene.c
+++ b/drivers/pci/host/pci-xgene.c
@@ -638,7 +638,7 @@ static int xgene_pcie_probe_bridge(struct platform_device *pdev)
 	struct device_node *dn = dev->of_node;
 	struct xgene_pcie_port *port;
 	resource_size_t iobase = 0;
-	struct pci_bus *bus;
+	struct pci_bus *bus, *child;
 	int ret;
 	LIST_HEAD(res);
 
@@ -681,6 +681,8 @@ static int xgene_pcie_probe_bridge(struct platform_device *pdev)
 
 	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 0;
 

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

* Re: [PATCH v1 1/3] PCI: xilinx: Configure PCIe MPS settings
  2017-02-08 22:49 ` [PATCH v1 1/3] PCI: xilinx: " Bjorn Helgaas
@ 2017-02-09  7:19   ` Christoph Hellwig
  2017-02-10 21:58     ` Bjorn Helgaas
  0 siblings, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2017-02-09  7:19 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, Rob Herring, Haiyang Zhang, Michal Simek, Jon Mason,
	Ray Jui, Sören Brinkmann, devel, K. Y. Srinivasan,
	linux-arm-kernel, Tanmay Inamdar

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.

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

* Re: [PATCH v1 1/3] PCI: xilinx: Configure PCIe MPS settings
  2017-02-09  7:19   ` Christoph Hellwig
@ 2017-02-10 21:58     ` Bjorn Helgaas
  0 siblings, 0 replies; 10+ messages in thread
From: Bjorn Helgaas @ 2017-02-10 21:58 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Rob Herring, linux-pci, Haiyang Zhang, Michal Simek, Jon Mason,
	Ray Jui, linux-arm-kernel, devel, K. Y. Srinivasan,
	Sören Brinkmann, Tanmay Inamdar

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v1 0/3] PCI: Configure PCIe MPS settings
  2017-02-08 22:49 [PATCH v1 0/3] PCI: Configure PCIe MPS settings Bjorn Helgaas
                   ` (2 preceding siblings ...)
  2017-02-08 22:49 ` [PATCH v1 3/3] PCI: xgene: " Bjorn Helgaas
@ 2017-02-10 21:59 ` Bjorn Helgaas
  2017-02-24 11:16   ` Dexuan Cui
  3 siblings, 1 reply; 10+ messages in thread
From: Bjorn Helgaas @ 2017-02-10 21:59 UTC (permalink / raw)
  To: linux-pci
  Cc: Rob Herring, Haiyang Zhang, Michal Simek, Jon Mason, Ray Jui,
	Sören Brinkmann, devel, K. Y. Srinivasan, linux-arm-kernel,
	Tanmay Inamdar

On Wed, Feb 08, 2017 at 04:49:22PM -0600, Bjorn Helgaas wrote:
> [Some of you will get this twice because Gmail and I aren't getting along
> today; sorry]
> 
> The PCI core doesn't configure the PCIe MPS settings by itself.  Each
> host bridge driver has to call pcie_bus_configure_settings() to make
> this happen.
> 
> Jon fixed this already for pcie-iproc.c.  I propose these similar
> patches for other drivers.
> 
> HV guys, I included you because create_root_hv_pci_bus() is one place
> that calls pci_scan_child_bus() but does not call
> pcie_bus_configure_settings().  I know you probably don't strictly
> *need* to configure MPS settings in a paravirtual front-end, but the
> PCI core does other device configuration in this path:
> 
>   pci_scan_child_bus
>     pci_scan_slot
>       pci_scan_single_device
>         pci_device_add
>           pci_configure_device
>           pci_init_capabilities
> 
> and I would like to eventually migrate the MPS configuration into that
> same path.  Since we do this other configuration for HV devices
> already, I think pcie_bus_configure_settings() should also work (even
> if it ends up not doing anything to real devices).
> 
> It would make that eventual migration easier if all the
> pci_scan_child_bus() callers had the same pattern of calling
> pcie_bus_configure_settings().
> 
> So would it make sense to make a similar patch for HV?  It looks easy
> to add it to create_root_hv_pci_bus(), but I don't know exactly what
> to do about pci_devices_present_work().
> 
> ---
> 
> Bjorn Helgaas (3):
>       PCI: xilinx: Configure PCIe MPS settings
>       PCI: versatile: Configure PCIe MPS settings
>       PCI: xgene: Configure PCIe MPS settings
> 
> 
>  drivers/pci/host/pci-versatile.c |    4 +++-
>  drivers/pci/host/pci-xgene.c     |    4 +++-
>  drivers/pci/host/pcie-xilinx.c   |    4 +++-
>  3 files changed, 9 insertions(+), 3 deletions(-)

I applied these to pci/host-xilinx, pci/host-versatile, and
pci/host-xgene, respectively, for v4.11.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* RE: [PATCH v1 0/3] PCI: Configure PCIe MPS settings
  2017-02-10 21:59 ` [PATCH v1 0/3] PCI: " Bjorn Helgaas
@ 2017-02-24 11:16   ` Dexuan Cui
  2017-02-24 14:32     ` Bjorn Helgaas
  0 siblings, 1 reply; 10+ messages in thread
From: Dexuan Cui @ 2017-02-24 11:16 UTC (permalink / raw)
  To: Bjorn Helgaas, linux-pci
  Cc: Rob Herring, Haiyang Zhang, Michal Simek, Jon Mason, Ray Jui,
	Sören Brinkmann, devel, linux-arm-kernel, Tanmay Inamdar,
	KY Srinivasan, Long Li

> From: devel [mailto:driverdev-devel..@...] On Behalf Of Bjorn Helgaas
> Sent: Saturday, February 11, 2017 06:00
> ...
> On Wed, Feb 08, 2017 at 04:49:22PM -0600, Bjorn Helgaas wrote:
> > The PCI core doesn't configure the PCIe MPS settings by itself.  Each
> > host bridge driver has to call pcie_bus_configure_settings() to make
> > this happen.
> >
> > Jon fixed this already for pcie-iproc.c.  I propose these similar
> > patches for other drivers.
> >
> > HV guys, I included you because create_root_hv_pci_bus() is one place
> > that calls pci_scan_child_bus() but does not call
> > pcie_bus_configure_settings().  I know you probably don't strictly
> > *need* to configure MPS settings in a paravirtual front-end, but the
> > PCI core does other device configuration in this path:
> >
> >   pci_scan_child_bus
> >     pci_scan_slot
> >       pci_scan_single_device
> >         pci_device_add
> >           pci_configure_device
> >           pci_init_capabilities
> >
> > and I would like to eventually migrate the MPS configuration into that
> > same path.  Since we do this other configuration for HV devices
> > already, I think pcie_bus_configure_settings() should also work (even
> > if it ends up not doing anything to real devices).
> >
> > It would make that eventual migration easier if all the
> > pci_scan_child_bus() callers had the same pattern of calling
> > pcie_bus_configure_settings().
> >
> > So would it make sense to make a similar patch for HV?  It looks easy
> > to add it to create_root_hv_pci_bus(), but I don't know exactly what
> > to do about pci_devices_present_work().

(I'm sorry for the really late response. I neglected the thread somehow...)

Hi Bjorn,
IMO we don't need to make any change to pci-hyperv.c: when a
PCIe device is passed through to a guest on Hyper-V, in the guest the
device only directly appears on a new root bus, and the new root bus
doesn't have any child bus, and the new root bus itself is actually only
a logical concept instead of a concrete device (i.e. it doesn't have its
own BDF at all).

So, in the path pci_scan_child_bus -> ... -> pci_device_add ->
pci_configure_device -> pci_configure_mps, we're sure
pci_upstream_bridge() is NULL, so pci_configure_mps does nothing.

And since the root bus has no child bus, we don't need to call
pcie_bus_configure_settings(child).

Then you may ask how the MPS is set.
I suppose the para-virtual PCI back-end driver on the host
should take care of this properly.

FWIW, after passing through a Mellanox VF to Linux guest, in the
guest I get this for the device by lspci:
        DevCap: MaxPayload 512 bytes
        DevCtl: MaxPayload 128 bytes, MaxReadReq 128 bytes

Thanks
-- Dexuan

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

* Re: [PATCH v1 0/3] PCI: Configure PCIe MPS settings
  2017-02-24 11:16   ` Dexuan Cui
@ 2017-02-24 14:32     ` Bjorn Helgaas
  0 siblings, 0 replies; 10+ messages in thread
From: Bjorn Helgaas @ 2017-02-24 14:32 UTC (permalink / raw)
  To: Dexuan Cui
  Cc: linux-pci, Rob Herring, Haiyang Zhang, Michal Simek, Jon Mason,
	Ray Jui, Sören Brinkmann, devel, linux-arm-kernel,
	Tanmay Inamdar, KY Srinivasan, Long Li

On Fri, Feb 24, 2017 at 11:16:03AM +0000, Dexuan Cui wrote:
> > From: devel [mailto:driverdev-devel..@...] On Behalf Of Bjorn Helgaas
> > Sent: Saturday, February 11, 2017 06:00
> > ...
> > On Wed, Feb 08, 2017 at 04:49:22PM -0600, Bjorn Helgaas wrote:
> > > The PCI core doesn't configure the PCIe MPS settings by itself.  Each
> > > host bridge driver has to call pcie_bus_configure_settings() to make
> > > this happen.
> > >
> > > Jon fixed this already for pcie-iproc.c.  I propose these similar
> > > patches for other drivers.
> > >
> > > HV guys, I included you because create_root_hv_pci_bus() is one place
> > > that calls pci_scan_child_bus() but does not call
> > > pcie_bus_configure_settings().  I know you probably don't strictly
> > > *need* to configure MPS settings in a paravirtual front-end, but the
> > > PCI core does other device configuration in this path:
> > >
> > >   pci_scan_child_bus
> > >     pci_scan_slot
> > >       pci_scan_single_device
> > >         pci_device_add
> > >           pci_configure_device
> > >           pci_init_capabilities
> > >
> > > and I would like to eventually migrate the MPS configuration into that
> > > same path.  Since we do this other configuration for HV devices
> > > already, I think pcie_bus_configure_settings() should also work (even
> > > if it ends up not doing anything to real devices).
> > >
> > > It would make that eventual migration easier if all the
> > > pci_scan_child_bus() callers had the same pattern of calling
> > > pcie_bus_configure_settings().
> > >
> > > So would it make sense to make a similar patch for HV?  It looks easy
> > > to add it to create_root_hv_pci_bus(), but I don't know exactly what
> > > to do about pci_devices_present_work().
> 
> (I'm sorry for the really late response. I neglected the thread somehow...)

No problem, I'm kind of bad about that, too.

> Hi Bjorn,
> IMO we don't need to make any change to pci-hyperv.c: when a
> PCIe device is passed through to a guest on Hyper-V, in the guest the
> device only directly appears on a new root bus, and the new root bus
> doesn't have any child bus, and the new root bus itself is actually only
> a logical concept instead of a concrete device (i.e. it doesn't have its
> own BDF at all).
> 
> So, in the path pci_scan_child_bus -> ... -> pci_device_add ->
> pci_configure_device -> pci_configure_mps, we're sure
> pci_upstream_bridge() is NULL, so pci_configure_mps does nothing.
> 
> And since the root bus has no child bus, we don't need to call
> pcie_bus_configure_settings(child).
> 
> Then you may ask how the MPS is set.
> I suppose the para-virtual PCI back-end driver on the host
> should take care of this properly.
> 
> FWIW, after passing through a Mellanox VF to Linux guest, in the
> guest I get this for the device by lspci:
>         DevCap: MaxPayload 512 bytes
>         DevCtl: MaxPayload 128 bytes, MaxReadReq 128 bytes

My question wasn't so much whether pci-hyperv.c *needs* to set MPS; I
don't expect a guest to need to or even be able to configure things
like that.

My question is whether it would do any harm if we did eventually do
MPS configuration in the generic pci_scan_child_bus() path.  If/when
we do that, the Hyper-V guest will attempt to do MPS configuration.  I
think this would be a no-op.  And I think it would also be a no-op if
we made pci-hyperv.c call pcie_bus_configure_settings() today.

I'm really just looking for confirmation of that.  If it is true that
these are no-ops, I would consider adding a pci-hyperv.c call to
pcie_bus_configure_settings() simply to make it conform to the pattern
that "everything that calls pci_scan_child_bus() should also call
pcie_bus_configure_settings()".

If every caller of pci_scan_child_bus() also calls
pcie_bus_configure_settings(), it will make it easier in the future to
fold pcie_bus_configure_settings() into pci_scan_child_bus().

Bjorn

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

* [PATCH v1 1/3] PCI: xilinx: Configure PCIe MPS settings
  2017-02-08 22:08 Bjorn Helgaas
@ 2017-02-08 22:08 ` Bjorn Helgaas
  0 siblings, 0 replies; 10+ messages in thread
From: Bjorn Helgaas @ 2017-02-08 22:08 UTC (permalink / raw)
  To: linux-pci
  Cc: Rob Herring, Haiyang Zhang, Michal Simek, Jon Mason, Ray Jui,
	linux-arm-kernel, devel, K. Y. Srinivasan, Sören Brinkmann,
	Tanmay Inamdar

Make sure PCIe MPS settings are valid when we enumerate a new hierarchy.

Based-on-patch-by: Jon Mason <jon.mason@broadcom.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/host/pcie-xilinx.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
index c8616fadccf1..7f030f5d750b 100644
--- a/drivers/pci/host/pcie-xilinx.c
+++ b/drivers/pci/host/pcie-xilinx.c
@@ -632,7 +632,7 @@ static int xilinx_pcie_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct xilinx_pcie_port *port;
-	struct pci_bus *bus;
+	struct pci_bus *bus, *child;
 	int err;
 	resource_size_t iobase = 0;
 	LIST_HEAD(res);
@@ -686,6 +686,8 @@ static int xilinx_pcie_probe(struct platform_device *pdev)
 #ifndef CONFIG_MICROBLAZE
 	pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci);
 #endif
+	list_for_each_entry(child, &bus->children, node)
+		pcie_bus_configure_settings(child);
 	pci_bus_add_devices(bus);
 	return 0;
 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2017-02-24 14:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-08 22:49 [PATCH v1 0/3] PCI: Configure PCIe MPS settings Bjorn Helgaas
2017-02-08 22:49 ` [PATCH v1 1/3] PCI: xilinx: " Bjorn Helgaas
2017-02-09  7:19   ` Christoph Hellwig
2017-02-10 21:58     ` Bjorn Helgaas
2017-02-08 22:49 ` [PATCH v1 2/3] PCI: versatile: " Bjorn Helgaas
2017-02-08 22:49 ` [PATCH v1 3/3] PCI: xgene: " Bjorn Helgaas
2017-02-10 21:59 ` [PATCH v1 0/3] PCI: " Bjorn Helgaas
2017-02-24 11:16   ` Dexuan Cui
2017-02-24 14:32     ` Bjorn Helgaas
  -- strict thread matches above, loose matches on Subject: below --
2017-02-08 22:08 Bjorn Helgaas
2017-02-08 22:08 ` [PATCH v1 1/3] PCI: xilinx: " Bjorn Helgaas

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).