1
0
Fork 0
alistair23-linux/drivers/staging
Ian Abbott 1e3de428d1 staging: comedi: mf6x4: Fix AI end-of-conversion detection
commit 56c90457eb upstream.

I have had reports from two different people that attempts to read the
analog input channels of the MF624 board fail with an `ETIMEDOUT` error.

After triggering the conversion, the code calls `comedi_timeout()` with
`mf6x4_ai_eoc()` as the callback function to check if the conversion is
complete.  The callback returns 0 if complete or `-EBUSY` if not yet
complete.  `comedi_timeout()` returns `-ETIMEDOUT` if it has not
completed within a timeout period which is propagated as an error to the
user application.

The existing code considers the conversion to be complete when the EOLC
bit is high.  However, according to the user manuals for the MF624 and
MF634 boards, this test is incorrect because EOLC is an active low
signal that goes high when the conversion is triggered, and goes low
when the conversion is complete.  Fix the problem by inverting the test
of the EOLC bit state.

Fixes: 04b565021a ("comedi: Humusoft MF634 and MF624 DAQ cards driver")
Cc: <stable@vger.kernel.org> # v4.4+
Cc: Rostislav Lisovy <lisovy@gmail.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20201207145806.4046-1-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:51:35 +01:00
..
android staging: android: ashmem: Fix lockdep warning for write operation 2020-08-11 15:33:34 +02:00
axis-fifo staging: axis-fifo: add unspecified HAS_IOMEM dependency 2020-01-12 12:21:35 +01:00
board
clocking-wizard
comedi staging: comedi: mf6x4: Fix AI end-of-conversion detection 2020-12-30 11:51:35 +01:00
emxx_udc staging: emxx_udc: Fix passing of NULL to dma_alloc_coherent() 2020-10-29 09:57:37 +01:00
exfat
fbtft fbtft: Make sure string is NULL terminated 2019-12-31 16:45:42 +01:00
fieldbus staging: fieldbus: anybuss: jump to correct label in an error path 2020-11-05 11:43:37 +01:00
fsl-dpaa2
fwserial
gasket staging: gasket: interrupt: fix the missed eventfd_ctx_put() in gasket_interrupt.c 2020-12-30 11:51:07 +01:00
gdm724x
goldfish
greybus staging: greybus: codecs: Fix reference counter leak in error handling 2020-12-30 11:51:07 +01:00
gs_fpgaboot
iio staging: iio: ad2s1210: Fix SPI reading 2020-05-27 17:46:45 +02:00
isdn
kpc2000 staging: kpc2000: fix error return code in kp2000_pcie_probe() 2020-05-27 17:46:45 +02:00
ks7010
media media: staging/intel-ipu3: css: Correctly reset some memory 2020-10-29 09:57:31 +01:00
most staging: most: net: fix buffer overflow 2020-02-01 09:34:33 +00:00
mt7621-dma
mt7621-dts
mt7621-pci staging: mt7621-pci: add quirks for 'E2' revision using 'soc_device_attribute' 2020-02-01 09:34:47 +00:00
mt7621-pci-phy
mt7621-pinctrl
netlogic
nvec
octeon staging/octeon: fix up merge error 2020-12-08 10:40:24 +01:00
octeon-usb
olpc_dcon
pi433
qlge
ralink-gdma staging: ralink-gdma: fix kconfig dependency bug for DMA_RALINK 2020-12-02 08:49:47 +01:00
rtl8188eu staging:r8188eu: avoid skb_clone for amsdu to msdu conversion 2020-10-01 13:17:57 +02:00
rtl8192e
rtl8192u staging: rtl8192u: Do not use GFP_KERNEL in atomic context 2020-10-29 09:57:36 +01:00
rtl8712 staging: rtl8712: handle firmware load failure 2020-08-11 15:33:34 +02:00
rtl8723bs staging: rtl8723bs: Add 024c:0627 to the list of SDIO device-ids 2020-11-24 13:29:21 +01:00
rts5208
sm750fb staging: sm750fb: add missing case while setting FB_VISUAL 2020-06-24 17:50:24 +02:00
speakup speakup: fix uninitialized flush_lock 2020-12-30 11:51:22 +01:00
unisys
uwb
vc04_services staging: vchiq_arm: Add a matching unregister call 2020-08-19 08:16:09 +02:00
vme
vt6655
vt6656 staging: vt6656: Power save stop wake_up_count wrap around. 2020-04-29 16:33:22 +02:00
wilc1000 net: wilc1000: clean up resource in error path of init mon interface 2020-10-29 09:57:40 +01:00
wlan-ng staging: wlan-ng: fix out of bounds read in prism2sta_probe_usb() 2020-09-17 13:47:51 +02:00
wusbcore
Kconfig
Makefile