git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
regression: test serial port r/w.
[lunaix-os.git]
/
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 4ae45d78e1cfbf50ffb760ab0215b1f3bacc6450..e3dda36e48823b7d704dfe2b8e16f4c9da3137fb 100644
(file)
--- 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);
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))) {
char recv;
int i = 0;
while ((recv = uart_read_byte(pos))) {