[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Avoid ns16550 poll timeout underflow.
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 106f258edf97d35c11f80717f40cac482583ddf6 # Parent 43a1f899e302b813616b2467380537fecc92a3a7 Avoid ns16550 poll timeout underflow. Signed-off-by: Alex Williamson <alex.williamson@xxxxxx> Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> diff -r 43a1f899e302 -r 106f258edf97 xen/drivers/char/ns16550.c --- a/xen/drivers/char/ns16550.c Fri Dec 2 08:54:09 2005 +++ b/xen/drivers/char/ns16550.c Fri Dec 2 10:05:49 2005 @@ -211,7 +211,8 @@ { /* Polled mode. Calculate time to fill RX FIFO and/or empty TX FIFO. */ bits = uart->data_bits + uart->stop_bits + !!uart->parity; - uart->timeout_ms = (bits * port->tx_fifo_size * 1000) / uart->baud; + uart->timeout_ms = max_t( + unsigned int, 1, (bits * port->tx_fifo_size * 1000) / uart->baud); init_ac_timer(&uart->timer, ns16550_poll, port, 0); set_ac_timer(&uart->timer, NOW() + MILLISECS(uart->timeout_ms)); } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |