abe46b8932
Reading of analog input channels by the `INSN_READ` comedi instruction is broken for all except channel 0. `pci171x_ai_insn_read()` calls `pci171x_ai_read_sample()` with the wrong value for the third parameter. It is supposed to be the current index in a channel list (which is always of length 1 in this case, so the index should be 0), but instead it is passing the actual channel number. `pci171x_ai_read_sample()` checks the channel number encoded in the raw sample value read from the hardware matches the channel number stored in the specified index of the previously set up channel list and returns `-ENODATA` if it doesn't match. Since the index should always be 0 in this case, the match will fail unless the channel number is also 0. Fix it by passing 0 as the channel index. Note that when the bug first appeared, it was `pci171x_ai_dropout()` that was called with the wrong parameter value. `pci171x_ai_dropout()` got replaced with `pci171x_ai_read_sample()` in commit |
||
---|---|---|
.. | ||
android | ||
board | ||
clocking-wizard | ||
comedi | ||
dgap | ||
dgnc | ||
emxx_udc | ||
fbtft | ||
ft1000 | ||
fwserial | ||
gdm72xx | ||
gdm724x | ||
goldfish | ||
gs_fpgaboot | ||
i2o | ||
iio | ||
lustre | ||
media | ||
mt29f_spinand | ||
netlogic | ||
nvec | ||
octeon | ||
octeon-usb | ||
olpc_dcon | ||
ozwpan | ||
panel | ||
rtl8188eu | ||
rtl8192e | ||
rtl8192u | ||
rtl8712 | ||
rtl8723au | ||
rts5208 | ||
skein | ||
slicoss | ||
sm7xxfb | ||
speakup | ||
ste_rmi4 | ||
unisys | ||
vme | ||
vt6655 | ||
vt6656 | ||
wlan-ng | ||
xgifb | ||
Kconfig | ||
Makefile | ||
staging.c |