[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2025092356-glorious-unbundle-58f6@gregkh>
Date: Tue, 23 Sep 2025 16:37:56 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Danilo Krummrich <dakr@...nel.org>
Cc: Oliver Neukum <oneukum@...e.com>,
Daniel Almeida <daniel.almeida@...labora.com>,
Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <lossin@...nel.org>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org,
linux-usb@...r.kernel.org
Subject: Re: [PATCH 1/2] rust: usb: add basic USB abstractions
On Tue, Sep 23, 2025 at 04:25:46PM +0200, Danilo Krummrich wrote:
> On 9/23/25 4:22 PM, Greg Kroah-Hartman wrote:
> > On Tue, Sep 23, 2025 at 04:16:36PM +0200, Oliver Neukum wrote:
> >> On 23.09.25 16:13, Greg Kroah-Hartman wrote:
> >>
> >>> Functions like usb_fill_bulk_urb() takes a pointer to a usb_device, not
> >>> an interface. Yes, we should fix that, but that "mistake" dates way way
> >>> way back to the original USB api decades ago. So much so that I didn't
> >>> even remember that we used that pointer there :)
> >>
> >> How would we do that? We need to be able to send at least control
> >> request to devices before we have established which configurations
> >> or interfaces the device has.
> >
> > Oops, I thought that usb_dev in struct usb_interface was a pointer to
> > struct usb_device, but no, it's something else... So no, we need to
> > keep that as-is for now.
>
> You can still get it via interface_to_usbdev(), no?
Sigh, this is what I get for writing emails while sitting in a
conference...
Yes, you are right, it can be gotten that way. But I can't wait to see
how you wrap that C macro in rust :)
thanks,
greg k-h
Powered by blists - more mailing lists