X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/8fce4520de1f257819b16f9253fa28dcdae743f4..8efc0cf32160c68772a2ce1887e6a397852d3d96:/lunaix-os/hal/char/uart/16550_base.c diff --git a/lunaix-os/hal/char/uart/16550_base.c b/lunaix-os/hal/char/uart/16550_base.c index 4ae45d7..e3dda36 100644 --- a/lunaix-os/hal/char/uart/16550_base.c +++ b/lunaix-os/hal/char/uart/16550_base.c @@ -66,15 +66,14 @@ uart_general_irq_handler(int iv, struct llist_header* ports) llist_for_each(pos, n, ports, local_ports) { int is = uart_intr_identify(pos); - if (iv == pos->iv && is == UART_DATA_OK) { - break; + if (iv == pos->iv && (is == UART_DATA_OK || is == UART_CHR_TIMEOUT)) { + goto done; } } - if (!pos) { - return; - } + return; +done: char recv; int i = 0; while ((recv = uart_read_byte(pos))) {