qemu/hw/ide
John Snow 956556e131 ahci: move PIO Setup FIS before transfer, fix it for ATAPI commands
The PIO Setup FIS is written in the PIO:Entry state, which comes before
the ATA and ATAPI data transfer states.  As a result, the PIO Setup FIS
interrupt is now raised before DMA ends for ATAPI commands, and tests have
to be adjusted.

This is also hinted by the description of the command header in the AHCI
specification, where the "A" bit is described as

    When ‘1’, indicates that a PIO setup FIS shall be sent by the device
    indicating a transfer for the ATAPI command.

and also by the description of the ACMD (ATAPI command region):

    The ATAPI command must be either 12 or 16 bytes in length. The length
    transmitted by the HBA is determined by the PIO setup FIS that is sent
    by the device requesting the ATAPI command.

QEMU, which conflates the "generator" and the "receiver" of the FIS into
one device, always uses ATAPI_PACKET_SIZE, aka 12, for the length.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180606190955.20845-3-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
2018-06-08 13:36:11 -04:00
..
ahci-allwinner.c ide: use local path for local headers 2018-06-01 19:20:37 +03:00
ahci.c ahci: move PIO Setup FIS before transfer, fix it for ATAPI commands 2018-06-08 13:36:11 -04:00
ahci_internal.h ahci: delete old host register address definitions 2018-06-08 13:17:38 -04:00
atapi.c IDE: replace DEBUG_AIO with trace events 2017-09-18 15:01:26 -04:00
cmd646.c hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-03-12 16:12:46 +01:00
core.c hw/ide: Remove unused include 2018-06-01 14:15:10 +02:00
ich.c ide: use local path for local headers 2018-06-01 19:20:37 +03:00
isa.c hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-03-12 16:12:46 +01:00
macio.c macio: fix NULL pointer dereference when issuing IDE trim 2018-03-27 00:38:00 -04:00
Makefile.objs hw/ide: Emulate SiI3112 SATA controller 2018-01-10 12:53:00 +11:00
microdrive.c hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-03-12 16:12:46 +01:00
mmio.c hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-03-12 16:12:46 +01:00
pci.c hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-06-01 14:15:10 +02:00
piix.c hw/ide: remove old i386 dependency 2017-12-18 17:07:02 +03:00
qdev.c hw/block: Use errp directly rather than local_err 2017-12-19 10:25:03 +00:00
sii3112.c sii3112: Remove unneeded exit function 2018-03-18 18:27:23 +11:00
trace-events ahci: make ahci_mem_write traces more descriptive 2018-06-08 13:17:38 -04:00
via.c hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-06-01 14:15:10 +02:00