[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH for-2.3 2/4] ide: fix cmd_read_pio when nsectors > 1
From: |
John Snow |
Subject: |
[Qemu-block] [PATCH for-2.3 2/4] ide: fix cmd_read_pio when nsectors > 1 |
Date: |
Thu, 19 Mar 2015 20:24:14 -0400 |
Similar to the cmd_write_pio fix, update the nsector count and
ide sector before we invoke ide_transfer_start.
Signed-off-by: John Snow <address@hidden>
---
hw/ide/core.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 0e9da64..a895fd8 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -587,14 +587,12 @@ static void ide_sector_read_cb(void *opaque, int ret)
n = s->req_nb_sectors;
}
+ ide_set_sector(s, ide_get_sector(s) + n);
+ s->nsector -= n;
/* Allow the guest to read the io_buffer */
ide_transfer_start(s, s->io_buffer, n * BDRV_SECTOR_SIZE, ide_sector_read);
-
- ide_set_irq(s->bus);
-
- ide_set_sector(s, ide_get_sector(s) + n);
- s->nsector -= n;
s->io_buffer_offset += 512 * n;
+ ide_set_irq(s->bus);
}
static void ide_sector_read(IDEState *s)
--
2.1.0
- [Qemu-block] [PATCH for-2.3 0/4] ahci: fix big endian PIO failures, John Snow, 2015/03/19
- [Qemu-block] [PATCH for-2.3 2/4] ide: fix cmd_read_pio when nsectors > 1,
John Snow <=
- [Qemu-block] [PATCH for-2.3 3/4] ahci: Fix sglist offset manipulation for BE machines, John Snow, 2015/03/19
- [Qemu-block] [PATCH for-2.3 1/4] ide: fix cmd_write_pio when nsectors > 1, John Snow, 2015/03/19
- [Qemu-block] [PATCH for-2.3 4/4] ahci-test: improve rw buffer patterns, John Snow, 2015/03/19
- Re: [Qemu-block] [Qemu-devel] [PATCH for-2.3 0/4] ahci: fix big endian PIO failures, Andreas Färber, 2015/03/20
- Re: [Qemu-block] [PATCH for-2.3 0/4] ahci: fix big endian PIO failures, Stefan Hajnoczi, 2015/03/23