serial: sh-sci: Fix up break timer scheduling race.
The break flag timer is presently added through add_timer() via the interrupt and error paths, where it is possible to send multiple breaks in rapid succession and trigger the timer pending BUG_ON(). This moves over to a mod_timer() instead. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
Родитель
94c8b6dbd6
Коммит
bc9b3f5c9f
|
@ -554,8 +554,7 @@ static void sci_receive_chars(struct uart_port *port)
|
||||||
*/
|
*/
|
||||||
static inline void sci_schedule_break_timer(struct sci_port *port)
|
static inline void sci_schedule_break_timer(struct sci_port *port)
|
||||||
{
|
{
|
||||||
port->break_timer.expires = jiffies + SCI_BREAK_JIFFIES;
|
mod_timer(&port->break_timer, jiffies + SCI_BREAK_JIFFIES);
|
||||||
add_timer(&port->break_timer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ensure that two consecutive samples find the break over. */
|
/* Ensure that two consecutive samples find the break over. */
|
||||||
|
|
Загрузка…
Ссылка в новой задаче