Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [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; 7+ 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] 7+ 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; 7+ 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] 7+ 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; 7+ 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] 7+ messages in thread

* Re: Re: [PATCH v2] PCI: host-common: Request bus reassignment when not probe-only
       [not found]   ` <MN0PR18MB5847809DF7EB9A3ECA4A4159D33E2@MN0PR18MB5847.namprd18.prod.outlook.com>
@ 2026-05-05 15:25     ` Bjorn Helgaas
  2026-05-06  2:46       ` Ratheesh Kannoth
  0 siblings, 1 reply; 7+ messages in thread
From: Bjorn Helgaas @ 2026-05-05 15:25 UTC (permalink / raw)
  To: Ratheesh Kannoth
  Cc: Bjorn Helgaas, linux-pci@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, bhelgaas@google.com,
	will@kernel.org, lpieralisi@kernel.org, kwilczynski@kernel.org,
	mani@kernel.org, robh@kernel.org, vidyas@nvidia.com

On Mon, May 4, 2026 at 9:49 PM Ratheesh Kannoth <rkannoth@marvell.com> wrote:
>
> ZjQcmQRYFpfptBannerEnd
>
> 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://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_netdev_adcXzcz2wWJFw4d7-40rkannoth-2DOptiPlex-2D7090_&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=aekcsyBCH00_LewrEDcQBzsRw8KCpUR0vZb_auTHk4M&m=01Ocq--c6MApFtcfadw2NVeNuCaGZBUwjA3VpG_9uhWaoPultvNor45uL_Eiijk8&s=b9P4fxav0nsyokGf8a2Tm_XrNqunGO4YOS6RJ29_iuk&e=
>
> > Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
>
>
>
> > Was there a bug report associated with this?
>
> Please find Bug https://bugzilla.kernel.org/show_bug.cgi?id=221219 reported by me.

I don't have access to that bug report.  If there's nothing secret in
it, can you make it public?

I assume this is the same issue you mentioned at
https://lore.kernel.org/all/abkqm_LCd9zAM8cW@rkannoth-OptiPlex-7090/?

Your email response was HTML, so the mailing lists rejected it, which
is why your response doesn't appear here:
https://lore.kernel.org/all/20260414081730.3864372-1-rkannoth@marvell.com/t/#u

If you can send plain-text emails, that will work better in the Linux
ecosystem.  More details at
https://people.kernel.org/tglx/notes-about-netiquette

Bjorn


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

* RE: Re: Re: [PATCH v2] PCI: host-common: Request bus reassignment when not probe-only
  2026-05-05 15:25     ` Bjorn Helgaas
@ 2026-05-06  2:46       ` Ratheesh Kannoth
  2026-06-12  4:03         ` Ratheesh Kannoth
  0 siblings, 1 reply; 7+ messages in thread
From: Ratheesh Kannoth @ 2026-05-06  2:46 UTC (permalink / raw)
  To: bjorn@helgaas.com
  Cc: Bjorn Helgaas, linux-pci@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, bhelgaas@google.com,
	will@kernel.org, lpieralisi@kernel.org, kwilczynski@kernel.org,
	mani@kernel.org, robh@kernel.org, vidyas@nvidia.com

>From: Bjorn Helgaas <bjorn.helgaas@gmail.com> 
>Sent: Tuesday, May 5, 2026 8:55 PM

>I don't have access to that bug report.  If there's nothing secret in
>it, can you make it public?
Apologies for the access issue. I am still familiarizing myself with the platform's privacy settings, but I certainly intended for this to be a public report. 
I'll explore the settings now to make it generic/public and will get back to you

>I assume this is the same issue you mentioned at
>https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_all_abkqm-5FLCd9zAM8cW-40rkannoth-2DOptiPlex-2D7090_-3F&d=DwIFaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=aekcsyBCH00_LewrEDcQBzsRw8KCpUR0vZb_auTHk4M&m=yH7EeBe9HwRllD8K->PFNS2CMFSlcaBHU6o3DYa1xndJvwVSHI4aPWi98uDKPRIJI&s=BK4_NvmXaqyszkMVHWAPTa9MeaX-26Ka3xT6NKSXwFQ&e=
Yes. I believe, we can ignore Bugzilla report as per https://www.kernel.org/doc/html/v4.19/admin-guide/reporting-bugs.html ?
"Once you know the subsystem that is causing the issue, you should send a bug report. Some maintainers prefer bugs to be reported via bugzilla (https://bugzilla.kernel.org), while others prefer that bugs be reported via the subsystem mailing list."

>Your email response was HTML, so the mailing lists rejected it, which
>is why your response doesn't appear here:
>https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_all_20260414081730.3864372-2D1-2Drkannoth-40marvell.com_t_-23u&d=DwIFaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=aekcsyBCH00_LewrEDcQBzsRw8KCpUR0vZb_auTHk4M&m=yH7EeBe9HwRllD8K->PFNS2CMFSlcaBHU6o3DYa1xndJvwVSHI4aPWi98uDKPRIJI&s=7Xf3ikUPZpTjbnX3B0zimpsHFMgJx8guRkyGAl7GXz8&e=
Sorry about that. My mail client (Outlook) defaulted to HTML formatting. Will be more careful in future.


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

