mirror of
https://github.com/opnsense/src.git
synced 2026-02-17 17:49:34 -05:00
linuxkpi: Add dma_{un,}map_sgtable
Variant of dma_{un,}map_sg_attrs for struct sg_table.
Reviewed by: bz
Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36106
This commit is contained in:
parent
b1c82bd402
commit
9202c95f47
1 changed files with 20 additions and 0 deletions
|
|
@ -341,4 +341,24 @@ dma_max_mapping_size(struct device *dev)
|
|||
extern int uma_align_cache;
|
||||
#define dma_get_cache_alignment() uma_align_cache
|
||||
|
||||
|
||||
static inline int
|
||||
dma_map_sgtable(struct device *dev, struct sg_table *sgt,
|
||||
enum dma_data_direction dir,
|
||||
unsigned long attrs)
|
||||
{
|
||||
|
||||
return (dma_map_sg_attrs(dev, sgt->sgl, sgt->nents, dir, attrs));
|
||||
}
|
||||
|
||||
static inline void
|
||||
dma_unmap_sgtable(struct device *dev, struct sg_table *sgt,
|
||||
enum dma_data_direction dir,
|
||||
unsigned long attrs)
|
||||
{
|
||||
|
||||
dma_unmap_sg_attrs(dev, sgt->sgl, sgt->nents, dir, attrs);
|
||||
}
|
||||
|
||||
|
||||
#endif /* _LINUXKPI_LINUX_DMA_MAPPING_H_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue