diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2025-07-31 18:13:35 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-08-04 17:15:38 -0700 |
| commit | fa516c0d8bf90da9d5b168757162205aafe5d0e1 (patch) | |
| tree | b994a9ef19a033c1ae598019f8702359a73c45d3 /net/core/devmem.h | |
| parent | 2df158047d532d0e2a6b39953656c738872151a3 (diff) | |
| download | linux-next-fa516c0d8bf90da9d5b168757162205aafe5d0e1.tar.gz linux-next-fa516c0d8bf90da9d5b168757162205aafe5d0e1.zip | |
net: devmem: fix DMA direction on unmapping
Looks like we always unmap the DMA_BUF with DMA_FROM_DEVICE direction.
While at it unexport __net_devmem_dmabuf_binding_free(), it's internal.
Found by code inspection.
Fixes: bd61848900bf ("net: devmem: Implement TX path")
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Reviewed-by: Mina Almasry <almasrymina@google.com>
Link: https://patch.msgid.link/20250801011335.2267515-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/devmem.h')
| -rw-r--r-- | net/core/devmem.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/core/devmem.h b/net/core/devmem.h index 0a3b28ba5c13..41cd6e1c9141 100644 --- a/net/core/devmem.h +++ b/net/core/devmem.h @@ -56,6 +56,9 @@ struct net_devmem_dmabuf_binding { */ u32 id; + /* DMA direction, FROM_DEVICE for Rx binding, TO_DEVICE for Tx. */ + enum dma_data_direction direction; + /* Array of net_iov pointers for this binding, sorted by virtual * address. This array is convenient to map the virtual addresses to * net_iovs in the TX path. @@ -165,10 +168,6 @@ static inline void net_devmem_put_net_iov(struct net_iov *niov) { } -static inline void __net_devmem_dmabuf_binding_free(struct work_struct *wq) -{ -} - static inline struct net_devmem_dmabuf_binding * net_devmem_bind_dmabuf(struct net_device *dev, enum dma_data_direction direction, |
