qemu/hw/ide
John Snow aaeda4a3c9 ide: unify io_buffer_offset increments
IDEState's io_buffer_offset was originally added to keep track of offsets
in AHCI rather exclusively, but it was added to IDEState instead of an
AHCI-specific structure.

AHCI fakes all PIO transfers using DMA and a scatter-gather list. When
the core or atapi layers invoke HBA-specific mechanisms for transfers,
they do not always know that it is being backed by DMA or a sglist, so
this offset is not always updated by the HBA code everywhere.

If we modify it in dma_buf_commit, however, any HBA that needs to use
this offset to manage operating on only part of a sglist will have
access to it.

This will fix ATAPI PIO transfers performed through the AHCI HBA,
which were previously not modifying this value appropriately.

This will fix ATAPI PIO transfers larger than one sector.

Reported-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Message-id: 1440546331-29087-2-git-send-email-jsnow@redhat.com
CC: qemu-stable@nongnu.org
2015-09-17 14:17:04 -04:00
..
ahci.c ide: unify io_buffer_offset increments 2015-09-17 14:17:04 -04:00
ahci.h ahci.c: Don't assume AHCIState's parent is AHCIPCIState 2015-09-08 17:38:45 +01:00
atapi.c ide/atapi: Fix START STOP UNIT command completion 2015-07-26 23:42:53 -04:00
cmd646.c Block patches for 2.3 2015-03-10 14:01:22 +00:00
core.c ide: unify io_buffer_offset increments 2015-09-17 14:17:04 -04:00
ich.c ich9/ahci: Enable Migration 2015-05-22 15:58:22 -04:00
internal.h ide: unify io_buffer_offset increments 2015-09-17 14:17:04 -04:00
isa.c ide: support PIO restart for the ISA controller 2015-03-10 14:02:23 +01:00
macio.c macio: re-add TRIM support 2015-07-31 16:38:50 -04:00
Makefile.objs hw: make all of hw/ide/ configurable via default-configs/ 2013-04-08 18:13:12 +02:00
microdrive.c hmp: Remove "info pcmcia" 2014-10-24 12:19:11 +01:00
mmio.c hw: Convert from BlockDriverState to BlockBackend, mostly 2014-10-20 14:02:25 +02:00
pci.c ide: add limit to .prepare_buf() 2015-07-04 02:06:04 -04:00
pci.h ide: place initial state of the current request to IDEBus 2015-03-10 14:02:22 +01:00
piix.c Fix release_drive on unplugged devices (pci_piix3_xen_ide_unplug) 2015-08-03 14:27:12 +00:00
qdev.c BlockConf: Call backend functions to detect geometry and blocksizes 2015-03-10 14:02:22 +01:00
via.c Block patches for 2.3 2015-03-10 14:01:22 +00:00