serial: sh-sci: Fix receive on SCIFA/SCIFB variants with DMA
authorGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 9 Oct 2018 17:41:58 +0000 (19:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Oct 2018 14:20:24 +0000 (16:20 +0200)
commit202dc3cc10b4d37e5251431acf8d5040a8876c7d
tree2ef0d9d52652e84336d0206f4b9c2d813af173bf
parent0238df646e6224016a45505d2c111a24669ebe21
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: 2c4ee23530ffc022 ("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>
drivers/tty/serial/sh-sci.c