diff options
author | Aleksandar Mitev <amitev@visteon.com> | 2015-09-18 13:08:28 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-04 17:36:10 +0100 |
commit | 9ab76556608665c35080f641c73025297d0a2813 (patch) | |
tree | 462a73c489f6a4bd0a997b28cf1e386cb62cf917 /drivers/tty/serial/sh-sci.c | |
parent | 0e5c4b4d154ee0a34e39e1a587f71d4671783abf (diff) |
serial: sh-sci: Remove timer on shutdown of port
This prevents DMA timer timeout that can trigger after the port has
been closed.
Signed-off-by: Aleksandar Mitev <amitev@visteon.com>
[geert: Move del_timer_sync() outside spinlock to avoid circular locking
dependency between rx_timer_fn() and del_timer_sync()]
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/sh-sci.c')
-rw-r--r-- | drivers/tty/serial/sh-sci.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index ac9ce8f1ff79..36a11110acf4 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1810,6 +1810,14 @@ static void sci_shutdown(struct uart_port *port) sci_stop_tx(port); spin_unlock_irqrestore(&port->lock, flags); +#ifdef CONFIG_SERIAL_SH_SCI_DMA + if (s->chan_rx) { + dev_dbg(port->dev, "%s(%d) deleting rx_timer\n", __func__, + port->line); + del_timer_sync(&s->rx_timer); + } +#endif + sci_free_dma(port); sci_free_irq(s); } |