From: Aurelien Jarno Date: Sat, 6 Mar 2010 21:19:53 +0000 (+0100) Subject: hw/serial.c: fix THRE interrupt clearing X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~8545 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cdee7bdfee37b774c80f698d2d4338670db7c6cb;p=sdk%2Femulator%2Fqemu.git 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 --- diff --git a/hw/serial.c b/hw/serial.c index 586c366..f3ec36a 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); }