diff --git a/hw/ide/macio.c b/hw/ide/macio.c index da94580..96c2556 100644 --- a/hw/ide/macio.c +++ b/hw/ide/macio.c @@ -111,6 +111,14 @@ static void pmac_ide_atapi_transfer_cb(void *opaque, int ret) return; } + if (s->packet_transfer_size && s->lba == -1) { + MACIO_DPRINTF("non-IO ATAPI DMA transfer size: %d\n", io->len); + /* Copy ATAPI buffer directly to RAM and finish */ + cpu_physical_memory_write(io->addr, s->io_buffer, io->len); + s->packet_transfer_size -= io->len; + MACIO_DPRINTF("end of non-IO ATAPI DMA transfer\n"); + } + if (!s->packet_transfer_size) { MACIO_DPRINTF("end of transfer\n"); ide_atapi_cmd_ok(s);