Skip to content

Commit 202dc3c

Browse files
geertugregkh
authored andcommitted
serial: sh-sci: Fix receive on SCIFA/SCIFB variants with DMA
On SCIFA and SCIFB serial ports with DMA support (i.e. some ports on R-Car Gen2 and RZ/G1 SoCs), receive DMA operations are submitted before the DMA channel pointer is initialized. Hence this fails, and the driver tries to fall back to PIO. However, at this early phase in the initialization sequence, fallback to PIO does not work, leading to a serial port that cannot receive any data. Fix this by calling sci_submit_rx() after initialization of the DMA channel pointer. Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Fixes: 2c4ee23 ("serial: sh-sci: Postpone DMA release when falling back to PIO") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 0238df6 commit 202dc3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/tty/serial/sh-sci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,10 +1614,10 @@ static void sci_request_dma(struct uart_port *port)
16141614
hrtimer_init(&s->rx_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
16151615
s->rx_timer.function = rx_timer_fn;
16161616

1617+
s->chan_rx_saved = s->chan_rx = chan;
1618+
16171619
if (port->type == PORT_SCIFA || port->type == PORT_SCIFB)
16181620
sci_submit_rx(s);
1619-
1620-
s->chan_rx_saved = s->chan_rx = chan;
16211621
}
16221622
}
16231623

0 commit comments

Comments
 (0)