* [PATCH v2] PCI: host-common: Request bus reassignment when not probe-only
@ 2026-04-14 8:17 Ratheesh Kannoth
2026-05-01 17:11 ` Manivannan Sadhasivam
2026-05-04 22:49 ` Bjorn Helgaas
0 siblings, 2 replies; 5+ messages in thread
From: Ratheesh Kannoth @ 2026-04-14 8:17 UTC (permalink / raw)
To: linux-pci, linux-arm-kernel, linux-kernel, bhelgaas
Cc: will, lpieralisi, kwilczynski, mani, robh, vidyas,
Ratheesh Kannoth, Bjorn Helgaas
pci_host_common_init() is used by several generic ECAM host drivers.
After PCI core changes around pci_flags and preserve_config, these hosts
no longer opted into full bus number reassignment the way they did
before.
When PCI_PROBE_ONLY is not set, add PCI_REASSIGN_ALL_BUS so
pci_scan_bridge_extend() takes the reassignment path: bus numbers can be
assigned from firmware EA data (e.g. pci_ea_fixed_busnrs()). Skip the
flag in probe-only mode so existing assignments are not overridden.
CC: Bjorn Helgaas <helgaas@kernel.org>
CC: Vidya Sagar <vidyas@nvidia.com>
CC: Manivannan Sadhasivam <mani@kernel.org>
Fixes: 7246a4520b4b ("PCI: Use preserve_config in place of pci_flags")
Link: https://lore.kernel.org/netdev/adcXzcz2wWJFw4d7@rkannoth-OptiPlex-7090/
Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
---
v1 -> v2 : https://lore.kernel.org/linux-pci/20260410142124.2673056-1-rkannoth@marvell.com/
---
drivers/pci/controller/pci-host-common.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/pci/controller/pci-host-common.c b/drivers/pci/controller/pci-host-common.c
index d6258c1cffe5..99952fb7189b 100644
--- a/drivers/pci/controller/pci-host-common.c
+++ b/drivers/pci/controller/pci-host-common.c
@@ -68,6 +68,10 @@ int pci_host_common_init(struct platform_device *pdev,
if (IS_ERR(cfg))
return PTR_ERR(cfg);
+ /* Do not reassign bus numbers if probe only */
+ if (!pci_has_flag(PCI_PROBE_ONLY))
+ pci_add_flags(PCI_REASSIGN_ALL_BUS);
+
bridge->sysdata = cfg;
bridge->ops = (struct pci_ops *)&ops->pci_ops;
bridge->enable_device = ops->enable_device;
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v2] PCI: host-common: Request bus reassignment when not probe-only
2026-04-14 8:17 [PATCH v2] PCI: host-common: Request bus reassignment when not probe-only Ratheesh Kannoth
@ 2026-05-01 17:11 ` Manivannan Sadhasivam
2026-05-04 22:49 ` Bjorn Helgaas
1 sibling, 0 replies; 5+ messages in thread
From: Manivannan Sadhasivam @ 2026-05-01 17:11 UTC (permalink / raw)
To: linux-pci, linux-arm-kernel, linux-kernel, bhelgaas,
Ratheesh Kannoth
Cc: will, lpieralisi, kwilczynski, robh, vidyas, Bjorn Helgaas
On Tue, 14 Apr 2026 13:47:30 +0530, Ratheesh Kannoth wrote:
> pci_host_common_init() is used by several generic ECAM host drivers.
> After PCI core changes around pci_flags and preserve_config, these hosts
> no longer opted into full bus number reassignment the way they did
> before.
>
> When PCI_PROBE_ONLY is not set, add PCI_REASSIGN_ALL_BUS so
> pci_scan_bridge_extend() takes the reassignment path: bus numbers can be
> assigned from firmware EA data (e.g. pci_ea_fixed_busnrs()). Skip the
> flag in probe-only mode so existing assignments are not overridden.
>
> [...]
Applied, thanks!
[1/1] PCI: host-common: Request bus reassignment when not probe-only
commit: 76d06fb36e8e6d1705fbbf75a450e5725199ed5f
Best regards,
--
Manivannan Sadhasivam <mani@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v2] PCI: host-common: Request bus reassignment when not probe-only
2026-04-14 8:17 [PATCH v2] PCI: host-common: Request bus reassignment when not probe-only Ratheesh Kannoth
2026-05-01 17:11 ` Manivannan Sadhasivam
@ 2026-05-04 22:49 ` Bjorn Helgaas
[not found] ` <MN0PR18MB5847809DF7EB9A3ECA4A4159D33E2@MN0PR18MB5847.namprd18.prod.outlook.com>
1 sibling, 1 reply; 5+ messages in thread
From: Bjorn Helgaas @ 2026-05-04 22:49 UTC (permalink / raw)
To: Ratheesh Kannoth
Cc: linux-pci, linux-arm-kernel, linux-kernel, bhelgaas, will,
lpieralisi, kwilczynski, mani, robh, vidyas
On Tue, Apr 14, 2026 at 01:47:30PM +0530, Ratheesh Kannoth wrote:
> pci_host_common_init() is used by several generic ECAM host drivers.
> After PCI core changes around pci_flags and preserve_config, these hosts
> no longer opted into full bus number reassignment the way they did
> before.
>
> When PCI_PROBE_ONLY is not set, add PCI_REASSIGN_ALL_BUS so
> pci_scan_bridge_extend() takes the reassignment path: bus numbers can be
> assigned from firmware EA data (e.g. pci_ea_fixed_busnrs()). Skip the
> flag in probe-only mode so existing assignments are not overridden.
>
> CC: Bjorn Helgaas <helgaas@kernel.org>
> CC: Vidya Sagar <vidyas@nvidia.com>
> CC: Manivannan Sadhasivam <mani@kernel.org>
> Fixes: 7246a4520b4b ("PCI: Use preserve_config in place of pci_flags")
> Link: https://lore.kernel.org/netdev/adcXzcz2wWJFw4d7@rkannoth-OptiPlex-7090/
> Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
Thanks for the fix! Was there a bug report associated with this? Is
there a symptom we can mention so we can connect the problem to this
solution?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-05-06 2:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-14 8:17 [PATCH v2] PCI: host-common: Request bus reassignment when not probe-only Ratheesh Kannoth
2026-05-01 17:11 ` Manivannan Sadhasivam
2026-05-04 22:49 ` Bjorn Helgaas
[not found] ` <MN0PR18MB5847809DF7EB9A3ECA4A4159D33E2@MN0PR18MB5847.namprd18.prod.outlook.com>
2026-05-05 15:25 ` Bjorn Helgaas
2026-05-06 2:46 ` Ratheesh Kannoth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox