[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 06/14] dbdma: set FLUSH bit upon reception of flush com
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 06/14] dbdma: set FLUSH bit upon reception of flush command for unassigned DBDMA channels |
Date: |
Mon, 18 Jul 2016 14:38:42 +1000 |
From: Mark Cave-Ayland <address@hidden>
This fixes MacOS 9 whereby it continually flushes and polls the status bits
until they are set to indicate a successful flush.
Signed-off-by: Mark Cave-Ayland <address@hidden>
Acked-by: Benjamin Herrenschmidt <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/misc/macio/mac_dbdma.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/hw/misc/macio/mac_dbdma.c b/hw/misc/macio/mac_dbdma.c
index c5dd0ac..ef5b0a5 100644
--- a/hw/misc/macio/mac_dbdma.c
+++ b/hw/misc/macio/mac_dbdma.c
@@ -783,8 +783,18 @@ static void dbdma_unassigned_rw(DBDMA_io *io)
static void dbdma_unassigned_flush(DBDMA_io *io)
{
DBDMA_channel *ch = io->channel;
+ dbdma_cmd *current = &ch->current;
+ uint16_t cmd;
qemu_log_mask(LOG_GUEST_ERROR, "%s: use of unassigned channel %d\n",
__func__, ch->channel);
+
+ cmd = le16_to_cpu(current->command) & COMMAND_MASK;
+ if (cmd == OUTPUT_MORE || cmd == OUTPUT_LAST ||
+ cmd == INPUT_MORE || cmd == INPUT_LAST) {
+ current->xfer_status = cpu_to_le16(ch->regs[DBDMA_STATUS] | FLUSH);
+ current->res_count = cpu_to_le16(io->len);
+ dbdma_cmdptr_save(ch);
+ }
}
void* DBDMA_init (MemoryRegion **dbdma_mem)
--
2.7.4
- [Qemu-ppc] [PULL 00/14] ppc-for-2.7 queue 20160718, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 02/14] dbdma: always define DBDMA_DPRINTF and enable debug with DEBUG_DBDMA, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 01/14] spapr: fix core unplug crash, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 14/14] ppc: Yet another fix for the huge page support detection mechanism, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 03/14] dbdma: add per-channel debugging enabled via DEBUG_DBDMA_CHANMASK, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 05/14] dbdma: fix load_word/store_word value endianness, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 10/14] spapr: Ensure CPU cores are added contiguously and removed in LIFO order, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 07/14] dbdma: reset io->processing flag for unassigned DBDMA channel rw accesses, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 13/14] target-ppc: fix left shift overflow in hpte_page_shift, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 06/14] dbdma: set FLUSH bit upon reception of flush command for unassigned DBDMA channels,
David Gibson <=
- [Qemu-ppc] [PULL 08/14] ppc: Fix support for odd MSR combinations, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 04/14] dbdma: fix endian of DBDMA_CMDPTR_LO during branch, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 12/14] ppc/mmu-hash64: Remove duplicated #include statement, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 09/14] vfio/spapr: Remove stale ioctl() call, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 11/14] ppc: abort if compat property contains an unknown value, David Gibson, 2016/07/18
- Re: [Qemu-ppc] [PULL 00/14] ppc-for-2.7 queue 20160718, Peter Maydell, 2016/07/18