From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54455) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ua0uV-0001WQ-7H for qemu-devel@nongnu.org; Wed, 08 May 2013 05:43:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ua0uO-0005Ze-DO for qemu-devel@nongnu.org; Wed, 08 May 2013 05:43:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10487) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ua0uO-0005ZU-5N for qemu-devel@nongnu.org; Wed, 08 May 2013 05:43:36 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r489hZnk013281 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 8 May 2013 05:43:35 -0400 From: Kevin Wolf Date: Wed, 8 May 2013 11:43:22 +0200 Message-Id: <1368006206-2602-2-git-send-email-kwolf@redhat.com> In-Reply-To: <1368006206-2602-1-git-send-email-kwolf@redhat.com> References: <1368006206-2602-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 1/5] ide: Reset BMIDEA bit when the bus master is stopped List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, stefanha@redhat.com 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 --- hw/ide/pci.c | 1 + 1 file changed, 1 insertion(+) 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)) { -- 1.8.1.4