figured out how i broke dma, and removed useless barrier
authorFrank Mori Hess <fmhess@speakeasy.net>
Tue, 6 Apr 2004 00:03:43 +0000 (00:03 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Tue, 6 Apr 2004 00:03:43 +0000 (00:03 +0000)
comedi/drivers/mite.c
comedi/drivers/ni_mio_common.c

index 34f385d4fbe91261646eee1efec24ced74ed6a0c..463b923c463904f46dcae940ccfc6cb40ac4911a 100644 (file)
@@ -321,7 +321,7 @@ void mite_prep_dma( struct mite_struct *mite, unsigned int channel,
        writel(0, mite->mite_io_addr + MITE_DAR(channel));
 
        /* the link is 32bits */
-       lkcr = CR_RL(64) | CR_ASEQUP | CR_PSIZE16;
+       lkcr = CR_RL(64) | CR_ASEQUP | CR_PSIZE32;
        writel(lkcr, mite->mite_io_addr + MITE_LKCR(channel));
 
        /* starting address for link chaining */
index acca249818b826b7920f7222c9ecd8c6446dd552..a76be0f69ee47b6fe4b9118613d89869c6b689e6 100644 (file)
@@ -427,7 +427,6 @@ static void ni_sync_ai_dma(struct mite_struct *mite, comedi_device *dev)
                 * conservative value returned by mite_bytes_transferred */
                return;
        }
-       mb();
        comedi_buf_write_free(async, count);
 
        async->scan_progress += count;
@@ -1127,11 +1126,11 @@ static int ni_ai_reset(comedi_device *dev,comedi_subdevice *s)
 
 static int ni_ai_poll(comedi_device *dev,comedi_subdevice *s)
 {
-       unsigned long flags;
+       unsigned long flags = 0;
        int count;
 
        // lock to avoid race with interrupt handler
      if(in_interrupt() == 0)
+ if(in_interrupt() == 0)
                comedi_spin_lock_irqsave(&dev->spinlock, flags);
 #ifndef PCIDMA
        ni_handle_fifo_dregs(dev);