* RE: Re: Re: [PATCH v2] PCI: host-common: Request bus reassignment when not probe-only
  2026-05-06  2:46       ` Ratheesh Kannoth
@ 2026-06-12  4:03         ` Ratheesh Kannoth
  2026-06-22 16:56           ` Bjorn Helgaas
  0 siblings, 1 reply; 7+ messages in thread
From: Ratheesh Kannoth @ 2026-06-12  4:03 UTC (permalink / raw)
  To: bjorn@helgaas.com
  Cc: Bjorn Helgaas, linux-pci@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, bhelgaas@google.com,
	will@kernel.org, lpieralisi@kernel.org, kwilczynski@kernel.org,
	mani@kernel.org, robh@kernel.org, vidyas@nvidia.com


> >From: Bjorn Helgaas <bjorn.helgaas@gmail.com>
> >Sent: Tuesday, May 5, 2026 8:55 PM
> 
> >I don't have access to that bug report.  If there's nothing secret in
> >it, can you make it public?
> Apologies for the access issue. I am still familiarizing myself with the
> platform's privacy settings, but I certainly intended for this to be a public
> report.
> I'll explore the settings now to make it generic/public and will get back to you
> 
> >I assume this is the same issue you mentioned at
> >https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_al
> >l_abkqm-5FLCd9zAM8cW-40rkannoth-2DOptiPlex-2D7090_-
> 3F&d=DwIFaQ&c=nKjWec
> >2b6R0mOyPaz7xtfQ&r=aekcsyBCH00_LewrEDcQBzsRw8KCpUR0vZb_auTHk4
> M&m=yH7EeB
> >e9HwRllD8K-
> >PFNS2CMFSlcaBHU6o3DYa1xndJvwVSHI4aPWi98uDKPRIJI&s=BK4_NvmXa
> >qyszkMVHWAPTa9MeaX-26Ka3xT6NKSXwFQ&e=
> Yes. I believe, we can ignore Bugzilla report as per
> https://www.kernel.org/doc/html/v4.19/admin-guide/reporting-bugs.html ?
> "Once you know the subsystem that is causing the issue, you should send a
> bug report. Some maintainers prefer bugs to be reported via bugzilla
> (https://bugzilla.kernel.org), while others prefer that bugs be reported via the
> subsystem mailing list."
> 
> >Your email response was HTML, so the mailing lists rejected it, which
> >is why your response doesn't appear here:
> >https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_al
> >l_20260414081730.3864372-2D1-2Drkannoth-40marvell.com_t_-
> 23u&d=DwIFaQ&c
> >=nKjWec2b6R0mOyPaz7xtfQ&r=aekcsyBCH00_LewrEDcQBzsRw8KCpUR0vZb
> _auTHk4M&m
> >=yH7EeBe9HwRllD8K-
> >PFNS2CMFSlcaBHU6o3DYa1xndJvwVSHI4aPWi98uDKPRIJI&s=7X
> >f3ikUPZpTjbnX3B0zimpsHFMgJx8guRkyGAl7GXz8&e=
> Sorry about that. My mail client (Outlook) defaulted to HTML formatting. Will
> be more careful in future.
Kindly advise if there are any outstanding action items required from my side. I see that the patch is not available in net-next yet
 or backported to stable versions. I want to ensure I haven't missed a step, so please excuse my impatience if it is simply a matter 
of the usual release cycle.

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

* Re: Re: Re: [PATCH v2] PCI: host-common: Request bus reassignment when not probe-only
  2026-06-12  4:03         ` Ratheesh Kannoth
@ 2026-06-22 16:56           ` Bjorn Helgaas
  0 siblings, 0 replies; 7+ messages in thread
From: Bjorn Helgaas @ 2026-06-22 16:56 UTC (permalink / raw)
  To: Ratheesh Kannoth
  Cc: bjorn@helgaas.com, linux-pci@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, bhelgaas@google.com,
	will@kernel.org, lpieralisi@kernel.org, kwilczynski@kernel.org,
	mani@kernel.org, robh@kernel.org, vidyas@nvidia.com

On Fri, Jun 12, 2026 at 04:03:25AM +0000, Ratheesh Kannoth wrote:
> ...

> Kindly advise if there are any outstanding action items required
> from my side. I see that the patch is not available in net-next yet
> or backported to stable versions. I want to ensure I haven't missed
> a step, so please excuse my impatience if it is simply a matter of
> the usual release cycle.

This is queued on pci/controller/host-common and is in pci/next for
v7.2.  I will ask Linus to pull that branch sometime this week.  This
is separate from net-next, so it won't appear there.  Backports to
stable will happen after Linus pulls the branch.

Bjorn


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

end of thread, other threads:[~2026-06-22 16:56 UTC | newest]

Thread overview: 7+ 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
2026-06-12  4:03         ` Ratheesh Kannoth
2026-06-22 16:56           ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox