[PATCH 02/15] PCI: endpoint: Add DMA channel metadata to pci_epc_aux_resource
From: Koichiro Den
Date: Thu Mar 12 2026 - 12:50:32 EST
A peer-visible DMA descriptor window needs a little more context than
just address and size. In particular, a generic consumer needs to know
which DMAEngine channel it belongs to and in which direction that
channel operates.
Extend struct pci_epc_aux_resource with dma_chan metadata for
PCI_EPC_AUX_DMA_CHAN_DESC resources so controllers can expose that
information in a uniform way.
Signed-off-by: Koichiro Den <den@xxxxxxxxxxxxx>
---
include/linux/pci-epc.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/include/linux/pci-epc.h b/include/linux/pci-epc.h
index d6b0a0833e9f..7dd2e4d5d952 100644
--- a/include/linux/pci-epc.h
+++ b/include/linux/pci-epc.h
@@ -78,6 +78,11 @@ enum pci_epc_aux_resource_type {
PCI_EPC_AUX_DOORBELL_MMIO,
};
+enum pci_epc_aux_dma_dir {
+ PCI_EPC_AUX_DMA_DIR_READ = 0,
+ PCI_EPC_AUX_DMA_DIR_WRITE = 1,
+};
+
/**
* struct pci_epc_aux_resource - a physical auxiliary resource that may be
* exposed for peer use
@@ -103,6 +108,13 @@ struct pci_epc_aux_resource {
int irq; /* IRQ number for the doorbell handler */
u32 data; /* write value to ring the doorbell */
} db_mmio;
+
+ /* PCI_EPC_AUX_DMA_CHAN_DESC */
+ struct {
+ int chan_id;
+ u8 dir;
+ u8 reserved[3];
+ } dma_chan;
} u;
};
--
2.51.0