From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CSJKh-0000py-J0 for qemu-devel@nongnu.org; Thu, 11 Nov 2004 13:06:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CSJKg-0000pY-OJ for qemu-devel@nongnu.org; Thu, 11 Nov 2004 13:06:07 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CSJKg-0000pV-IT for qemu-devel@nongnu.org; Thu, 11 Nov 2004 13:06:06 -0500 Received: from [66.124.73.250] (helo=marvin.brittainweb.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CSJBp-000254-2u for qemu-devel@nongnu.org; Thu, 11 Nov 2004 12:56:57 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) by marvin.brittainweb.org (8.12.8/8.12.8) with ESMTP id iABHrd1W014479 for ; Thu, 11 Nov 2004 09:53:46 -0800 Message-ID: <4193A177.1030308@brittainweb.org> Date: Thu, 11 Nov 2004 09:29:28 -0800 From: Jason Brittain MIME-Version: 1.0 Subject: Re: [Qemu-devel] enabling bus-master IDE driver References: <20041107092132.GC29120@suse.de> <20041107093842.GD29120@suse.de> <200411071301.37636.hetz@softier.com> <20041107111655.GG29120@suse.de> In-Reply-To: <20041107111655.GG29120@suse.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 I just pulled the latest source from CVS (today's), and tried looking at DMA again. Host: Linux 2.6 (Fedora Core 2) Guest: XP corp. It still says the primary IDE channel is in PIO mode, and doesn't seem any faster. Host: Linux 2.6 (Fedora Core 2) Guest: Linux 2.6 hdparm now reports that DMA is on for /dev/hda, and I can also turn it on and off. With it on, it's about twice as fast as it is with it off. So, this seems to work. Cheers. -- Jason Brittain Jens Axboe wrote: > On Sun, Nov 07 2004, Hetz Ben Hamo wrote: > >>>>>- put_le16(p + 49, 1 << 9); /* LBA supported, no DMA */ >>>>>+ put_le16(p + 49, 1 << 9 | 1 << 8); /* DMA and LBA supported */ >> >>Care to put all the changes in 1 patch please, so I can put it on my web site? > > > Here you go. > > Index: hw/ide.c > =================================================================== > RCS file: /cvsroot/qemu/qemu/hw/ide.c,v > retrieving revision 1.28 > diff -u -r1.28 ide.c > --- hw/ide.c 9 Oct 2004 20:27:55 -0000 1.28 > +++ hw/ide.c 7 Nov 2004 11:19:52 -0000 > @@ -416,10 +416,10 @@ > put_le16(p + 47, 0x8000 | MAX_MULT_SECTORS); > #endif > put_le16(p + 48, 1); /* dword I/O */ > - put_le16(p + 49, 1 << 9); /* LBA supported, no DMA */ > + put_le16(p + 49, 1 << 9 | 1 << 8); /* DMA and LBA supported */ > put_le16(p + 51, 0x200); /* PIO transfer cycle */ > put_le16(p + 52, 0x200); /* DMA transfer cycle */ > - put_le16(p + 53, 1); /* words 54-58 are valid */ > + put_le16(p + 53, 1 | 1 << 2); /* words 54-58,88 are valid */ > put_le16(p + 54, s->cylinders); > put_le16(p + 55, s->heads); > put_le16(p + 56, s->sectors); > @@ -437,6 +437,8 @@ > put_le16(p + 85, (1 << 14)); > put_le16(p + 86, 0); > put_le16(p + 87, (1 << 14)); > + put_le16(p + 88, 0x1f | (1 << 13)); > + put_le16(p + 93, 1 | (1 << 14) | 0x2000 | 0x4000); > } > > static void ide_atapi_identify(IDEState *s) > @@ -1560,7 +1562,7 @@ > case 0x82: /* write cache disable */ > case 0xaa: /* read look-ahead enable */ > case 0x55: /* read look-ahead disable */ > - s->status = READY_STAT; > + s->status = READY_STAT | SEEK_STAT; > ide_set_irq(s); > break; > default: >