Patchwork [Bug,588748] Re: QEMU fails to boot DR DOS Plus since 0.6.1

login
register
mail settings
Submitter Anthony Liguori
Date June 2, 2010, 9:18 p.m.
Message ID <20100602211803.10953.52568.malone@potassium.ubuntu.com>
Download mbox | patch
Permalink /patch/54434/
State New
Headers show

Comments

Anthony Liguori - June 2, 2010, 9:18 p.m.
This patch doesn't seem correct as the spec is pretty clear that THRE
interrupt enable is set to high, then an interrupt is rased if
LSR.THRE=1.  Does the following also make DOSPlus boot again:




** Changed in: qemu
       Status: New => In Progress

Patch

diff --git a/hw/serial.c b/hw/serial.c
index 9102edb..b0ac52f 100644
--- a/hw/serial.c
+++ b/hw/serial.c
@@ -401,7 +401,8 @@  static void serial_ioport_write(void *opaque, uint32_t addr,
                      s->poll_msl = 0;
                 }
             }
-            if (s->lsr & UART_LSR_THRE) {
+            if (s->ier & UART_IER_THRI &&
+                s->lsr & UART_LSR_THRE) {
                 s->thr_ipending = 1;
                 serial_update_irq(s);
             }