When setting up the DMA for 'read' streaming acquisition on the DIO
subdevice, mark the whole buffer as writable before starting the DMA.
This prevents a spurious detection of a DMA overwrite of good data
during the first interrupt.
Problem reported by Nico Nell. Fix suggested by Frank Mori Hess.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
devpriv->di_mite_chan->dir = COMEDI_INPUT;
+ /* write alloc the entire buffer */
+ comedi_buf_write_alloc(s->async, s->async->prealloc_bufsz);
+
mite_prep_dma(devpriv->di_mite_chan, 32, 32);
mite_dma_arm(devpriv->di_mite_chan);