diff options
Diffstat (limited to 'hw/ide/macio.c')
| -rw-r--r-- | hw/ide/macio.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/hw/ide/macio.c b/hw/ide/macio.c index 70b33422d2..abbc41b59e 100644 --- a/hw/ide/macio.c +++ b/hw/ide/macio.c @@ -84,13 +84,6 @@ static void pmac_ide_atapi_transfer_cb(void *opaque, int ret) m->aiocb = dma_bdrv_read(s->bs, &s->sg, (int64_t)(s->lba << 2) + (s->io_buffer_index >> 9), pmac_ide_atapi_transfer_cb, io); - if (!m->aiocb) { - qemu_sglist_destroy(&s->sg); - /* Note: media not present is the most likely case */ - ide_atapi_cmd_error(s, NOT_READY, - ASC_MEDIUM_NOT_PRESENT); - goto done; - } return; done: @@ -159,10 +152,8 @@ static void pmac_ide_transfer_cb(void *opaque, int ret) ide_issue_trim, pmac_ide_transfer_cb, s, true); break; } - - if (!m->aiocb) - pmac_ide_transfer_cb(io, -1); return; + done: if (s->dma_cmd == IDE_DMA_READ || s->dma_cmd == IDE_DMA_WRITE) { bdrv_acct_done(s->bs, &s->acct); @@ -200,8 +191,9 @@ static void pmac_ide_flush(DBDMA_io *io) { MACIOIDEState *m = io->opaque; - if (m->aiocb) - qemu_aio_flush(); + if (m->aiocb) { + bdrv_drain_all(); + } } /* PowerMac IDE memory IO */ |