Re: clarification: PCI device not getting enumerated

From: Ratheesh Kannoth

Date: Wed Apr 08 2026 - 23:08:22 EST


On 2026-04-02 at 01:02:15, Bjorn Helgaas (helgaas@xxxxxxxxxx) wrote:
> [+to Vidya, any thoughts on this?]

Bjorn, Vidya,

If i revert below 2 lines of code from commit 7246a4520b4bf1494d7d030166a11b5226f6d508,
PCI device gets enumerated.

diff --git a/drivers/pci/controller/pci-host-common.c b/drivers/pci/controller/pci-host-common.c
index 45b71806182d..c96b2de163b5 100644
--- a/drivers/pci/controller/pci-host-common.c
+++ b/drivers/pci/controller/pci-host-common.c
@@ -73,10 +73,6 @@ int pci_host_common_probe(struct platform_device *pdev)
if (IS_ERR(cfg))
return PTR_ERR(cfg);

- /* Do not reassign resources 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->msi_domain = true;

Commit message (7246a4520b4bf1494d7d030166a11b5226f6d508) says,

" This also obviates the use of adding PCI_REASSIGN_ALL_BUS flag if
!PCI_PROBE_ONLY, as pci_assign_unassigned_root_bus_resources() takes care
of reassigning the resources that are not already claimed."

The statement says that PCI_REASSIGN_ALL_BUS is essentially redundant (unnecessary).
Let me know if there is any other side effects, else i can push a patch with these
two lines reverted.