From: Kevin Wolf Date: Wed, 13 Mar 2013 15:53:06 +0000 (+0100) Subject: ide: Reset BMIDEA bit when the bus master is stopped X-Git-Tag: v1.5.0-rc1~1^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b39f96126549e2834152211a99919917423d2212;p=thirdparty%2Fqemu.git ide: Reset BMIDEA bit when the bus master is stopped The device is supposed to reset the Bus Master IDE Active bit in the status register when 0 is written to the Start/Stop Bus Master bit in the command register. In the common cases this happens automatically because bdrv_drain_all() flushes the requests, but with a large PRDT it could remain set. Signed-off-by: Kevin Wolf --- diff --git a/hw/ide/pci.c b/hw/ide/pci.c index a310975391f..635a364dd86 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -312,6 +312,7 @@ void bmdma_cmd_writeb(BMDMAState *bm, uint32_t val) bdrv_drain_all(); assert(bm->bus->dma->aiocb == NULL); } + bm->status &= ~BM_STATUS_DMAING; } else { bm->cur_addr = bm->addr; if (!(bm->status & BM_STATUS_DMAING)) {