]> git.baikalelectronics.ru Git - kernel.git/commit
serial: sh-sci: Don't call sci_rx_interrupt() on error when using DMA
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 21 Aug 2015 18:02:55 +0000 (20:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Oct 2015 16:33:48 +0000 (17:33 +0100)
commit518781ed744e43d27c15523971a80e9713982876
treecf7bc9402cb3c3637ea8797179d33d0995509470
parented37d53f331077675c16cd37e710adfc5ad766ea
serial: sh-sci: Don't call sci_rx_interrupt() on error when using DMA

The error handler calls sci_rx_interrupt() to drain the receive FIFO if
an error condition happens.

However, if DMA is enabled on SCIFA or SCIFB, this will call
disable_irq_nosync() twice. Due to this imbalance, the receive interrupt
will never be re-enabled, and reception stops forever.

To fix this, restrict draining the FIFO to PIO mode, and just call
sci_receive_chars() directly.

Inspired by a patch from Yoshihiro Shimoda
<yoshihiro.shimoda.uh@renesas.com>.

Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sh-sci.c