aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/ide/macio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/ide/macio.c b/hw/ide/macio.c
index 5a326afd96..76f97c2539 100644
--- a/hw/ide/macio.c
+++ b/hw/ide/macio.c
@@ -273,6 +273,7 @@ static void pmac_ide_atapi_transfer_cb(void *opaque, int ret)
s->io_buffer_size = MIN(s->io_buffer_size, io->len);
dma_memory_write(&address_space_memory, io->addr, s->io_buffer,
s->io_buffer_size);
+ io->len = 0;
ide_atapi_cmd_ok(s);
m->dma_active = false;
goto done;