All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: Michael McAllister <me@michaelmcallister.org>,
	linux-serial@vger.kernel.org
Cc: gregkh@linuxfoundation.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] serial: qcom-geni: Set UPSTAT_AUTOCTS for hardware flow control
Date: Thu, 22 Oct 2026 05:59:31 +0200	[thread overview]
Message-ID: <8b077ae2-250b-4181-94bd-8b87e9927807@kernel.org> (raw)
In-Reply-To: <20261021202603.42888-1-me@michaelmcallister.org>

On 21. 10. 26, 22:26, Michael McAllister wrote:
> diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
> index a851b8f0ef..5782b89c84 100644
> --- a/drivers/tty/serial/qcom_geni_serial.c
> +++ b/drivers/tty/serial/qcom_geni_serial.c
> @@ -1503,6 +1503,7 @@ static void qcom_geni_serial_set_termios(struct uart_port *uport,
>   	struct qcom_geni_serial_port *port = to_dev_port(uport);
>   	unsigned int baud;
>   	unsigned long timeout;
> +	unsigned long flags;
>   	u32 bits_per_char;
>   	u32 tx_trans_cfg;
>   	u32 tx_parity_cfg;
> @@ -1596,6 +1597,14 @@ static void qcom_geni_serial_set_termios(struct uart_port *uport,
>   	writel(bits_per_char, uport->membase + SE_UART_RX_WORD_LEN);
>   	writel(stop_bit_len, uport->membase + SE_UART_TX_STOP_BIT_LEN);
>   
> +	/* CTS gates TX in hardware; no CTS interrupt updates hw_stopped. */
> +	uart_port_lock_irqsave(uport, &flags);

Why not to use scoped_guard()?

> +	if (termios->c_cflag & CRTSCTS)
> +		uport->status |= UPSTAT_AUTOCTS;
> +	else
> +		uport->status &= ~UPSTAT_AUTOCTS;
> +	uart_port_unlock_irqrestore(uport, flags);
> +
>   	trace_geni_serial_set_termios(uport->dev, baud, bits_per_char,
>   				      tx_trans_cfg, tx_parity_cfg, rx_trans_cfg,
>   				      rx_parity_cfg, stop_bit_len);

thanks,
-- 
js
suse labs

  parent reply	other threads:[~2026-10-22  3:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21 20:26 [PATCH] serial: qcom-geni: Set UPSTAT_AUTOCTS for hardware flow control Michael McAllister
2026-10-21 20:31 ` sashiko-bot
2026-10-22  3:59 ` Jiri Slaby [this message]
2026-10-22 19:36   ` Michael McAllister
2026-10-22 19:36 ` [PATCH v2] " Michael McAllister
2026-10-22 19:42   ` sashiko-bot

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=8b077ae2-250b-4181-94bd-8b87e9927807@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=me@michaelmcallister.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.