[PATCH v5 1/4] rust: pci: provide access to PCI Class and Class-related items

Danilo Krummrich dakr at kernel.org
Thu Aug 21 10:51:26 UTC 2025


On Thu Aug 21, 2025 at 6:42 AM CEST, John Hubbard wrote:
> Allow callers to write Class::STORAGE_SCSI instead of
> bindings::PCI_CLASS_STORAGE_SCSI, for example.
>
> New APIs:
>     Class::STORAGE_SCSI, Class::NETWORK_ETHERNET, etc.
>     Class::as_raw()
>     Class: From<u32> for Class
>     ClassMask: Full, ClassSubclass
>     Device::pci_class()
>
> Cc: Danilo Krummrich <dakr at kernel.org>
> Cc: Alexandre Courbot <acourbot at nvidia.com>
> Cc: Elle Rhumsaa <elle at weathered-steel.dev>
> Signed-off-by: John Hubbard <jhubbard at nvidia.com>
> ---
>  rust/kernel/pci.rs    |  10 ++
>  rust/kernel/pci/id.rs | 239 ++++++++++++++++++++++++++++++++++++++++++

Please add rust/kernel/pci/ to the maintainers entry.

(Would have done on apply, but I have another comment on patch 3.)

>  2 files changed, 249 insertions(+)
>  create mode 100644 rust/kernel/pci/id.rs


More information about the Nouveau mailing list