[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 2/7] mac_dbdma: always clear FLUSH bit once DBDMA chann
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PULL 2/7] mac_dbdma: always clear FLUSH bit once DBDMA channel flush is complete |
Date: |
Sun, 20 Sep 2015 22:53:13 +0200 |
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>
---
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.8.1.4
- [Qemu-ppc] [PULL 0/7] ppc patch queue 2015-09-20, Alexander Graf, 2015/09/20
- [Qemu-ppc] [PULL 2/7] mac_dbdma: always clear FLUSH bit once DBDMA channel flush is complete,
Alexander Graf <=
- [Qemu-ppc] [PULL 4/7] target-ppc: Fix SRR0 when taking unaligned exceptions, Alexander Graf, 2015/09/20
- [Qemu-ppc] [PULL 3/7] PPC: e500 pci host: Fix ATMUs register reads, Alexander Graf, 2015/09/20
- [Qemu-ppc] [PULL 7/7] target-ppc: fix xscmpodp and xscmpudp decoding, Alexander Graf, 2015/09/20
- [Qemu-ppc] [PULL 1/7] kvm_ppc: remove kvmppc_timer_hack, Alexander Graf, 2015/09/20
- [Qemu-ppc] [PULL 6/7] target-ppc: fix vcipher, vcipherlast, vncipherlast and vpermxor, Alexander Graf, 2015/09/20
- [Qemu-ppc] [PULL 5/7] PPC: E500: Update u-boot to commit 79c884d7e4, Alexander Graf, 2015/09/20
- Re: [Qemu-ppc] [PULL 0/7] ppc patch queue 2015-09-20, Peter Maydell, 2015/09/21