History

dmaengine: Document dmaengine_prep_dma_memset

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/

Ben Walker committed 4 years ago

Commit fc44ff01 parent 439b5e72 files · +14 −0Browse files

Unified · Split

2 files
  1. Documentation/driver-api/dmaengine/provider.rst +6 −0
  2. include/linux/dmaengine.h +8 −0
Documentation/driver-api/dmaengine/provider.rst+6−0
@@ -206,6 +206,12 @@ Currently, the types available are: · 205 unmodified lines
206 - The device is able to perform parity check using RAID6 P+Q206 - The device is able to perform parity check using RAID6 P+Q
207 algorithm against a memory buffer.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- DMA_INTERRUPT215- DMA_INTERRUPT
210 216
211 - The device is able to trigger a dummy transfer that will217 - The device is able to trigger a dummy transfer that will
include/linux/dmaengine.h+8−0
@@ -1030,6 +1030,14 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_interleaved_dma( · 1029 unmodified lines
1030 return chan->device->device_prep_interleaved_dma(chan, xt, flags);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 */
1033static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_memset(1041static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_memset(
1034 struct dma_chan *chan, dma_addr_t dest, int value, size_t len,1042 struct dma_chan *chan, dma_addr_t dest, int value, size_t len,
1035 unsigned long flags)1043 unsigned long flags)