macio: set res_count value to 0 after non-block ATAPI DMA transfers
commit16275edb342342625cd7e7ac2048436474465b50
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Fri, 5 Aug 2016 07:30:02 +0000 (5 08:30 +0100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Sun, 7 Aug 2016 23:45:03 +0000 (8 09:45 +1000)
treed63342e1280abd7f87def93b0b3cf3519bdac42a
parent3c0c47e3464f3c54bd3f1cc6d4da2cbf7465e295
macio: set res_count value to 0 after non-block ATAPI DMA transfers

res_count should be set to the number of outstanding bytes after a DBDMA
request. Unfortunately this wasn't being set to zero by the non-block
transfer codepath meaning drivers that checked the descriptor result for
such requests (e.g reading the CDROM TOC) would assume from a non-zero result
that the transfer had failed.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ide/macio.c