[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL for-2.2 01/11] ahci: Fix byte count regression for AT
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL for-2.2 01/11] ahci: Fix byte count regression for ATAPI/PIO |
Date: |
Fri, 14 Nov 2014 11:05:47 +0000 |
From: John Snow <address@hidden>
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 <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
hw/ide/ahci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 61dbed1..1f3f951 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;
}
--
2.1.0
- [Qemu-devel] [PULL for-2.2 00/11] Block patches, Stefan Hajnoczi, 2014/11/14
- [Qemu-devel] [PULL for-2.2 01/11] ahci: Fix byte count regression for ATAPI/PIO,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL for-2.2 02/11] ide: repair PIO transfers for cases where nsector > 1, Stefan Hajnoczi, 2014/11/14
- [Qemu-devel] [PULL for-2.2 03/11] ahci: unify sglist preparation, Stefan Hajnoczi, 2014/11/14
- [Qemu-devel] [PULL for-2.2 04/11] ide: Correct handling of malformed/short PRDTs, Stefan Hajnoczi, 2014/11/14
- [Qemu-devel] [PULL for-2.2 05/11] ahci: add is_ncq predicate helper, Stefan Hajnoczi, 2014/11/14
- [Qemu-devel] [PULL for-2.2 06/11] ahci: Fix FIS decomposition, Stefan Hajnoczi, 2014/11/14
- [Qemu-devel] [PULL for-2.2 07/11] ahci: Reorder error cases in handle_cmd, Stefan Hajnoczi, 2014/11/14
- [Qemu-devel] [PULL for-2.2 08/11] ahci: Check cmd_fis[1] more explicitly, Stefan Hajnoczi, 2014/11/14
- [Qemu-devel] [PULL for-2.2 09/11] ahci: factor out FIS decomposition from handle_cmd, Stefan Hajnoczi, 2014/11/14
- [Qemu-devel] [PULL for-2.2 10/11] block: Fix max nb_sectors in bdrv_make_zero, Stefan Hajnoczi, 2014/11/14
- [Qemu-devel] [PULL for-2.2 11/11] vmdk: Leave bdi intact if -ENOTSUP in vmdk_get_info, Stefan Hajnoczi, 2014/11/14