From: Mark Cave-Ayland <[email protected]>

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: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: BALATON Zoltan <[email protected]>
Message-ID: <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
 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,
-- 
2.53.0


Reply via email to