lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2025072110-buddhism-accompany-0682@gregkh>
Date: Mon, 21 Jul 2025 15:17:31 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Danilo Krummrich <dakr@...nel.org>
Cc: Alice Ryhl <aliceryhl@...gle.com>, rafael@...nel.org, ojeda@...nel.org,
	alex.gaynor@...il.com, boqun.feng@...il.com, gary@...yguo.net,
	bjorn3_gh@...tonmail.com, lossin@...nel.org, a.hindborg@...nel.org,
	tmgross@...ch.edu, rust-for-linux@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] device: rust: expand documentation for Device

On Mon, Jul 21, 2025 at 02:13:14PM +0200, Danilo Krummrich wrote:
> On Mon Jul 21, 2025 at 2:07 PM CEST, Alice Ryhl wrote:
> > The connection is that to request an irq you must have a &Device<Bound>,
> > so if you can only obtain a &Device<Bound> to a bus device, then that
> > means that you can never request an irq for a class device.
> 
> As mentioned in my other reply, a class device never owns resources of a "real"
> device such as an IRQ.
> 
> A USB device, which represents a real device on a bus, is a bus device, in your
> example the class device is the input device.
>

Just to confuse things a bit more (sorry), there are also "USB class
devices" that represent USB devices that use the "generic" USB interface
to userspace api.  You can find these by searching for
usb_register_dev().

Note, this is different from the drivers/usb/class/ drivers, which
represent various "USB class protocol" that the USB.org group defines,
and those talk to userspace through the various common class apis
depending on the specific device type (input, network, etc.) and are USB
bus drivers.

Naming is hard, wait until you learn about "usb gadget" a word we had to
invent to describe the thing :)

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