From: Aniket Randive <aniket.randive@oss.qualcomm.com>
To: gregkh@linuxfoundation.org, jirislaby@kernel.org
Cc: praveen.talari@oss.qualcomm.com, bryan.odonoghue@linaro.org,
viken.dadhaniya@oss.qualcomm.com, quic_zongjian@quicinc.com,
krzk@kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
Aniket Randive <aniket.randive@oss.qualcomm.com>
Subject: [PATCH V1] serial: qcom_geni: Disable closing_wait for console to prevent shutdown timeout
Date: Mon, 6 Jul 2026 15:07:49 +0530 [thread overview]
Message-ID: <20260706093749.836121-1-aniket.randive@oss.qualcomm.com> (raw)
During system power-off, systemd closes the console UART and blocks in
tty_wait_until_sent() waiting for pending TX completion before
uart_shutdown() can cancel pending TX operations. With the default
closing_wait of 30s, this causes a watchdog reset when systemd is
responsible for watchdog feeding.
Set closing_wait to ASYNC_CLOSING_WAIT_NONE in startup() for console
ports to bypass tty_wait_until_sent() on close, allowing uart_shutdown()
to cancel TX commands cleanly. This change doesn't impact regular ports
functionality.
Signed-off-by: Aniket Randive <aniket.randive@oss.qualcomm.com>
---
drivers/tty/serial/qcom_geni_serial.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
index 7ead87b4eb65..3d3bed0923eb 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -1245,6 +1245,7 @@ static int qcom_geni_serial_startup(struct uart_port *uport)
{
int ret;
struct qcom_geni_serial_port *port = to_dev_port(uport);
+ struct tty_port *tport = &uport->state->port;
if (!port->setup) {
ret = qcom_geni_serial_port_setup(uport);
@@ -1252,6 +1253,13 @@ static int qcom_geni_serial_startup(struct uart_port *uport)
return ret;
}
+ /*
+ * Skip the close-time transmit drain for console ports so that
+ * shutdown can proceed without waiting for pending TX completion.
+ */
+ if (uart_console(uport))
+ tport->closing_wait = ASYNC_CLOSING_WAIT_NONE;
+
uart_port_lock_irq(uport);
qcom_geni_serial_start_rx(uport);
uart_port_unlock_irq(uport);
--
2.34.1
reply other threads:[~2026-07-06 9:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260706093749.836121-1-aniket.randive@oss.qualcomm.com \
--to=aniket.randive@oss.qualcomm.com \
--cc=bryan.odonoghue@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=praveen.talari@oss.qualcomm.com \
--cc=quic_zongjian@quicinc.com \
--cc=viken.dadhaniya@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox