Linux USB
 help / color / mirror / Atom feed
From: Michal Pecio <michal.pecio@gmail.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: YuanZhe Liu <25031212351@stu.xidian.edu.cn>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] usb: usbfs: Require claiming a hub interface for hub class requests
Date: Thu, 5 Nov 2026 19:55:57 +0100	[thread overview]
Message-ID: <20261105195557.68e8f04d.michal.pecio@gmail.com> (raw)
In-Reply-To: <d0c16945-29ce-48c5-abe5-2d2c6b562d51@rowland.harvard.edu>

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

  reply	other threads:[~2026-11-05 18:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20261105054333.7811-25031212351@stu.xidian.edu.cn>
2026-11-05  6:56 ` [PATCH v3] usb: usbfs: Require claiming a hub interface for hub class requests YuanZhe Liu
2026-11-05  7:14   ` sashiko-bot
2026-11-05 17:11   ` Alan Stern
2026-11-05 18:55     ` Michal Pecio [this message]
2026-11-05 17:23   ` [PATCH v4] " YuanZhe Liu
2026-11-05 17:41     ` sashiko-bot
2026-11-05 17:44     ` Alan Stern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261105195557.68e8f04d.michal.pecio@gmail.com \
    --to=michal.pecio@gmail.com \
    --cc=25031212351@stu.xidian.edu.cn \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox