From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVNSH-0005Vy-S8 for qemu-devel@nongnu.org; Thu, 04 Aug 2016 14:33:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bVNSG-0004Gu-Nf for qemu-devel@nongnu.org; Thu, 04 Aug 2016 14:33:17 -0400 References: <1470175541-19344-1-git-send-email-jsnow@redhat.com> From: John Snow Message-ID: <562c515c-e714-11a3-20da-cba83f24b584@redhat.com> Date: Thu, 4 Aug 2016 14:33:09 -0400 MIME-Version: 1.0 In-Reply-To: <1470175541-19344-1-git-send-email-jsnow@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] ide: fix DMA register transitions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: kwolf@redhat.com, sw@weilnetz.de, qemu-devel@nongnu.org, pbonzini@redhat.com, fys@fysnet.net On 08/02/2016 06:05 PM, John Snow wrote: > ATA8-APT defines the state transitions for both a host controller and > for the hardware device during the lifecycle of a DMA transfer, in > section 9.7 "DMA command protocol." > > One of the interesting tidbits here is that when a device transitions > from DDMA0 ("Prepare state") to DDMA1 ("Data_Transfer State"), it can > choose to set either BSY or DRQ to signal this transition, but not both. > > as ide_sector_dma_start is the last point in our preparation process > before we begin the real data transfer process (for either AHCI or BMDMA), > this is the correct transition point for DDMA0 to DDMA1. > > I have chosen !BSY && DRQ for QEMU to make the transition from DDMA0 the > most obvious. > > Reported-by: Benjamin David Lunt > Signed-off-by: John Snow > --- > hw/ide/core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/ide/core.c b/hw/ide/core.c > index d117b7c..e961d42 100644 > --- a/hw/ide/core.c > +++ b/hw/ide/core.c > @@ -907,7 +907,7 @@ eot: > > static void ide_sector_start_dma(IDEState *s, enum ide_dma_cmd dma_cmd) > { > - s->status = READY_STAT | SEEK_STAT | DRQ_STAT | BUSY_STAT; > + s->status = READY_STAT | SEEK_STAT | DRQ_STAT; > s->io_buffer_size = 0; > s->dma_cmd = dma_cmd; > > Thanks, applied to my IDE-Next tree: https://github.com/jnsnow/qemu/commits/ide-next https://github.com/jnsnow/qemu.git --js