diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2021-12-05 18:42:35 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2021-12-14 21:15:36 +0100 |
commit | 9b9a5b573a295d6ae2844017b82a8bb8878fd12f (patch) | |
tree | 3aabb64b09246a086a29a18a10b139a2488cabe7 | |
parent | da91dad156aa03093beaa75b35eefbdfc09f9455 (diff) | |
download | backports-9b9a5b573a295d6ae2844017b82a8bb8878fd12f.tar.gz |
headers: Add DMA_MAPPING_ERROR
DMA_MAPPING_ERROR definition was added to kernel 5.0 in commit
42ee3cae0ed3 ("dma-mapping: provide a generic DMA_MAPPING_ERROR"). This
is now used by ath10k.
It should be fine to just add this definition, this is an invalid
address and also in older kernel versions this is sued to mark an
invalid address.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r-- | backport/backport-include/linux/dma-mapping.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/backport/backport-include/linux/dma-mapping.h b/backport/backport-include/linux/dma-mapping.h new file mode 100644 index 00000000..e50ce493 --- /dev/null +++ b/backport/backport-include/linux/dma-mapping.h @@ -0,0 +1,19 @@ +#ifndef __BACKPORT_LINUX_DMA_MAPPING_H +#define __BACKPORT_LINUX_DMA_MAPPING_H +#include_next <linux/dma-mapping.h> + +#ifndef DMA_MAPPING_ERROR +/* + * A dma_addr_t can hold any valid DMA or bus address for the platform. It can + * be given to a device to use as a DMA source or target. It is specific to a + * given device and there may be a translation between the CPU physical address + * space and the bus address space. + * + * DMA_MAPPING_ERROR is the magic error code if a mapping failed. It should not + * be used directly in drivers, but checked for using dma_mapping_error() + * instead. + */ +#define DMA_MAPPING_ERROR (~(dma_addr_t)0) +#endif /* DMA_MAPPING_ERROR */ + +#endif /* __BACKPORT_LINUX_DMA_MAPPING_H */ |