rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v1 0/2] rust: pci: Introduce PCIe error handler support and sample usage
@ 2025-11-08 16:55 Guangbo Cui
  2025-11-08 16:55 ` [RFC PATCH v1 1/2] rust: pci: add PCIe bus error handler support Guangbo Cui
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Guangbo Cui @ 2025-11-08 16:55 UTC (permalink / raw)
  To: Miguel Ojeda, Alex Gaynor, Danilo Krummrich
  Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, Greg Kroah-Hartman,
	Bjorn Helgaas, Krzysztof Wilczyński, rust-for-linux,
	linux-pci, Guangbo Cui

Hi all,

This RFC patchset introduces basic PCIe Advanced Error Reporting (AER)
support for Rust PCI drivers and provides a simple example to demonstrate
it's usage.

The first patch adds the necessary infrastructure in the Rust PCI layer to
support device-specific PCI error handlers, mirroring the existing C
`struct pci_error_handlers` callbacks.

The second patch updates the Rust PCI sample driver to implement a set of
dummy error handlers. These callbacks simply print messages and return
predefined results, serving as a guide for future Rust PCI driver authors
who want to handle PCIe AER events safely.

This series is an RFC for discussion and not intended for merging yet.

Signed-off-by: Guangbo Cui <jckeep.cuiguangbo@gmail.com>
---

Guangbo Cui (2):
  rust: pci: add PCIe bus error handler support
  sample: rust: pci: implement dummy error handlers to demonstrate usage

 rust/kernel/pci.rs                    |  11 ++
 rust/kernel/pci/err.rs                | 273 ++++++++++++++++++++++++++
 samples/rust/rust_dma.rs              |   1 +
 samples/rust/rust_driver_auxiliary.rs |   2 +
 samples/rust/rust_driver_pci.rs       |  47 ++++-
 5 files changed, 333 insertions(+), 1 deletion(-)
 create mode 100644 rust/kernel/pci/err.rs

-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-11-15  8:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-08 16:55 [RFC PATCH v1 0/2] rust: pci: Introduce PCIe error handler support and sample usage Guangbo Cui
2025-11-08 16:55 ` [RFC PATCH v1 1/2] rust: pci: add PCIe bus error handler support Guangbo Cui
2025-11-08 16:55 ` [RFC PATCH v1 2/2] sample: rust: pci: implement dummy error handlers to demonstrate usage Guangbo Cui
2025-11-11  8:26 ` [RFC PATCH v1 0/2] rust: pci: Introduce PCIe error handler support and sample usage Danilo Krummrich
2025-11-15  8:01   ` Guangbo Cui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).