switch (insn->insn) {
case INSN_READ:
ret = s->insn_read(dev, s, insn, data);
+ if (ret == -ETIMEDOUT) {
+ dev_dbg(dev->class_dev,
+ "subdevice %d read instruction timed out\n",
+ s->index);
+ }
break;
case INSN_WRITE:
maxdata = s->maxdata_list
break;
}
}
- if (ret == 0)
+ if (ret == 0) {
ret = s->insn_write(dev, s, insn, data);
+ if (ret == -ETIMEDOUT) {
+ dev_dbg(dev->class_dev,
+ "subdevice %d write instruction timed out\n",
+ s->index);
+ }
+ }
break;
case INSN_BITS:
if (insn->n != 2) {
ret = comedi_timeout(dev, s, insn, pci9111_ai_eoc, 0);
if (ret) {
- comedi_error(dev, "A/D read timeout");
data[i] = 0;
pci9111_fifo_reset(dev);
return ret;
ret = comedi_timeout(dev, s, insn, pci9118_ai_eoc, 0);
if (ret) {
- comedi_error(dev, "A/D insn timeout");
data[n] = 0;
outl(0, dev->iobase + PCI9118_DELFIFO); /* flush FIFO */
return ret;
ret = comedi_timeout(dev, s, insn, pci171x_ai_eoc, 0);
if (ret) {
- comedi_error(dev, "A/D insn timeout");
outb(0, dev->iobase + PCI171x_CLRFIFO);
outb(0, dev->iobase + PCI171x_CLRINT);
data[n] = 0;
/* Wait for conversion to complete */
ret = comedi_timeout(dev, s, insn, aio_aio12_8_ai_eoc, 0);
- if (ret) {
- dev_err(dev->class_dev, "ADC timeout\n");
+ if (ret)
return ret;
- }
data[n] = inw(dev->iobase + AIO12_8_ADC_REG) & s->maxdata;
}
/* wait for conversion to end */
ret = comedi_timeout(dev, s, insn, pci230_ai_eoc, 0);
- if (ret) {
- dev_err(dev->class_dev, "timeout\n");
+ if (ret)
return ret;
- }
/* read data */
data[n] = pci230_ai_read(dev);
outw(0, dev->iobase + DAS16CS_ADC_DATA);
ret = comedi_timeout(dev, s, insn, das16cs_ai_eoc, 0);
- if (ret) {
- dev_dbg(dev->class_dev, "cb_das16_cs: ai timeout\n");
+ if (ret)
return ret;
- }
data[i] = inw(dev->iobase + DAS16CS_ADC_DATA);
}
/* wait for data */
ret = comedi_timeout(dev, s, insn, cb_pcidas64_ai_eoc, 0);
- if (ret) {
- comedi_error(dev, " analog input read insn timed out");
+ if (ret)
return ret;
- }
if (thisboard->layout == LAYOUT_4020)
data[n] = readl(devpriv->dio_counter_iobase +
outb_p(0, dev->iobase + DAS08_TRIG_12BIT);
ret = comedi_timeout(dev, s, insn, das08_ai_eoc, 0);
- if (ret) {
- dev_err(dev->class_dev, "timeout\n");
+ if (ret)
return ret;
- }
msb = inb(dev->iobase + DAS08_MSB);
lsb = inb(dev->iobase + DAS08_LSB);
outb(0, dev->iobase);
ret = comedi_timeout(dev, s, insn, das16m1_ai_eoc, 0);
- if (ret) {
- comedi_error(dev, "timeout");
+ if (ret)
return ret;
- }
data[n] = munge_sample(inw(dev->iobase));
}
hi = (data[i] & 0xff0) >> 4;
ret = comedi_timeout(dev, s, insn, dt2815_ao_status, 0x00);
- if (ret) {
- dev_dbg(dev->class_dev,
- "failed to write low byte on %d\n",
- chan);
+ if (ret)
return ret;
- }
outb(lo, dev->iobase + DT2815_DATA);
ret = comedi_timeout(dev, s, insn, dt2815_ao_status, 0x10);
- if (ret) {
- dev_dbg(dev->class_dev,
- "failed to write high byte on %d\n",
- chan);
+ if (ret)
return ret;
- }
devpriv->ao_readback[chan] = data[i];
}
outw(devpriv->supcsr | DT2821_PRLD, dev->iobase + DT2821_SUPCSR);
ret = comedi_timeout(dev, s, insn, dt282x_ai_timeout, DT2821_MUXBUSY);
- if (ret) {
- comedi_error(dev, "timeout\n");
+ if (ret)
return ret;
- }
for (i = 0; i < insn->n; i++) {
outw(devpriv->supcsr | DT2821_STRIG,
ret = comedi_timeout(dev, s, insn, dt282x_ai_timeout,
DT2821_ADDONE);
- if (ret) {
- comedi_error(dev, "timeout\n");
+ if (ret)
return ret;
- }
data[i] =
inw(dev->iobase +
outw(devpriv->supcsr | DT2821_PRLD, dev->iobase + DT2821_SUPCSR);
ret = comedi_timeout(dev, s, NULL, dt282x_ai_timeout, DT2821_MUXBUSY);
- if (ret) {
- comedi_error(dev, "timeout\n");
+ if (ret)
return ret;
- }
if (cmd->scan_begin_src == TRIG_FOLLOW) {
outw(devpriv->supcsr | DT2821_STRIG,
ret = comedi_timeout(dev, s, insn, dyna_pci10xx_ai_eoc, 0);
if (ret) {
data[n] = 0;
- dev_dbg(dev->class_dev,
- "timeout reading analog input\n");
break;
}
/* Wait for conversion to complete, or get fed up waiting */
ret = comedi_timeout(dev, s, insn, icp_multi_ai_eoc, 0);
if (ret) {
- comedi_error(dev, "A/D insn timeout");
/* Clear data received */
data[n] = 0;
break;
* ready for new data, or get fed up waiting */
ret = comedi_timeout(dev, s, insn, icp_multi_ao_eoc, 0);
if (ret) {
- comedi_error(dev, "D/A insn timeout");
-
/* Disable interrupt */
devpriv->IntEnable &= ~DAC_READY;
writew(devpriv->IntEnable,
/* wait for ADC fifo not empty flag */
ret = comedi_timeout(dev, s, insn, me_ai_eoc, 0);
- if (ret) {
- dev_err(dev->class_dev, "Cannot get single value\n");
+ if (ret)
return ret;
- }
/* get value from ADC fifo */
val = readw(dev_private->me_regbase + ME_READ_AD_FIFO);
*/
for (n = 0; n < 36; n++) {
ret = comedi_timeout(dev, s, insn, a2150_ai_eoc, 0);
- if (ret) {
- comedi_error(dev, "timeout");
+ if (ret)
return ret;
- }
inw(dev->iobase + FIFO_DATA_REG);
}
/* read data */
for (n = 0; n < insn->n; n++) {
ret = comedi_timeout(dev, s, insn, a2150_ai_eoc, 0);
- if (ret) {
- comedi_error(dev, "timeout");
+ if (ret)
return ret;
- }
data[n] = inw(dev->iobase + FIFO_DATA_REG);
data[n] ^= 0x8000;
/* wait for conversion to end */
ret = comedi_timeout(dev, s, insn, daq700_ai_eoc, 0);
- if (ret) {
- switch (ret) {
- case -EOVERFLOW:
- dev_info(dev->class_dev,
- "Overflow/run Error\n");
- break;
- case -ENODATA:
- dev_info(dev->class_dev, "Data Error\n");
- break;
- default:
- dev_info(dev->class_dev,
- "timeout during ADC conversion\n");
- break;
- }
+ if (ret)
return ret;
- }
/* read data */
d = inw(dev->iobase + ADFIFO_R);
udelay(5);
ret = comedi_timeout(dev, s, insn, pcl812_ai_eoc, 0);
- if (ret) {
- dev_dbg(dev->class_dev, "A/D insn read timeout\n");
+ if (ret)
break;
- }
hi = inb(dev->iobase + PCL812_AD_HI);
data[n] = ((hi & 0xf) << 8) | inb(dev->iobase + PCL812_AD_LO);
udelay(5);
ret = comedi_timeout(dev, s, insn, pcl812_ai_eoc, 0);
- if (ret) {
- dev_dbg(dev->class_dev, "A/D insn read timeout\n");
+ if (ret)
break;
- }
data[n] =
(inb(dev->iobase +
ret = comedi_timeout(dev, s, insn, pcl816_ai_eoc, 0);
if (ret) {
- comedi_error(dev, "A/D insn timeout\n");
data[0] = 0;
/* clear INT (conversion end) flag */
outb(0, dev->iobase + PCL816_CLRINT);
ret = comedi_timeout(dev, s, insn, pcl818_ai_eoc, 0);
if (ret) {
- comedi_error(dev, "A/D insn timeout");
/* clear INT (conversion end) flag */
outb(0, dev->iobase + PCL818_CLRINT);
return ret;
/* wait for conversion to end */
ret = comedi_timeout(dev, s, insn, skel_ai_eoc, 0);
- if (ret) {
- dev_warn(dev->class_dev, "ai timeout\n");
+ if (ret)
return ret;
- }
/* read data */
/* d = inw(dev->iobase + SKEL_AI_DATA); */