Commit 9aff74cc authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

serial: qcom-geni: fix console shutdown hang

A recent commit added back the calls top stop tx and rx to shutdown()
which had previously been removed by commit e8376633 ("tty: serial:
qcom_geni_serial: No need to stop tx/rx on UART shutdown") in order to
be able to use kgdb after stopping the getty.

Not only did this again break kgdb, but it also broke serial consoles
more generally by hanging TX when stopping the getty during reboot.

The underlying problem has been there since the driver was first merged
and fixing it is going to be a bit involved so simply stop calling the
broken stop functions during shutdown for consoles for now.

Fixes: d8aca2f9 ("tty: serial: qcom-geni-serial: stop operations in progress at shutdown")
Cc: stable <stable@kernel.org>
Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: default avatarJohan Hovold <johan+linaro@kernel.org>
Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
Reviewed-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: default avatarAndrew Halaney <ahalaney@redhat.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sa8540p-ride
Link: https://lore.kernel.org/r/20230307164405.14218-2-johan+linaro@kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1a5ecc73
...@@ -1070,6 +1070,10 @@ static int setup_fifos(struct qcom_geni_serial_port *port) ...@@ -1070,6 +1070,10 @@ static int setup_fifos(struct qcom_geni_serial_port *port)
static void qcom_geni_serial_shutdown(struct uart_port *uport) static void qcom_geni_serial_shutdown(struct uart_port *uport)
{ {
disable_irq(uport->irq); disable_irq(uport->irq);
if (uart_console(uport))
return;
qcom_geni_serial_stop_tx(uport); qcom_geni_serial_stop_tx(uport);
qcom_geni_serial_stop_rx(uport); qcom_geni_serial_stop_rx(uport);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment