qemu-e2k/hw/ide
John Snow 9da82227ca ide: fix DMA register transitions
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 <fys@fysnet.net>
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Tested-by: Stefan Weil <sw@weilnetz.de>
Message-id: 1470175541-19344-1-git-send-email-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
2016-09-29 14:46:15 -04:00
..
ahci.c ahci: fix sglist leak on retry 2016-08-08 00:00:41 +04:00
atapi.c atapi: fix halted DMA reset 2016-08-09 11:47:23 -04:00
cmd646.c Use #include "..." for our own headers, <...> for others 2016-07-12 16:19:16 +02:00
core.c ide: fix DMA register transitions 2016-09-29 14:46:15 -04:00
ich.c Use #include "..." for our own headers, <...> for others 2016-07-12 16:19:16 +02:00
isa.c Use #include "..." for our own headers, <...> for others 2016-07-12 16:19:16 +02:00
macio.c macio: set res_count value to 0 after non-block ATAPI DMA transfers 2016-08-08 09:45:03 +10:00
Makefile.objs
microdrive.c Use #include "..." for our own headers, <...> for others 2016-07-12 16:19:16 +02:00
mmio.c Use #include "..." for our own headers, <...> for others 2016-07-12 16:19:16 +02:00
pci.c Use #include "..." for our own headers, <...> for others 2016-07-12 16:19:16 +02:00
piix.c Use #include "..." for our own headers, <...> for others 2016-07-12 16:19:16 +02:00
qdev.c ide: ide-cd without drive property for empty drive 2016-09-05 19:06:47 +02:00
via.c Use #include "..." for our own headers, <...> for others 2016-07-12 16:19:16 +02:00