diff options
author | Kevin Wolf <kwolf@redhat.com> | 2013-03-13 16:53:06 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-05-08 15:28:49 +0200 |
commit | b39f96126549e2834152211a99919917423d2212 (patch) | |
tree | fb6a52735b9df65df46d7fe44d79bcb7e678c901 /hw/ide/pci.c | |
parent | 3bac85d33716d9024afb8a262a39032bc0bba3ed (diff) | |
download | hqemu-b39f96126549e2834152211a99919917423d2212.zip hqemu-b39f96126549e2834152211a99919917423d2212.tar.gz |
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 <kwolf@redhat.com>
Diffstat (limited to 'hw/ide/pci.c')
-rw-r--r-- | hw/ide/pci.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/ide/pci.c b/hw/ide/pci.c index a310975..635a364 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)) { |