mirror of https://github.com/xqemu/xqemu.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 <kwolf@redhat.com>
This commit is contained in:
parent
3bac85d337
commit
b39f961265
|
@ -312,6 +312,7 @@ void bmdma_cmd_writeb(BMDMAState *bm, uint32_t val)
|
||||||
bdrv_drain_all();
|
bdrv_drain_all();
|
||||||
assert(bm->bus->dma->aiocb == NULL);
|
assert(bm->bus->dma->aiocb == NULL);
|
||||||
}
|
}
|
||||||
|
bm->status &= ~BM_STATUS_DMAING;
|
||||||
} else {
|
} else {
|
||||||
bm->cur_addr = bm->addr;
|
bm->cur_addr = bm->addr;
|
||||||
if (!(bm->status & BM_STATUS_DMAING)) {
|
if (!(bm->status & BM_STATUS_DMAING)) {
|
||||||
|
|
Loading…
Reference in New Issue