From: Kevin Wolf <kwolf@redhat.com>
To: anthony@codemonkey.ws
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 16/16] ide: Reset current_addr after stopping DMA
Date: Tue, 30 Nov 2010 18:58:20 +0100 [thread overview]
Message-ID: <1291139900-20329-17-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1291139900-20329-1-git-send-email-kwolf@redhat.com>
Whenever SSBM is reset in the command register all state information is lost.
Restarting DMA means that current_addr must be reset to the base address of the
PRD table. The OS is not required to change the base address register before
starting a DMA operation, it can reuse the value it wrote for an earlier
request.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
hw/ide/pci.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index 404f045..ad406ee 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -65,6 +65,7 @@ void bmdma_cmd_writeb(void *opaque, uint32_t addr, uint32_t val)
#endif
}
} else {
+ bm->cur_addr = bm->addr;
if (!(bm->status & BM_STATUS_DMAING)) {
bm->status |= BM_STATUS_DMAING;
/* start dma transfer if possible */
@@ -101,7 +102,6 @@ static void bmdma_addr_write(IORange *ioport, uint64_t addr,
#endif
bm->addr &= ~(mask << shift);
bm->addr |= ((data & mask) << shift) & ~3;
- bm->cur_addr = bm->addr;
}
const IORangeOps bmdma_addr_ioport_ops = {
--
1.7.2.3
next prev parent reply other threads:[~2010-12-01 4:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-30 17:58 [Qemu-devel] [PULL 00/16] Block patches Kevin Wolf
2010-11-30 17:58 ` [Qemu-devel] [PATCH 01/16] scsi-disk: Move active request asserts Kevin Wolf
2010-11-30 17:58 ` [Qemu-devel] [PATCH 02/16] Implement drive_del to decouple block removal from device removal Kevin Wolf
2010-11-30 17:58 ` [Qemu-devel] [PATCH 03/16] block migration: do not submit multiple AIOs for same sector (v2) Kevin Wolf
2010-11-30 17:58 ` [Qemu-devel] [PATCH 04/16] ide: convert bmdma address ioport to ioport_register() Kevin Wolf
2010-11-30 17:58 ` [Qemu-devel] [PATCH 05/16] qemu and qemu-xen: support empty write barriers in xen_disk Kevin Wolf
2010-11-30 17:58 ` [Qemu-devel] [PATCH 06/16] block: Remove unused s->hd in various drivers Kevin Wolf
2010-11-30 17:58 ` [Qemu-devel] [PATCH 07/16] scsi: Increase the number of possible devices Kevin Wolf
2010-11-30 17:58 ` [Qemu-devel] [PATCH 08/16] scsi: Return SAM status codes Kevin Wolf
2010-11-30 17:58 ` [Qemu-devel] [PATCH 09/16] scsi: INQUIRY VPD fixes Kevin Wolf
2010-11-30 17:58 ` [Qemu-devel] [PATCH 10/16] scsi: Move sense handling into the driver Kevin Wolf
2010-11-30 17:58 ` [Qemu-devel] [PATCH 11/16] scsi-disk: Remove duplicate cdb parsing Kevin Wolf
2010-11-30 17:58 ` [Qemu-devel] [PATCH 12/16] raw-posix: raw_pwrite comment fixup Kevin Wolf
2010-11-30 17:58 ` [Qemu-devel] [PATCH 13/16] ide: Factor ide_dma_set_inactive out Kevin Wolf
2010-11-30 17:58 ` [Qemu-devel] [PATCH 14/16] ide: Set bus master inactive on error Kevin Wolf
2010-11-30 17:58 ` [Qemu-devel] [PATCH 15/16] ide: Ignore double DMA transfer starts/stops Kevin Wolf
2010-11-30 17:58 ` Kevin Wolf [this message]
2010-12-06 13:32 ` [Qemu-devel] [PULL 00/16] Block patches Anthony Liguori
2010-12-06 13:41 ` Kevin Wolf
2010-12-06 14:09 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1291139900-20329-17-git-send-email-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).