Re: [PATCH v2] driver core: Check drivers_autoprobe for all added devices

From: Greg KH

Date: Tue Oct 14 2025 - 01:14:31 EST


On Mon, Oct 13, 2025 at 07:14:59PM +0100, Vincent Liu wrote:
> When a device is hot-plugged, the drivers_autoprobe sysfs attribute is
> not checked. This means that drivers_autoprobe is not working as
> intended, e.g. hot-plugged PCIe devices will still be autoprobed and
> bound to drivers even with drivers_autoprobe disabled.
>
> Make sure all devices check drivers_autoprobe by pushing the
> drivers_autoprobe check into device_initial_probe. This will only
> affect devices on the PCI bus for now as device_initial_probe is only
> called by pci_bus_add_device and bus_probe_device (but bus_probe_device
> already checks for autoprobe). In particular for the PCI devices, only
> hot-plugged PCIe devices/VFs should be affected as the default value of
> pci/drivers_autoprobe remains 1 and can only be cleared from userland.
>
> Any future callers of device_initial_probe will respsect the
> drivers_autoprobe sysfs attribute, but this should be the intended
> purpose of drivers_autoprobe.
>
> Signed-off-by: Vincent Liu <vincent.liu@xxxxxxxxxxx>
> ---
> v1->v2: Change commit subject to include driver core (no code change)
> https://lore.kernel.org/20251001151508.1684592-1-vincent.liu@xxxxxxxxxxx

What commit id does this fix? What devices cause this to happen today
that are seeing this issue? Should this be backported to older kernels?

thanks,

greg k-h