Linux USB
 help / color / mirror / Atom feed
* [PATCH v3 0/2] usb: core: fix failed device driver probes, add pre_probe
@ 2026-11-03  3:34 James Clark
  2026-11-03  3:34 ` [PATCH v3 1/2] usb: core: clean up before handing a device to the generic driver James Clark
  2026-11-03  3:34 ` [PATCH v3 2/2] usb: core: add a pre_probe callback for device drivers that may defer James Clark
  0 siblings, 2 replies; 6+ messages in thread
From: James Clark @ 2026-11-03  3:34 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Alan Stern
  Cc: Johan Hovold, Bastien Nocera, Matthias Kaehlcke, Arnd Bergmann,
	Bartosz Golaszewski, Douglas Anderson, Robert Nelson, linux-usb,
	linux-kernel, linux-gpio, regressions

On a BeagleY-AI with BeagleBoard's device tree, kernels since commit
f918e3804498 ("arm64: enable HAVE_SHARED_GPIOS for all ARM64 platforms")
no longer boot to a usable system: the on-board USB hub is re-probed in
a loop. Patch 2 fixes this as Johan Hovold suggested, with a pre_probe
callback that lets onboard_usb_dev defer before the hub is configured.

Patch 1 fixes two pre-existing bugs found by a Sashiko review of v2.

Tested on the BeagleY-AI on top of v7.4-rc1: the board boots normally.
The -ENODEV fallback that patch 1 changes is not reached on this board.

I found this by booting commit 85b4bc79dde7 (net/main during the 7.4
merge window) on a BeagleY-AI with BeagleBoard's device tree. A coding
agent identified the problem, explained it to me and proposed an initial
fix, which was revised numerous times on the basis of comments on v1 and
v2, my feedback and local Sashiko reviews. I verified that the series
fixes the problem on top of v7.4-rc1.

v3:
- Add a patch to fix existing problems, as requested by Alan Stern.
- Patch 2: rebased on it, no other change.
v2: https://lore.kernel.org/all/20261030151919.3511106-1-jjc@jclark.com/
v1: https://lore.kernel.org/all/20261030114705.3159093-1-jjc@jclark.com/

#regzbot introduced: f918e3804498

James Clark (2):
  usb: core: clean up before handing a device to the generic driver
  usb: core: add a pre_probe callback for device drivers that may defer

 drivers/usb/core/driver.c          | 42 ++++++++++++++++++++++++++----
 drivers/usb/misc/onboard_usb_dev.c | 15 ++++++-----
 include/linux/usb.h                | 14 ++++++++++
 3 files changed, 59 insertions(+), 12 deletions(-)


base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
-- 
2.56.0


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

end of thread, other threads:[~2026-11-03  5:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-03  3:34 [PATCH v3 0/2] usb: core: fix failed device driver probes, add pre_probe James Clark
2026-11-03  3:34 ` [PATCH v3 1/2] usb: core: clean up before handing a device to the generic driver James Clark
2026-11-03  3:58   ` sashiko-bot
2026-11-03  3:34 ` [PATCH v3 2/2] usb: core: add a pre_probe callback for device drivers that may defer James Clark
2026-11-03  3:51   ` sashiko-bot
2026-11-03  5:39     ` James Clark

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