diff options
| author | Danilo Krummrich <[email protected]> | 2025-07-16 15:02:48 +0000 |
|---|---|---|
| committer | Danilo Krummrich <[email protected]> | 2025-07-19 17:37:17 +0000 |
| commit | 8eb698f54736b44a398ca883d0a33f661c12da9d (patch) | |
| tree | 8f2038eac82f1d28c33d6ee5505aa56b46f1732b | |
| parent | rust: dma: add DMA addressing capabilities (diff) | |
| download | kernel-8eb698f54736b44a398ca883d0a33f661c12da9d.tar.gz kernel-8eb698f54736b44a398ca883d0a33f661c12da9d.zip | |
rust: pci: implement the `dma::Device` trait
The PCI bus is potentially capable of performing DMA, hence implement
the `dma:Device` trait for `pci::Device`.
Reviewed-by: Daniel Almeida <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Danilo Krummrich <[email protected]>
| -rw-r--r-- | rust/kernel/pci.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rust/kernel/pci.rs b/rust/kernel/pci.rs index 6a4854cf4bf9..44a2f3d2884a 100644 --- a/rust/kernel/pci.rs +++ b/rust/kernel/pci.rs @@ -449,6 +449,8 @@ impl Device<device::Core> { kernel::impl_device_context_deref!(unsafe { Device }); kernel::impl_device_context_into_aref!(Device); +impl crate::dma::Device for Device<device::Core> {} + // SAFETY: Instances of `Device` are always reference-counted. unsafe impl crate::types::AlwaysRefCounted for Device { fn inc_ref(&self) { |
