Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9JBU-0003tW-Pw for qemu-devel@nongnu.org; Tue, 23 Jan 2007 05:47:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9JBT-0003tA-8s for qemu-devel@nongnu.org; Tue, 23 Jan 2007 05:47:24 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9JBT-0003t7-5Y for qemu-devel@nongnu.org; Tue, 23 Jan 2007 05:47:23 -0500 Received: from [66.139.79.212] (helo=tapir.sajinet.com.pe) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H9JBS-0007ZY-K3 for qemu-devel@nongnu.org; Tue, 23 Jan 2007 05:47:22 -0500 Date: Tue, 23 Jan 2007 04:59:29 -0600 From: Carlo Marcelo Arenas Belon Message-ID: <20070123105929.GC10278@tapir.sajinet.com.pe> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="xHFwDpU9dbj6ez1V" Content-Disposition: inline Subject: [Qemu-devel] [PATCH V2] DMA timeouts running a FreeBSD guest 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 --xHFwDpU9dbj6ez1V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Greetings, the following patch moves the initialization for bm->cur_addr from the ide_dma_start function to bmdma_addr_writel, so that it is set in sync with the call to set the destination address for DMA (bm->addr) and to avoid timeouts in guests that set this address after they have called the READ_DMA command (FreeBSD). the final package has been tested with the following guests : FreeBSD 6.2 (amd64 and i386) FreeBSD 5.3 (i386) Fedora Core 6 (i386) Gentoo Linux 2006.1 (i386) NexentaOS Alpha 6 (amd64) OpenSolaris Nevada b55b (amd64) OpenBSD 4.0 (amd64 and i386) Windows 2000 (i386) Carlo --xHFwDpU9dbj6ez1V Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="qemu-dma-freebsd-v2.patch" Index: hw/ide.c =================================================================== RCS file: /sources/qemu/qemu/hw/ide.c,v retrieving revision 1.51 diff -u -r1.51 ide.c --- hw/ide.c 20 Jan 2007 01:12:17 -0000 1.51 +++ hw/ide.c 23 Jan 2007 09:58:44 -0000 @@ -2230,7 +2230,6 @@ return; bm->ide_if = s; bm->dma_cb = dma_cb; - bm->cur_addr = bm->addr; bm->cur_prd_last = 0; bm->cur_prd_addr = 0; bm->cur_prd_len = 0; @@ -2363,6 +2362,7 @@ printf("%s: 0x%08x\n", __func__, val); #endif bm->addr = val & ~3; + bm->cur_addr = bm->addr; } static void bmdma_map(PCIDevice *pci_dev, int region_num, --xHFwDpU9dbj6ez1V--