summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/drivers/mite.h
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2016-04-21 12:04:37 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-04-28 22:19:49 -0700
commitcc38da7287ed4f0f08956351167c31e4e6abc427 (patch)
treeca22e748ce4e931c1693b6c421f4b917ac96d364 /drivers/staging/comedi/drivers/mite.h
parent21e871fef7a681826c661332c285be95f0204aca (diff)
staging: comedi: mite: check for transfer errors in mite_ack_linkc()
Currently only some of the users of mite dma check for transfer errors. The ni_mio_common code does the check for the analog input and analog output subdevices. The m-series digital I/O subdevice and the counter subdevices (handled by ni_tiocmd) do not check. The ni_pcidio driver checks for the digital input subdevice. The ni_660x driver counter subdevices (handled by ni_tiocmd) also do not check. Move the transfer error checking into mite_ack_linkc() so that the drivers that use mite don't have to deal with it. This also makes sure that all the subdevices that use mite for dma will cancel the async command if a transfer error is detected. Simplfy the transfer error check by just checking the CHSR_XFERR bit. This bit will be set if one or more transfer processes terminated with an error. The actual error is determined by the LERR, MERR, and DERR bits. 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 'drivers/staging/comedi/drivers/mite.h')
-rw-r--r--drivers/staging/comedi/drivers/mite.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/mite.h b/drivers/staging/comedi/drivers/mite.h
index 4942853fb41f..f8364edf8ce8 100644
--- a/drivers/staging/comedi/drivers/mite.h
+++ b/drivers/staging/comedi/drivers/mite.h
@@ -93,7 +93,8 @@ void mite_dma_arm(struct mite_channel *mite_chan);
void mite_dma_disarm(struct mite_channel *mite_chan);
void mite_sync_dma(struct mite_channel *mite_chan, struct comedi_subdevice *s);
u32 mite_bytes_in_transit(struct mite_channel *mite_chan);
-unsigned int mite_ack_linkc(struct mite_channel *mite_chan);
+unsigned int mite_ack_linkc(struct mite_channel *mite_chan,
+ struct comedi_subdevice *s);
int mite_done(struct mite_channel *mite_chan);
void mite_prep_dma(struct mite_channel *mite_chan,