Make sure the transmitter and receiver are stopped when shutting down the port, to avoid new RX DMA requests to arrive. Inspired by a patch in the BSP by Koji Matsuoka <koji.matsuoka.xm@xxxxxxxxxxx>. Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> --- v3: - No changes, v2: - New. --- drivers/tty/serial/sh-sci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index d8b73e791a554823..0622cafaf1c71cab 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1820,12 +1820,16 @@ static void sci_shutdown(struct uart_port *port) { struct sci_port *s = to_sci_port(port); unsigned long flags; + u16 scscr; dev_dbg(port->dev, "%s(%d)\n", __func__, port->line); spin_lock_irqsave(&port->lock, flags); sci_stop_rx(port); sci_stop_tx(port); + scscr = serial_port_in(port, SCSCR); + scscr &= ~(SCSCR_TE | SCSCR_RE); + serial_port_out(port, SCSCR, scscr); spin_unlock_irqrestore(&port->lock, flags); sci_free_dma(port); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html