|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] Revert part of 23811:f1349a968a5a "ns1655
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1318435888 -3600
# Node ID dcb2bd283dcaa9a72859cf6b454ad4a8a2129bf2
# Parent 48aa733d0767cf24f6c346c3fc0e573bccf4aa47
Revert part of 23811:f1349a968a5a "ns16550: Simplify UART..."
The change to poll LSR.THRE in a loop from __ns16550_poll is a bug.
We can loop indefinitely if there are no chars to transmit.
Thanks to Jan for spotting it.
Signed-off-by: Keir Fraser <keir@xxxxxxx>
---
diff -r 48aa733d0767 -r dcb2bd283dca xen/drivers/char/ns16550.c
--- a/xen/drivers/char/ns16550.c Wed Oct 12 16:21:32 2011 +0100
+++ b/xen/drivers/char/ns16550.c Wed Oct 12 17:11:28 2011 +0100
@@ -157,18 +157,15 @@
{
struct serial_port *port = this_cpu(poll_port);
struct ns16550 *uart = port->uart;
- char lsr;
if ( uart->intr_works )
return; /* Interrupts work - no more polling */
- while ( (lsr = ns_read_reg(uart, LSR)) & (LSR_DR|LSR_THRE) )
- {
- if ( lsr & LSR_THRE )
- serial_tx_interrupt(port, regs);
- if ( lsr & LSR_DR )
- serial_rx_interrupt(port, regs);
- }
+ while ( ns_read_reg(uart, LSR) & LSR_DR )
+ serial_rx_interrupt(port, regs);
+
+ if ( ns_read_reg(uart, LSR) & LSR_THRE )
+ serial_tx_interrupt(port, regs);
set_timer(&uart->timer, NOW() + MILLISECS(uart->timeout_ms));
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] Revert part of 23811:f1349a968a5a "ns16550: Simplify UART...",
Xen patchbot-unstable <=
|
|
|
|
|