macio: set res_count value to 0 after non-block ATAPI DMA transfers
commitff71767e069f26fa617047c38c8eb65673c8ad16
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Fri, 5 Aug 2016 07:30:02 +0000 (5 08:30 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 9 Aug 2016 19:24:25 +0000 (9 14:24 -0500)
tree6a92053d169876bf650572b44152a04d7aa1f6cc
parentec211e742683d4bc187839b01a4b0056617681a1
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>
(cherry picked from commit 16275edb342342625cd7e7ac2048436474465b50)
Conflicts:
hw/ide/macio.c

* removed context dependancy on ddd495e5

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/ide/macio.c