Skip to content

Commit a451deb

Browse files
Dan Carpentergregkh
authored andcommitted
serial/aspeed-vuart: fix a couple mod_timer() calls
The "unthrottle_timeout" is HZ/10 but mod_timer() takes a the actual jiffie where you want it to timeout, not an offset. Fixes: 5909c0b ("serial/aspeed-vuart: Implement quick throttle mechanism") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 8afb1d2 commit a451deb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/tty/serial/8250/8250_aspeed_vuart.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ static void aspeed_vuart_unthrottle_exp(struct timer_list *timer)
226226
struct uart_8250_port *up = vuart->port;
227227

228228
if (!tty_buffer_space_avail(&up->port.state->port)) {
229-
mod_timer(&vuart->unthrottle_timer, unthrottle_timeout);
229+
mod_timer(&vuart->unthrottle_timer,
230+
jiffies + unthrottle_timeout);
230231
return;
231232
}
232233

@@ -271,7 +272,7 @@ static int aspeed_vuart_handle_irq(struct uart_port *port)
271272
if (!timer_pending(&vuart->unthrottle_timer)) {
272273
vuart->port = up;
273274
mod_timer(&vuart->unthrottle_timer,
274-
unthrottle_timeout);
275+
jiffies + unthrottle_timeout);
275276
}
276277

277278
} else {

0 commit comments

Comments
 (0)