macio: use the existing IDEDMA aiocb to hold the active DMA aiocb
commit03c1280bf5dbb0b0f6125d17b8eebe9b9e97c8d8
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Sat, 30 Jan 2016 12:36:52 +0000 (30 23:36 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Sat, 30 Jan 2016 12:37:25 +0000 (30 23:37 +1100)
treec865ed04e54b71f003b91ef96aaafac7ec68e51c
parent6a9620e60cc1b16dba9ee9d9d8cb374e4303c072
macio: use the existing IDEDMA aiocb to hold the active DMA aiocb

Currently the aiocb is held within MACIOIDEState, however the IDE core code
assumes that the current actvie DMA aiocb is held in aiocb in a few places,
e.g. ide_bus_reset() and ide_reset().

Switch over to using IDEDMA aiocb to store the aiocb for the current active
DMA request so that bus resets and restarts are handled correctly. As a
consequence we can now use ide_set_inactive() rather than handling its
functionality ourselves.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ide/macio.c
hw/ppc/mac.h