[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 08/40] mac_dbdma: always clear FLUSH bit once DBDMA
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 08/40] mac_dbdma: always clear FLUSH bit once DBDMA channel flush is complete |
Date: |
Wed, 21 Oct 2015 12:51:38 -0500 |
From: Mark Cave-Ayland <address@hidden>
The code to flush the DBDMA channel was effectively duplicated in
dbdma_control_write(), except for the fact that the copy executed outside of a
RUN bit transition was broken by not clearing the FLUSH bit once the flush was
complete.
Newer PPC Linux kernels would timeout waiting for the FLUSH bit to clear again
after submitting a FLUSH command. Fix this by always clearing the FLUSH bit
once the channel flush is complete and removing the repeated code.
Reported-by: Aurelien Jarno <address@hidden>
Signed-off-by: Mark Cave-Ayland <address@hidden>
Reviewed-by: Aurelien Jarno <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
(cherry picked from commit 1cde732d88af34849343dc1f0e68072eab0841b9)
Signed-off-by: Michael Roth <address@hidden>
---
hw/misc/macio/mac_dbdma.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/hw/misc/macio/mac_dbdma.c b/hw/misc/macio/mac_dbdma.c
index b25e851..779683c 100644
--- a/hw/misc/macio/mac_dbdma.c
+++ b/hw/misc/macio/mac_dbdma.c
@@ -590,10 +590,11 @@ dbdma_control_write(DBDMA_channel *ch)
if ((ch->regs[DBDMA_STATUS] & RUN) && !(status & RUN)) {
/* RUN is cleared */
status &= ~(ACTIVE|DEAD);
- if ((status & FLUSH) && ch->flush) {
- ch->flush(&ch->io);
- status &= ~FLUSH;
- }
+ }
+
+ if ((status & FLUSH) && ch->flush) {
+ ch->flush(&ch->io);
+ status &= ~FLUSH;
}
DBDMA_DPRINTF(" status 0x%08x\n", status);
@@ -603,9 +604,6 @@ dbdma_control_write(DBDMA_channel *ch)
if (status & ACTIVE) {
DBDMA_kick(dbdma_from_ch(ch));
}
- if ((status & FLUSH) && ch->flush) {
- ch->flush(&ch->io);
- }
}
static void dbdma_write(void *opaque, hwaddr addr,
--
1.9.1
- [Qemu-devel] [PATCH 37/40] s390x/kvm: Fix vector validity bit in device machine checks, (continued)
- [Qemu-devel] [PATCH 37/40] s390x/kvm: Fix vector validity bit in device machine checks, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 36/40] misc: zynq_slcr: Fix MMIO writes, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 38/40] util/qemu-config: fix missing machine command line options, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 40/40] virtio-input: ignore events until the guest driver is ready, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 39/40] Migration: Generate the completed event only when we complete, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 04/40] block/iscsi: validate block size returned from target, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 03/40] target-arm/arm-semi.c: Fix broken SYS_WRITE0 via gdb, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 05/40] exec-all: Translate TCI return addresses backwards too, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 06/40] block/nfs: fix calculation of allocated file size, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 07/40] qemu-img: Fix crash in amend invocation, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 08/40] mac_dbdma: always clear FLUSH bit once DBDMA channel flush is complete,
Michael Roth <=
- [Qemu-devel] [PATCH 10/40] scripts/dump-guest-memory.py: fix after RAMBlock change, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 09/40] vhost-scsi: fix wrong vhost-scsi firmware path, Michael Roth, 2015/10/21
- Re: [Qemu-devel] [PATCH 00/40] Patch Round-up for stable 2.4.1, freeze on 2015-10-29, Cole Robinson, 2015/10/22
- Re: [Qemu-devel] [PATCH 00/40] Patch Round-up for stable 2.4.1, freeze on 2015-10-29, Markus Armbruster, 2015/10/22
- Re: [Qemu-devel] [PATCH 00/40] Patch Round-up for stable 2.4.1, freeze on 2015-10-29, Denis V. Lunev, 2015/10/29