diff options
| author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2026-02-19 23:17:47 +0000 |
|---|---|---|
| committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2026-03-04 08:23:22 +0000 |
| commit | 31c3cba807839a1a16e6f4bca91d530d9342b61a (patch) | |
| tree | 3d65a4327d7016a05590f72fde076e2a278b1477 | |
| parent | 8f532c7b25d54906c307bfda6cb679632cc26313 (diff) | |
LinuxKPI: pass attrs in more places in dma-mapping.h
Various macros (dma_map_sg_attrs, dma_unmap_sg_attrs,
dma_map_single_attrs, and dma_unmap_single_attrs) currently supress
passing on the attrs argument. Their implementation (even though at
times still marked the argument __unused; we remove that) have long
gained support for handling the argument.
With ofed fixed (5edf24aac1d09), pass the argument through so that
other drivers using these functions may hopefully work just a bit
better as well.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D55391
| -rw-r--r-- | sys/compat/linuxkpi/common/include/linux/dma-mapping.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h index 76efbfd51074..5e5d40ef8339 100644 --- a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h +++ b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h @@ -106,10 +106,10 @@ void lkpi_dma_unmap(struct device *, dma_addr_t, size_t, enum dma_data_direction, unsigned long); int linux_dma_map_sg_attrs(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction direction, - unsigned long attrs __unused); + unsigned long attrs); void linux_dma_unmap_sg_attrs(struct device *dev, struct scatterlist *sg, int nents __unused, enum dma_data_direction direction, - unsigned long attrs __unused); + unsigned long attrs); void linuxkpi_dma_sync(struct device *, dma_addr_t, size_t, bus_dmasync_op_t); static inline int @@ -201,10 +201,10 @@ dma_map_page_attrs(struct device *dev, struct page *page, size_t offset, /* linux_dma_(un)map_sg_attrs does not support attrs yet */ #define dma_map_sg_attrs(dev, sgl, nents, dir, attrs) \ - linux_dma_map_sg_attrs(dev, sgl, nents, dir, 0) + linux_dma_map_sg_attrs(dev, sgl, nents, dir, attrs) #define dma_unmap_sg_attrs(dev, sg, nents, dir, attrs) \ - linux_dma_unmap_sg_attrs(dev, sg, nents, dir, 0) + linux_dma_unmap_sg_attrs(dev, sg, nents, dir, attrs) static inline dma_addr_t dma_map_page(struct device *dev, struct page *page, @@ -361,10 +361,10 @@ dma_max_mapping_size(struct device *dev) } #define dma_map_single_attrs(dev, ptr, size, dir, attrs) \ - _dma_map_single_attrs(dev, ptr, size, dir, 0) + _dma_map_single_attrs(dev, ptr, size, dir, attrs) #define dma_unmap_single_attrs(dev, dma_addr, size, dir, attrs) \ - _dma_unmap_single_attrs(dev, dma_addr, size, dir, 0) + _dma_unmap_single_attrs(dev, dma_addr, size, dir, attrs) #define dma_map_single(d, a, s, r) dma_map_single_attrs(d, a, s, r, 0) #define dma_unmap_single(d, a, s, r) dma_unmap_single_attrs(d, a, s, r, 0) |
