From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [PATCH] serial/aspeed-vuart: fix a couple mod_timer() calls
Date: Thu, 26 Apr 2018 05:50:55 +0000 [thread overview]
Message-ID: <20180426055055.GA9742@mwanda> (raw)
The "unthrottle_timeout" is HZ/10 but mod_timer() takes a the actual
jiffie where you want it to timeout, not an offset.
Fixes: 5909c0bf9c7a ("serial/aspeed-vuart: Implement quick throttle mechanism")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/tty/serial/8250/8250_aspeed_vuart.c b/drivers/tty/serial/8250/8250_aspeed_vuart.c
index 023db3266757..435bec40dee6 100644
--- a/drivers/tty/serial/8250/8250_aspeed_vuart.c
+++ b/drivers/tty/serial/8250/8250_aspeed_vuart.c
@@ -226,7 +226,8 @@ static void aspeed_vuart_unthrottle_exp(struct timer_list *timer)
struct uart_8250_port *up = vuart->port;
if (!tty_buffer_space_avail(&up->port.state->port)) {
- mod_timer(&vuart->unthrottle_timer, unthrottle_timeout);
+ mod_timer(&vuart->unthrottle_timer,
+ jiffies + unthrottle_timeout);
return;
}
@@ -271,7 +272,7 @@ static int aspeed_vuart_handle_irq(struct uart_port *port)
if (!timer_pending(&vuart->unthrottle_timer)) {
vuart->port = up;
mod_timer(&vuart->unthrottle_timer,
- unthrottle_timeout);
+ jiffies + unthrottle_timeout);
}
} else {
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: linux-aspeed@lists.ozlabs.org
Subject: [PATCH] serial/aspeed-vuart: fix a couple mod_timer() calls
Date: Thu, 26 Apr 2018 08:50:55 +0300 [thread overview]
Message-ID: <20180426055055.GA9742@mwanda> (raw)
The "unthrottle_timeout" is HZ/10 but mod_timer() takes a the actual
jiffie where you want it to timeout, not an offset.
Fixes: 5909c0bf9c7a ("serial/aspeed-vuart: Implement quick throttle mechanism")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/tty/serial/8250/8250_aspeed_vuart.c b/drivers/tty/serial/8250/8250_aspeed_vuart.c
index 023db3266757..435bec40dee6 100644
--- a/drivers/tty/serial/8250/8250_aspeed_vuart.c
+++ b/drivers/tty/serial/8250/8250_aspeed_vuart.c
@@ -226,7 +226,8 @@ static void aspeed_vuart_unthrottle_exp(struct timer_list *timer)
struct uart_8250_port *up = vuart->port;
if (!tty_buffer_space_avail(&up->port.state->port)) {
- mod_timer(&vuart->unthrottle_timer, unthrottle_timeout);
+ mod_timer(&vuart->unthrottle_timer,
+ jiffies + unthrottle_timeout);
return;
}
@@ -271,7 +272,7 @@ static int aspeed_vuart_handle_irq(struct uart_port *port)
if (!timer_pending(&vuart->unthrottle_timer)) {
vuart->port = up;
mod_timer(&vuart->unthrottle_timer,
- unthrottle_timeout);
+ jiffies + unthrottle_timeout);
}
} else {
next reply other threads:[~2018-04-26 5:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-26 5:50 Dan Carpenter [this message]
2018-04-26 5:50 ` [PATCH] serial/aspeed-vuart: fix a couple mod_timer() calls Dan Carpenter
2018-04-26 21:38 ` Jeremy Kerr
2018-04-26 21:38 ` Jeremy Kerr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180426055055.GA9742@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.