From: Ian Abbott Date: Mon, 18 Jan 2010 19:23:46 +0000 (+0000) Subject: adv_pci1710: Bug fixes: For AI commands, keep track of current channel when X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5b69c757ac52500115452632743a815ea51931ea;p=comedi.git adv_pci1710: Bug fixes: For AI commands, keep track of current channel when moving block of data from FIFO. Setting up of internal channel list should fill in the whole list, not just the first repeated segment. --- diff --git a/comedi/drivers/adv_pci1710.c b/comedi/drivers/adv_pci1710.c index cd3229c0..6139e268 100644 --- a/comedi/drivers/adv_pci1710.c +++ b/comedi/drivers/adv_pci1710.c @@ -698,6 +698,7 @@ static int move_block_from_fifo(comedi_device * dev, comedi_subdevice * s, devpriv->ai_act_scan++; } } + s->async->cur_chan = j; DPRINTK("adv_pci1710 EDBG: END: move_block_from_fifo(...)\n"); return 0; } @@ -1188,6 +1189,13 @@ static void setup_channel_list(comedi_device * dev, comedi_subdevice * s, DPRINTK("GS: %2d. [%4x]=%4x %4x\n", i, chanprog, range, devpriv->act_chanlist[i]); } +#ifdef PCI171x_PARANOIDCHECK + /* remember channels for repeated segments of channel list */ + for ( ; i < n_chan; i++) { + 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);