diff mbox

PCI: xgene: Remove leftover pci_scan_child_bus() call

Message ID 20171121154931.7724-1-lorenzo.pieralisi@arm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lorenzo Pieralisi Nov. 21, 2017, 3:49 p.m. UTC
The changes in commit 9af275be15f7 ("PCI: xgene: Convert PCI scan API to
pci_scan_root_bus_bridge()") converted the xgene PCI host driver to
the new pci_scan_root_bus_bridge() bus scanning API but erroneously left
the existing pci_scan_child_bus() call in place which resulted in duplicate
PCI bus enumerations.

Remove the leftover pci_scan_child_bus() call to properly complete the API
conversion.

Fixes: 9af275be15f7 ("PCI: xgene: Convert PCI scan API to pci_scan_root_bus_bridge()")
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Tanmay Inamdar <tinamdar@apm.com>
---
 drivers/pci/host/pci-xgene.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Lorenzo Pieralisi Dec. 8, 2017, 11:23 a.m. UTC | #1
Hi Tanmay,

On Tue, Nov 21, 2017 at 03:49:31PM +0000, Lorenzo Pieralisi wrote:
> The changes in commit 9af275be15f7 ("PCI: xgene: Convert PCI scan API to
> pci_scan_root_bus_bridge()") converted the xgene PCI host driver to
> the new pci_scan_root_bus_bridge() bus scanning API but erroneously left
> the existing pci_scan_child_bus() call in place which resulted in duplicate
> PCI bus enumerations.
> 
> Remove the leftover pci_scan_child_bus() call to properly complete the API
> conversion.
> 
> Fixes: 9af275be15f7 ("PCI: xgene: Convert PCI scan API to pci_scan_root_bus_bridge()")
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Tanmay Inamdar <tinamdar@apm.com>
> ---
>  drivers/pci/host/pci-xgene.c | 1 -
>  1 file changed, 1 deletion(-)

Would you mind testing this fix and tag accordingly so that I can ask
Bjorn to pull it please ?

Thanks,
Lorenzo

> diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c
> index 465aa2a..e60c457 100644
> --- a/drivers/pci/host/pci-xgene.c
> +++ b/drivers/pci/host/pci-xgene.c
> @@ -668,7 +668,6 @@ static int xgene_pcie_probe(struct platform_device *pdev)
>  
>  	bus = bridge->bus;
>  
> -	pci_scan_child_bus(bus);
>  	pci_assign_unassigned_bus_resources(bus);
>  	list_for_each_entry(child, &bus->children, node)
>  		pcie_bus_configure_settings(child);
> -- 
> 2.9.5
>
Khuong Dinh Dec. 8, 2017, 6:32 p.m. UTC | #2
Hi Lorenzo,

On Tue, Nov 21, 2017 at 7:49 AM, Lorenzo Pieralisi
<lorenzo.pieralisi@arm.com> wrote:
> The changes in commit 9af275be15f7 ("PCI: xgene: Convert PCI scan API to
> pci_scan_root_bus_bridge()") converted the xgene PCI host driver to
> the new pci_scan_root_bus_bridge() bus scanning API but erroneously left
> the existing pci_scan_child_bus() call in place which resulted in duplicate
> PCI bus enumerations.
>
> Remove the leftover pci_scan_child_bus() call to properly complete the API
> conversion.
>
> Fixes: 9af275be15f7 ("PCI: xgene: Convert PCI scan API to pci_scan_root_bus_bridge()")
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Tanmay Inamdar <tinamdar@apm.com>
> ---
>  drivers/pci/host/pci-xgene.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c
> index 465aa2a..e60c457 100644
> --- a/drivers/pci/host/pci-xgene.c
> +++ b/drivers/pci/host/pci-xgene.c
> @@ -668,7 +668,6 @@ static int xgene_pcie_probe(struct platform_device *pdev)
>
>         bus = bridge->bus;
>
> -       pci_scan_child_bus(bus);
>         pci_assign_unassigned_bus_resources(bus);
>         list_for_each_entry(child, &bus->children, node)
>                 pcie_bus_configure_settings(child);
> --
> 2.9.5
>

It is good with X-Gene

Tested-by: Khuong Dinh <kdinh@apm.com>
Lorenzo Pieralisi Dec. 15, 2017, 1:32 p.m. UTC | #3
On Fri, Dec 08, 2017 at 10:32:52AM -0800, Khuong Dinh wrote:
> Hi Lorenzo,
> 
> On Tue, Nov 21, 2017 at 7:49 AM, Lorenzo Pieralisi
> <lorenzo.pieralisi@arm.com> wrote:
> > The changes in commit 9af275be15f7 ("PCI: xgene: Convert PCI scan API to
> > pci_scan_root_bus_bridge()") converted the xgene PCI host driver to
> > the new pci_scan_root_bus_bridge() bus scanning API but erroneously left
> > the existing pci_scan_child_bus() call in place which resulted in duplicate
> > PCI bus enumerations.
> >
> > Remove the leftover pci_scan_child_bus() call to properly complete the API
> > conversion.
> >
> > Fixes: 9af275be15f7 ("PCI: xgene: Convert PCI scan API to pci_scan_root_bus_bridge()")
> > Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > Cc: Bjorn Helgaas <bhelgaas@google.com>
> > Cc: Tanmay Inamdar <tinamdar@apm.com>
> > ---
> >  drivers/pci/host/pci-xgene.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c
> > index 465aa2a..e60c457 100644
> > --- a/drivers/pci/host/pci-xgene.c
> > +++ b/drivers/pci/host/pci-xgene.c
> > @@ -668,7 +668,6 @@ static int xgene_pcie_probe(struct platform_device *pdev)
> >
> >         bus = bridge->bus;
> >
> > -       pci_scan_child_bus(bus);
> >         pci_assign_unassigned_bus_resources(bus);
> >         list_for_each_entry(child, &bus->children, node)
> >                 pcie_bus_configure_settings(child);
> > --
> > 2.9.5
> >
> 
> It is good with X-Gene
> 
> Tested-by: Khuong Dinh <kdinh@apm.com>

Thank you. Bjorn, I will queue this for v4.16 - I would add a stable tag
since we have v4.13+ kernels scanning the bus twice on xgene, I am not
too happy about this.

Thanks,
Lorenzo
diff mbox

Patch

diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c
index 465aa2a..e60c457 100644
--- a/drivers/pci/host/pci-xgene.c
+++ b/drivers/pci/host/pci-xgene.c
@@ -668,7 +668,6 @@  static int xgene_pcie_probe(struct platform_device *pdev)
 
 	bus = bridge->bus;
 
-	pci_scan_child_bus(bus);
 	pci_assign_unassigned_bus_resources(bus);
 	list_for_each_entry(child, &bus->children, node)
 		pcie_bus_configure_settings(child);