Re: [PATCH] PCI/portdrv: Allow probing even without child services

From: Brian Norris

Date: Mon Feb 09 2026 - 20:17:35 EST


(Sorry for some delay. Other priorities take over sometimes...)

On Thu, Jan 15, 2026 at 09:44:40AM +0100, Lukas Wunner wrote:
> I note that pcie_portdrv_remove() calls pci_disable_device()
> unconditionally. You may need an extra struct with an extra flag
> to remember whether pci_disable_device() needs to be called on remove.

Note that pci_enable_device() and pci_set_master() are separate
operations. With the proposed change, we may undo the latter, but not
the former. So remove() will still need to call pci_disable_device(),
which automatically handles clearing the master bit if needed, without
extra state tracking.

So I don't see the problem here.

At any rate, I've sent v2 that I think addresses everything. Feel free
to tell me I'm wrong there if needed :)

Brian

P.S. This whole concern is likely for naught if the port actually has a
device at the other end, since pci_enable_bridge() will set the master
bit anyway.