diff options
| author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2015-01-12 10:56:04 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-17 14:25:21 -0800 |
| commit | ceb41be712b68fac4ac834120a80fc3cb8e5ac37 (patch) | |
| tree | 368ceb7b9fe2e53a82874d5c7a7c326a88e22b42 /tools/perf/scripts/python | |
| parent | a2c3966d18a93540f49c2c8cc3dda5ce6c9399a7 (diff) | |
staging: comedi: pcl816: fix short DMA transactions
When the cmd->stop_src == TRIG_COUNT the last DMA transfer might be smaller
than the buffer size. This results in invalid data being added to the async
buffer.
Add a 'size' member to the DMA descriptor and initialize it with the
actual size of the DMA transfer. Use that in interrupt and ai subdevice
(*poll) function to return the proper number of samples. Use the
comedi_bytes_to_samples() helper to convert the byte size to comedi
samples in the interrupt handler.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
