Patchwork ide: Remove wrong assertion

login
register
mail settings
Submitter Kevin Wolf
Date Jan. 16, 2013, 9:54 a.m.
Message ID <1358330074-18475-1-git-send-email-kwolf@redhat.com>
Download mbox | patch
Permalink /patch/212466/
State New
Headers show

Comments

Kevin Wolf - Jan. 16, 2013, 9:54 a.m.
The Bus Master IDE Active bit (BM_STATUS_DMAING) is not only set when
the request is still in flight, but also when it has completed and the
size of the physical memory regions in the PRDT was larger than the
transfer size.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 hw/ide/pci.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
Stefan Hajnoczi - Jan. 16, 2013, 1:27 p.m.
On Wed, Jan 16, 2013 at 10:54:34AM +0100, Kevin Wolf wrote:
> The Bus Master IDE Active bit (BM_STATUS_DMAING) is not only set when
> the request is still in flight, but also when it has completed and the
> size of the physical memory regions in the PRDT was larger than the
> transfer size.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  hw/ide/pci.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan

Patch

diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index e6226e3..59fd539 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -311,7 +311,6 @@  void bmdma_cmd_writeb(BMDMAState *bm, uint32_t val)
             if (bm->bus->dma->aiocb) {
                 bdrv_drain_all();
                 assert(bm->bus->dma->aiocb == NULL);
-                assert((bm->status & BM_STATUS_DMAING) == 0);
             }
         } else {
             bm->cur_addr = bm->addr;