aboutsummaryrefslogtreecommitdiff
path: root/hw/serial.c
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2010-03-06 22:19:53 +0100
committerAurelien Jarno <aurelien@aurel32.net>2010-03-06 22:28:07 +0100
commitcdee7bdfee37b774c80f698d2d4338670db7c6cb (patch)
tree7dbc5f9e3e3257fefd7f8280bff6b5187cc1b022 /hw/serial.c
parent2f4f22bd445e30c04b6c0d127f0a39a52eee1a14 (diff)
hw/serial.c: fix THRE interrupt clearing
UART_IIR_THRI is not a mask, but a possible value for the IIR ID. Use UART_IIR_ID to extract this value. Broken by commit 71e605f80313a632cc6714cde7bd240042dbdd95. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'hw/serial.c')
-rw-r--r--hw/serial.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/serial.c b/hw/serial.c
index 586c3662bc..f3ec36a97e 100644
--- a/hw/serial.c
+++ b/hw/serial.c
@@ -541,7 +541,7 @@ static uint32_t serial_ioport_read(void *opaque, uint32_t addr)
break;
case 2:
ret = s->iir;
- if (ret & UART_IIR_THRI) {
+ if ((ret & UART_IIR_ID) == UART_IIR_THRI) {
s->thr_ipending = 0;
serial_update_irq(s);
}