[PATCH 00/13] USB: Make USB devices removable

Sascha Hauer s.hauer at pengutronix.de
Wed Sep 2 00:09:24 PDT 2026


On Mon, 31 Aug 2026 15:20:07 +0200, Sascha Hauer wrote:
> So far we assumed that USB devices are not disconnected during barebox
> lifetime, so we would only ever add to the list of devices. This series
> relaxes this assumption. USB storage devices can now be disconnected at
> runtime and the disk devices associated with them properly unregister
> and filesystems are unmounted. Accesses to files on dead devices are
> caught and return an error. Re-plugging USB storage devices works as
> well. We still don't detect changes to the USB topology automatically,
> but a subsequent "usb" command will bring the barebox topology up to
> date with the hardware state.
> 
> [...]

Applied, thanks!

[01/13] usb: don't report device removal after the device name is gone
        https://git.pengutronix.de/cgit/barebox/commit/?id=7a3a32e30619 (link may not be stable)
[02/13] fs: devfs: count an open partition as an open device
        https://git.pengutronix.de/cgit/barebox/commit/?id=ab0c932dd010 (link may not be stable)
[03/13] block: propagate errors from blockdevice_unregister()
        https://git.pengutronix.de/cgit/barebox/commit/?id=1edfb7837469 (link may not be stable)
[04/13] fs: add cdev_umount_all()
        https://git.pengutronix.de/cgit/barebox/commit/?id=7a119d2b8b0d (link may not be stable)
[05/13] block: add blockdevice_unregister_removed()
        https://git.pengutronix.de/cgit/barebox/commit/?id=98316b89f396 (link may not be stable)
[06/13] usb: storage: tear the disk down properly on disconnect
        https://git.pengutronix.de/cgit/barebox/commit/?id=5c91d53ed7f0 (link may not be stable)
[07/13] usb: hub: cancel pending port scans of a removed device
        https://git.pengutronix.de/cgit/barebox/commit/?id=d147d245288d (link may not be stable)
[08/13] usb: reuse the addresses of removed devices
        https://git.pengutronix.de/cgit/barebox/commit/?id=c6f7d39f4130 (link may not be stable)
[09/13] usb: hub: detect disconnected devices
        https://git.pengutronix.de/cgit/barebox/commit/?id=74a489a0b2c1 (link may not be stable)
[10/13] usb: don't keep a dangling root device on enumeration failure
        https://git.pengutronix.de/cgit/barebox/commit/?id=b942752b6cac (link may not be stable)
[11/13] usb: hub: limit the number of ports to USB_MAXCHILDREN
        https://git.pengutronix.de/cgit/barebox/commit/?id=03ec8992741f (link may not be stable)
[12/13] usb: detect unplugged devices on transfer errors
        https://git.pengutronix.de/cgit/barebox/commit/?id=d0bbc92c2d4f (link may not be stable)
[13/13] usb: storage: stop talking to a device that is gone
        https://git.pengutronix.de/cgit/barebox/commit/?id=d143876e10ba (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer at pengutronix.de>




More information about the barebox mailing list