diff options
author | John Snow | 2014-11-11 01:41:40 +0100 |
---|---|---|
committer | Stefan Hajnoczi | 2014-11-14 10:20:34 +0100 |
commit | a395f3fa2f26c94dac03b37e3dfb1074bfe2ddea (patch) | |
tree | b211a658f1a1f2da1db3d61fd24fba87a7942cf8 /hw/ide | |
parent | Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (diff) | |
download | qemu-a395f3fa2f26c94dac03b37e3dfb1074bfe2ddea.tar.gz qemu-a395f3fa2f26c94dac03b37e3dfb1074bfe2ddea.tar.xz qemu-a395f3fa2f26c94dac03b37e3dfb1074bfe2ddea.zip |
ahci: Fix byte count regression for ATAPI/PIO
This patch fixes a regression caused by commit
659142ecf71a0da240ab0ff7cf929ee25c32b9bc.
The problem occurs when we wish to return early
from the ahci_start_transfer function, but are now
updating the transferred byte count in the AHCI
command header via ahci_commit_buf.
This will cause problems in the Windows 8 installer.
Don't update the byte count in the command header
for the transmission of ATAPI packets: These commands
will distort the final byte count of the actual data
payload.
The call to ahci_commit_buf remains in the "out"
portion of the call in order to clean up the sglist.
The byte count is maintained by forcing size to be 0.
Signed-off-by: John Snow <jsnow@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/ide')
-rw-r--r-- | hw/ide/ahci.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 61dbed1b97..1f3f951b50 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1089,6 +1089,7 @@ static void ahci_start_transfer(IDEDMA *dma) if (is_atapi && !ad->done_atapi_packet) { /* already prepopulated iobuffer */ ad->done_atapi_packet = true; + size = 0; goto out; } |