From 3b5ea0f078e1b72276e99c237f3dfc2fd72938bb Mon Sep 17 00:00:00 2001 From: Danilo Krummrich Date: Thu, 13 Aug 2026 18:52:05 +0200 Subject: rust: pci: expose the allocated interrupt type Add irq_type() on IrqVectorRegistration and IrqVector, wrapping the new pci_irq_type() C function. A driver whose interrupt acknowledgment depends on the type (MSI-X vs MSI vs INTx) queries it here rather than assuming which type the PCI core selected. Tested-by: John Hubbard Suggested-by: John Hubbard Link: https://lore.kernel.org/all/20260808031120.363869-4-jhubbard@nvidia.com/ Reviewed-by: Gary Guo Link: https://patch.msgid.link/20260813165234.620555-6-dakr@kernel.org Signed-off-by: Danilo Krummrich --- rust/helpers/pci.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'rust/helpers') diff --git a/rust/helpers/pci.c b/rust/helpers/pci.c index e44905317..23b06becb 100644 --- a/rust/helpers/pci.c +++ b/rust/helpers/pci.c @@ -24,6 +24,11 @@ __rust_helper bool rust_helper_dev_is_pci(const struct device *dev) return dev_is_pci(dev); } +__rust_helper unsigned int rust_helper_pci_irq_type(struct pci_dev *pdev) +{ + return pci_irq_type(pdev); +} + #ifndef CONFIG_PCI_MSI __rust_helper int rust_helper_pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs, -- cgit v1.3.1