On Sat, 26 Sep 2026, Mark Cave-Ayland wrote:
Since its original implementation the disk DMA callback pmac_ide_transfer_cb()
accidentally made use of the CDROM DMA read callback 
pmac_ide_atapi_transfer_cb()
for disk DMA reads instead of itself.

Fixes: be1e343995e ("macio: switch over to new byte-aligned DMA helpers")
Signed-off-by: Mark Cave-Ayland <[email protected]>

Reviewed-by: BALATON Zoltan <[email protected]>

I'm not too familiar with this device but the change looks OK as far as I can tell.

Regards,
BALATON Zoltan

---
hw/ide/macio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ide/macio.c b/hw/ide/macio.c
index 40fb4f3b4f3..a95e68083f4 100644
--- a/hw/ide/macio.c
+++ b/hw/ide/macio.c
@@ -180,7 +180,7 @@ static void pmac_ide_transfer_cb(void *opaque, int ret)
    switch (s->dma_cmd) {
    case IDE_DMA_READ:
        s->bus->dma->aiocb = dma_blk_read(s->blk, &s->sg, offset, 0x1,
-                                          pmac_ide_atapi_transfer_cb, io);
+                                          pmac_ide_transfer_cb, io);
        break;
    case IDE_DMA_WRITE:
        s->bus->dma->aiocb = dma_blk_write(s->blk, &s->sg, offset, 0x1,


Reply via email to