mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
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 71e605f803.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user