Re: [PATCH v5 0/3] driver core: add enumeration failure uevent helper
From: Michal Pecio
Date: Sun Jul 26 2026 - 19:10:23 EST
On Wed, 15 Jul 2026 11:40:25 +0000, Akshay Gujar wrote:
> Hotpluggable buses can detect that a device is physically present, but
> enumeration may still fail early due to protocol-level errors. Today,
> such failures are only reported via kernel log messages, with no
> structured userspace notification.
>
> This series introduces a small, generic helper in the driver core that
> emits a KOBJ_CHANGE uevent when enumeration fails, and wires it into
> the USB hub enumeration failure path as an initial user.
>
> The USB change is intentionally minimal and serves as an initial user
> of the generic helper. Other subsystems may use the helper
> independently if needed.
FWIW, the alternative OS from Redmond has a completely different
solution, at least for USB: the device is registered normally and
remains tracked for as long as it is connected, but it's flagged
as not working and cannot be used. You may connect a bare resistor
between VBUS and D+ or D-, and it will show up in Device Manager.
Whether that's better is debatable. I'm sure it would take a few
panics to find all the places that assume certain descriptors or
operations to always be available on every device.
OTOH, devices which fail "late" could store whatever information
had been gathered up to that point. Recently there were a few cases
of devices failing enumeration for various reasons and people had
to use debug patches to even find their VID/PID to apply quirks.
(A patch is now in progress to at least log these IDs earlier).
Regards,
Michal