return retval;
}
-static void mite_handle_b_linkc(struct mite_struct *mite,
- struct comedi_device *dev)
-{
- struct ni_private *devpriv = dev->private;
- struct comedi_subdevice *s = dev->write_subdev;
- unsigned long flags;
-
- spin_lock_irqsave(&devpriv->mite_channel_lock, flags);
- if (devpriv->ao_mite_chan)
- mite_sync_dma(devpriv->ao_mite_chan, s);
- spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags);
-}
-
static int ni_ao_wait_for_dma_load(struct comedi_device *dev)
{
static const int timeout = 10000;
unsigned int ao_mite_status)
{
struct comedi_subdevice *s = dev->write_subdev;
- /* unsigned short ack=0; */
-
-#ifdef PCIDMA
- /* Currently, mite.c requires us to handle LINKC */
- if (ao_mite_status & CHSR_LINKC) {
- struct ni_private *devpriv = dev->private;
-
- mite_handle_b_linkc(devpriv->mite, dev);
- }
-#endif
if (b_status == 0xffff)
return;
if (devpriv->ai_mite_chan)
ai_mite_status = mite_ack_linkc(devpriv->ai_mite_chan,
dev->read_subdev);
- if (devpriv->ao_mite_chan)
+
+ if (devpriv->ao_mite_chan) {
ao_mite_status = mite_ack_linkc(devpriv->ao_mite_chan,
dev->write_subdev);
+ if (ao_mite_status & CHSR_LINKC)
+ mite_sync_dma(devpriv->ao_mite_chan,
+ dev->write_subdev);
+ }
+
spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags_too);
}
#endif