Document this function to make clear the expected behavior of the 'value' parameter. It was intended to match the behavior of POSIX memset as laid out here: https://lore.kernel.org/dmaengine/YejrA5ZWZ3lTRO%2F1@matsya/
Unified · Split
| @@ -206,6 +206,12 @@ Currently, the types available are: · 205 unmodified lines | ||
| 206 | 206 | - The device is able to perform parity check using RAID6 P+Q |
| 207 | 207 | algorithm against a memory buffer. |
| 208 | 208 | |
| 209 | +- DMA_MEMSET | |
| 210 | + | |
| 211 | + - The device is able to fill memory with the provided pattern | |
| 212 | + | |
| 213 | + - The pattern is treated as a single byte signed value. | |
| 214 | + | |
| 209 | 215 | - DMA_INTERRUPT |
| 210 | 216 | |
| 211 | 217 | - The device is able to trigger a dummy transfer that will |
| @@ -1030,6 +1030,14 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_interleaved_dma( · 1029 unmodified lines | ||
| 1030 | 1030 | return chan->device->device_prep_interleaved_dma(chan, xt, flags); |
| 1031 | 1031 | } |
| 1032 | 1032 | |
| 1033 | +/** | |
| 1034 | + * dmaengine_prep_dma_memset() - Prepare a DMA memset descriptor. | |
| 1035 | + * @chan: The channel to be used for this descriptor | |
| 1036 | + * @dest: Address of buffer to be set | |
| 1037 | + * @value: Treated as a single byte value that fills the destination buffer | |
| 1038 | + * @len: The total size of dest | |
| 1039 | + * @flags: DMA engine flags | |
| 1040 | + */ | |
| 1033 | 1041 | static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_memset( |
| 1034 | 1042 | struct dma_chan *chan, dma_addr_t dest, int value, size_t len, |
| 1035 | 1043 | unsigned long flags) |