Linux USB
 help / color / mirror / Atom feed
From: "Gary Guo" <gary@garyguo.net>
To: "Mike Lothian" <mike@fireburn.co.uk>, <dakr@kernel.org>,
	<linux-usb@vger.kernel.org>
Cc: <ojeda@kernel.org>, <boqun@kernel.org>, <gary@garyguo.net>,
	<bjorn3_gh@protonmail.com>, <lossin@kernel.org>,
	<a.hindborg@kernel.org>, <aliceryhl@google.com>,
	<tmgross@umich.edu>, <daniel.almeida@collabora.com>,
	<tamird@kernel.org>, <acourbot@nvidia.com>, <work@onurozkan.dev>,
	<gregkh@linuxfoundation.org>, <colinbrauncl@gmail.com>,
	<rust-for-linux@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/5] rust: usb: add revocable typed interface I/O
Date: Mon, 31 Aug 2026 18:10:54 +0100	[thread overview]
Message-ID: <DL3AO2K8IS07.3QB2IM7YJL8WT@garyguo.net> (raw)
In-Reply-To: <CAHbf0-EzHGuQ720V1g84U8Ys8HS+Lpdfdu22zZmB42G8yU=dqQ@mail.gmail.com>

On Mon Aug 31, 2026 at 6:04 PM BST, Mike Lothian wrote:
> On Wed, 26 Aug 2026, Danilo Krummrich wrote:
>> > + /// Asks the driver core to unbind whatever driver is currently bound to this interface.
>>
>> What is this needed for? Where do you use it?
>
> Nothing in this posting uses it. It's a leftover from something I
> removed, and I'm not sure it should have stayed removed.
>
> It backed a write-only sysfs file, /sys/devices/vino/remove_all, which
> walked the driver's list of held interfaces and called
> device_release_driver() on each. evdi has had the same file since 2015
> as /sys/devices/evdi/remove_all, so it's a name people with DisplayLink
> hardware already know.
>
> I added it because unloading the module used to be unsafe. disconnect()
> could deadlock against usb_hub_wq, DRM references were held past unbind
> so every replug leaked a card minor, and one unload took the machine
> down. Having one write that unbound everything from process context,
> with each disconnect running somewhere I could watch it, made those a
> lot easier to find.
>
> They're all fixed now, modprobe -r is reliable, and the sysfs file got
> cut from the series along with the rest of the development scaffolding.
> The binding method survived the cut without its caller.
>
> I'll drop it for v4 either way. The bit I'd like your opinion on is
> whether it should come back later with the user attached. Against:
> /sys/bus/usb/drivers/vino/unbind already does this, and all remove_all
> saves you is knowing which interfaces the driver kept. For: a dock is
> the kind of device where someone wants to hand the hardware back without
> knowing that, and evdi has shipped the file for ten years.

EVDI is not an upstream driver, so the fact that it supports something isn't
really a justification of adding a new API interface that is already covered by
sysfs unbind.

Best,
Gary

  reply	other threads:[~2026-08-31 17:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-26 16:30 [PATCH v3 0/5] rust: usb: host-side abstractions for a bulk-endpoint driver Mike Lothian
2026-08-26 16:30 ` [PATCH v3 1/5] rust: usb: add revocable typed interface I/O Mike Lothian
2026-08-26 18:59   ` Danilo Krummrich
2026-08-31 17:04     ` Mike Lothian
2026-08-31 17:10       ` Gary Guo [this message]
2026-08-26 16:30 ` [PATCH v3 2/5] rust: usb: add reusable URBs and persistent bulk queues Mike Lothian
2026-08-26 16:30 ` [PATCH v3 3/5] rust: usb: expose device descriptor fields and queue readiness Mike Lothian
2026-08-26 16:30 ` [PATCH v3 4/5] rust: usb: add a vendor-and-interface-info device id constructor Mike Lothian
2026-08-26 16:30 ` [PATCH v3 5/5] rust: usb: let a driver keep its interface usable while unbinding Mike Lothian
2026-08-26 18:25 ` [PATCH v3 0/5] rust: usb: host-side abstractions for a bulk-endpoint driver Danilo Krummrich

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=DL3AO2K8IS07.3QB2IM7YJL8WT@garyguo.net \
    --to=gary@garyguo.net \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=colinbrauncl@gmail.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=mike@fireburn.co.uk \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tamird@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=work@onurozkan.dev \
    /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