From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KL78L-0003MR-Ay for qemu-devel@nongnu.org; Mon, 21 Jul 2008 21:57:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KL78K-0003L1-Da for qemu-devel@nongnu.org; Mon, 21 Jul 2008 21:57:45 -0400 Received: from [199.232.76.173] (port=42188 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KL78K-0003Kr-9m for qemu-devel@nongnu.org; Mon, 21 Jul 2008 21:57:44 -0400 Received: from savannah.gnu.org ([199.232.41.3]:44793 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KL78K-0005Ua-1O for qemu-devel@nongnu.org; Mon, 21 Jul 2008 21:57:44 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KL78J-0007Ie-GQ for qemu-devel@nongnu.org; Tue, 22 Jul 2008 01:57:43 +0000 Received: from balrog by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KL78J-0007Ia-6B for qemu-devel@nongnu.org; Tue, 22 Jul 2008 01:57:43 +0000 MIME-Version: 1.0 Errors-To: balrog Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Andrzej Zaborowski Message-Id: Date: Tue, 22 Jul 2008 01:57:43 +0000 Subject: [Qemu-devel] [4922] Fix a bad comparison, spotted by Paul Brook. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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; }