OSDN Git Service

tty: serial: qcom_geni_serial: Fix softlock
authorRyan Case <ryandcase@chromium.org>
Fri, 30 Nov 2018 02:18:40 +0000 (18:18 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Dec 2018 10:02:38 +0000 (11:02 +0100)
commita1fee899e5bed457afc20a6a2ff3915a95cc5942
tree61061cbec5201654814509239d96be510bed8297
parentd02337d29d33da6f1f83bebd7d3997e78df1df9e
tty: serial: qcom_geni_serial: Fix softlock

Transfers were being divided into device FIFO sized (64 byte max)
operations which would poll for completion within a spin_lock_irqsave /
spin_unlock_irqrestore block. This both made things slow by waiting for
the FIFO to completely drain before adding further data and would also
result in softlocks on large transmissions.

This patch allows larger transfers with continuous FIFO additions as
space becomes available and removes polling from the interrupt handler.

Signed-off-by: Ryan Case <ryandcase@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/qcom_geni_serial.c