mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 08:56:45 +07:00
serial: sh-sci: Stop RX FIFO timer during port shutdown
The RX FIFO timer may be armed when the port is shut down, hence the
timer function may still be called afterwards.
Fix this race condition by deleting the timer during port shutdown.
Fixes: 039403765e
("serial: sh-sci: SCIFA/B RX FIFO software timeout")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
16ecf49c10
commit
c5a9262fa8
@ -2099,6 +2099,8 @@ static void sci_shutdown(struct uart_port *port)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (s->rx_trigger > 1 && s->rx_fifo_timeout > 0)
|
||||
del_timer_sync(&s->rx_fifo_timer);
|
||||
sci_free_irq(s);
|
||||
sci_free_dma(port);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user