summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2010-01-20 13:04:47 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-03 16:42:47 -0800
commit61283d227c6b39e30afc6346db099521b0b64fa1 (patch)
tree5d067f4f638d7723ccb99e22401764234398c61d
parentb3559cb1aa5f863e1ce9b94b518be7ddf6680e45 (diff)
downloadblackbird-obmc-linux-61283d227c6b39e30afc6346db099521b0b64fa1.tar.gz
blackbird-obmc-linux-61283d227c6b39e30afc6346db099521b0b64fa1.zip
Staging: comedi: adv_pci1710: Correct AI scan count and channel checks
For AI commands, the internal channel list used to check incoming data was only set up partially if the channel list contained repeats. Set it up fully. Also the current scan position was not updated properly when moving a block of data from the FIFO unless a whole number of scans was moved. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/comedi/drivers/adv_pci1710.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/comedi/drivers/adv_pci1710.c
index 03c73a889048..82433864094f 100644
--- a/drivers/staging/comedi/drivers/adv_pci1710.c
+++ b/drivers/staging/comedi/drivers/adv_pci1710.c
@@ -724,6 +724,7 @@ static int move_block_from_fifo(struct comedi_device *dev,
devpriv->ai_act_scan++;
}
}
+ s->async->cur_chan = j;
DPRINTK("adv_pci1710 EDBG: END: move_block_from_fifo(...)\n");
return 0;
}
@@ -1230,6 +1231,12 @@ static void setup_channel_list(struct comedi_device *dev,
DPRINTK("GS: %2d. [%4x]=%4x %4x\n", i, chanprog, range,
devpriv->act_chanlist[i]);
}
+#ifdef PCI171x_PARANOIDCHECK
+ for ( ; i < n_chan; i++) { /* store remainder of channel list */
+ devpriv->act_chanlist[i] =
+ (CR_CHAN(chanlist[i]) << 12) & 0xf000;
+ }
+#endif
devpriv->ai_et_MuxVal =
CR_CHAN(chanlist[0]) | (CR_CHAN(chanlist[seglen - 1]) << 8);
OpenPOWER on IntegriCloud