Re: [PATCH v3] usb: usbfs: Require claiming a hub interface for hub class requests

From: Michal Pecio

Date: Thu Nov 05 2026 - 14:05:03 EST


On Thu, 5 Nov 2026 12:11:43 -0500, Alan Stern wrote:
> On Thu, Nov 05, 2026 at 02:56:27PM +0800, YuanZhe Liu wrote:
> > With the port owner exception above, tools like uhubctl that send
> > SET_FEATURE(PORT_POWER) to a hub without claiming either the port
> > or the interface will still get -EBUSY. Do you want an exception
> > while privileges have not been dropped, or is losing that use case
> > the point?
>
> Well, it _is_ kind of the point.
>
> The only program I know about for manipulating port power settings is
> one I wrote many years ago; it is careful to unbind the hub driver
> before changing any settings.

And the other one is aforementioned uhubctl.

Since v2.5 in 2022, and commit aa7fc0a1 specifically, it uses sysfs
usbX-portY/disable interface if that exists (which is since v6.0).
Otherwise it uses libusb and fails with the v4 patch (I tried).

So if this stays out of old LTS releases, maybe nobody will notice.

> If we want to allow this sort of thing (changing a port's power while
> it is under control of the hub driver), the right way to do it is by
> adding a new command to the hub_ioctl() routine.

Probably redundant at this point.

Regrads,
Michal