qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [4922] Fix a bad comparison, spotted by Paul Brook.


From: Andrzej Zaborowski
Subject: [Qemu-devel] [4922] Fix a bad comparison, spotted by Paul Brook.
Date: Tue, 22 Jul 2008 01:57:43 +0000

Revision: 4922
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4922
Author:   balrog
Date:     2008-07-22 01:57:42 +0000 (Tue, 22 Jul 2008)

Log Message:
-----------
Fix a bad comparison, spotted by Paul Brook.

Modified Paths:
--------------
    trunk/hw/omap_dma.c
    trunk/hw/soc_dma.c

Modified: trunk/hw/omap_dma.c
===================================================================
--- trunk/hw/omap_dma.c 2008-07-21 21:38:04 UTC (rev 4921)
+++ trunk/hw/omap_dma.c 2008-07-22 01:57:42 UTC (rev 4922)
@@ -668,6 +668,9 @@
         /* If the channel is async, update cpc */
         if (!ch->sync && frames)
             ch->cpc = a->dest & 0xffff;
+
+        /* TODO: if the destination port is IMIF or EMIFF, set the dirty
+         * bits on it.  */
     }
 
     omap_dma_interrupts_update(s);

Modified: trunk/hw/soc_dma.c
===================================================================
--- trunk/hw/soc_dma.c  2008-07-21 21:38:04 UTC (rev 4921)
+++ trunk/hw/soc_dma.c  2008-07-22 01:57:42 UTC (rev 4922)
@@ -49,7 +49,7 @@
 static int fifo_size;
 void transfer_fifo2fifo(struct soc_dma_ch_s *ch)
 {
-    if (ch->bytes < fifo_size)
+    if (ch->bytes > fifo_size)
         fifo_buf = realloc(fifo_buf, fifo_size = ch->bytes);
 
     /* Implement as transfer_fifo2linear + transfer_linear2fifo.  */
@@ -251,6 +251,7 @@
     }
 
     soc_dma_reset(&s->soc);
+    fifo_size = 0;
 
     return &s->soc;
 }






reply via email to

[Prev in Thread] Current Thread [Next in Thread]