[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 5/6] dbdma: set FLUSH bit upon reception of flush co
From: |
Mark Cave-Ayland |
Subject: |
[Qemu-devel] [PATCH 5/6] dbdma: set FLUSH bit upon reception of flush command for unassigned DBDMA channels |
Date: |
Sun, 10 Jul 2016 19:08:57 +0100 |
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>
---
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 f437a55..cb740c1 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)
--
1.7.10.4
- [Qemu-devel] [PATCH 0/6] dbdma: improve logging and various fixes, Mark Cave-Ayland, 2016/07/10
- [Qemu-devel] [PATCH 3/6] dbdma: fix endian of DBDMA_CMDPTR_LO during branch, Mark Cave-Ayland, 2016/07/10
- [Qemu-devel] [PATCH 6/6] dbdma: reset io->processing flag for unassigned DBDMA channel rw accesses, Mark Cave-Ayland, 2016/07/10
- [Qemu-devel] [PATCH 5/6] dbdma: set FLUSH bit upon reception of flush command for unassigned DBDMA channels,
Mark Cave-Ayland <=
- [Qemu-devel] [PATCH 1/6] dbdma: always define DBDMA_DPRINTF and enable debug with DEBUG_DBDMA, Mark Cave-Ayland, 2016/07/10
- [Qemu-devel] [PATCH 4/6] dbdma: fix load_word/store_word value endianness, Mark Cave-Ayland, 2016/07/10
- [Qemu-devel] [PATCH 2/6] dbdma: add per-channel debugging enabled via DEBUG_DBDMA_CHANMASK, Mark Cave-Ayland, 2016/07/10
- Re: [Qemu-devel] [PATCH 0/6] dbdma: improve logging and various fixes, David Gibson, 2016/07/10