tty: serial: tegra: Handle RX transfer in PIO mode if DMA wasn't started
authorDmitry Osipenko <digetx@gmail.com>
Sun, 9 Feb 2020 16:44:15 +0000 (19:44 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Feb 2020 20:32:13 +0000 (12:32 -0800)
commit1f69a1273b3f204a9c00dc3bbdcc4afcd0787428
tree6862f4219935efdd44f7f77f115941091011978e
parent04b5bfe3dc94e64d0590c54045815cb5183fb095
tty: serial: tegra: Handle RX transfer in PIO mode if DMA wasn't started

It is possible to get an instant RX timeout or end-of-transfer interrupt
before RX DMA was started, if transaction is less than 16 bytes. Transfer
should be handled in PIO mode in this case because DMA can't handle it.
This patch brings back the original behaviour of the driver that was
changed by accident by a previous commit, it fixes occasional Bluetooth HW
initialization failures which I started to notice recently.

Fixes: d5e3fadb7012 ("tty: serial: tegra: Activate RX DMA transfer by request")
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20200209164415.9632-1-digetx@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/serial-tegra.c