diff mbox series

[2/2] tty: serial: qcom_geni_serial: Don't try to manually disable the console

Message ID 20200313134635.2.I3648fac6c98b887742934146ac2729ecb7232eb1@changeid (mailing list archive)
State Accepted
Commit d49e7953f9b9f5e50c12dda95f4041fb877cdc71
Headers show
Series [1/2] tty: serial: qcom_geni_serial: No need to stop tx/rx on UART shutdown | expand

Commit Message

Doug Anderson March 13, 2020, 8:46 p.m. UTC
The geni serial driver's shutdown code had a special case to call
console_stop().  Grepping through the code, it was the only serial
driver doing something like this (the only other caller of
console_stop() was in serial_core.c).

As far as I can tell there's no reason to call console_stop() in the
geni code.  ...and a good reason _not_ to call it.  Specifically if
you have an agetty running on the same serial port as the console then
killing the agetty kills your console and if you start the agetty
again the console doesn't come back.

Fixes: c4f528795d1a ("tty: serial: msm_geni_serial: Add serial driver support for GENI based QUP")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---

 drivers/tty/serial/qcom_geni_serial.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Stephen Boyd March 16, 2020, 5:57 p.m. UTC | #1
Quoting Douglas Anderson (2020-03-13 13:46:52)
> The geni serial driver's shutdown code had a special case to call
> console_stop().  Grepping through the code, it was the only serial
> driver doing something like this (the only other caller of
> console_stop() was in serial_core.c).
> 
> As far as I can tell there's no reason to call console_stop() in the
> geni code.  ...and a good reason _not_ to call it.  Specifically if
> you have an agetty running on the same serial port as the console then
> killing the agetty kills your console and if you start the agetty
> again the console doesn't come back.
> 
> Fixes: c4f528795d1a ("tty: serial: msm_geni_serial: Add serial driver support for GENI based QUP")
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Akash Asthana March 17, 2020, 1:07 p.m. UTC | #2
On 3/14/2020 2:16 AM, Douglas Anderson wrote:
> The geni serial driver's shutdown code had a special case to call
> console_stop().  Grepping through the code, it was the only serial
> driver doing something like this (the only other caller of
> console_stop() was in serial_core.c).
>
> As far as I can tell there's no reason to call console_stop() in the
> geni code.  ...and a good reason _not_ to call it.  Specifically if
> you have an agetty running on the same serial port as the console then
> killing the agetty kills your console and if you start the agetty
> again the console doesn't come back.
>
> Fixes: c4f528795d1a ("tty: serial: msm_geni_serial: Add serial driver support for GENI based QUP")
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
Reviewed-by: Akash Asthana <akashast@codeaurora.org>
diff mbox series

Patch

diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
index 09d8612517aa..69a0072e0c53 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -827,10 +827,6 @@  static void get_tx_fifo_size(struct qcom_geni_serial_port *port)
 
 static void qcom_geni_serial_shutdown(struct uart_port *uport)
 {
-	/* Stop the console before stopping the current tx */
-	if (uart_console(uport))
-		console_stop(uport->cons);
-
 	disable_irq(uport->irq);
 }