]> git.ipfire.org Git - thirdparty/linux.git/commit
rust: pci: provide access to PCI Class and Class-related items
authorJohn Hubbard <jhubbard@nvidia.com>
Fri, 29 Aug 2025 22:36:27 +0000 (15:36 -0700)
committerDanilo Krummrich <dakr@kernel.org>
Mon, 1 Sep 2025 17:58:44 +0000 (19:58 +0200)
commited78a01887e2257cff0412b640db68b70a2654dc
tree057f0225a3f29ee9be68dc7f68acfd59eb55e596
parentb71763a0a3305b685e0378b7f7a4c4c16d4c66ba
rust: pci: provide access to PCI Class and Class-related items

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::from_raw() -- Only callable from pci module.
    Class::as_raw()
    ClassMask: Full, ClassSubclass
    Device::pci_class()

Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Elle Rhumsaa <elle@weathered-steel.dev>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Link: https://lore.kernel.org/r/20250829223632.144030-2-jhubbard@nvidia.com
[ Minor doc-comment improvements, align Debug and Display. - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
MAINTAINERS
rust/kernel/pci.rs
rust/kernel/pci/id.rs [new file with mode: 0644]