Linux Serial subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Tapio Reijonen" <tapio.reijonen@vaisala.com>
Cc: linux-serial@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 7/7] serial: max310x: Three-state TX and RTS while the port is closed
Date: Wed, 11 Nov 2026 13:54:19 +0000	[thread overview]
Message-ID: <sashiko-outbox-209112@kernel.org> (raw)
In-Reply-To: <20261111-serial-transceiver-supply-v1-7-40bad0f912f2@vaisala.com>

Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [Medium] serial: max310x: phantom break on TX line in
  max310x_startup() [1]
--

commit e4e606eca28fdbe85b131fef6cbe0acf9223f301
Author: Tapio Reijonen <tapio.reijonen@vaisala.com>

serial: max310x: Three-state TX and RTS while the port is closed

This commit implements the maxim,tristate-when-closed property to keep TX and
RTS three-stated in MODE1 while the UART port is closed.

> diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
> index 876bdd1f5496d..d5884c870d8e0 100644
> --- a/drivers/tty/serial/max310x.c
> +++ b/drivers/tty/serial/max310x.c

[ ... ]

> @@ -1542,6 +1557,7 @@ static int max310x_startup(struct uart_port *port)
>  	struct max310x_one *one = to_max310x_port(port);
>  	unsigned int val;
>  
> +	max310x_set_tristate(port, false);
>  	max310x_power(port, 1);
>  
>  	/*

[Severity: Medium]
This problem wasn't introduced by this patch, but can max310x_startup()
transmit a 50ms phantom break on the TX line [1] when reopening a port
that was closed with a break condition still asserted?

MAX310X_LCR_TXBREAK_BIT is only cleared in MAX310X_LCR_REG after
max310x_power(port, 1) returns.  Because max310x_power(port, 1) sleeps for
50ms via msleep(50) while waking the device, the newly enabled TX pin drives
the latched break state across the entire 50ms settle window, which can cause
framing errors or data corruption on the remote receiver.

[1] https://sashiko.dev/#/bug/linux-48f66bf9-1d5f-4959-b6b9-bc3800762a8e

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261111-serial-transceiver-supply-v1-0-40bad0f912f2@vaisala.com?part=7

      reply	other threads:[~2026-11-11 13:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 12:27 [PATCH 0/7] serial: core: Power the line transceiver with the port Tapio Reijonen
2026-11-11 12:28 ` [PATCH 1/7] serial: max310x: Look up all channels before adding any port Tapio Reijonen
2026-11-11 12:52   ` sashiko-bot
2026-11-11 12:28 ` [PATCH 2/7] dt-bindings: serial: Add the line transceiver enable GPIO Tapio Reijonen
2026-11-11 12:53   ` sashiko-bot
2026-11-11 12:28 ` [PATCH 3/7] dt-bindings: serial: sc16is7xx: Disallow transceiver GPIO on dual parts Tapio Reijonen
2026-11-11 12:55   ` sashiko-bot
2026-11-11 12:28 ` [PATCH 4/7] serial: core: Power the line transceiver with the port Tapio Reijonen
2026-11-11 13:16   ` sashiko-bot
2026-11-11 12:28 ` [PATCH 5/7] serial: max310x: Request the line transceiver per port Tapio Reijonen
2026-11-11 13:30   ` sashiko-bot
2026-11-11 12:28 ` [PATCH 6/7] dt-bindings: serial: max310x: Add maxim,tristate-when-closed Tapio Reijonen
2026-11-11 13:41   ` sashiko-bot
2026-11-11 12:28 ` [PATCH 7/7] serial: max310x: Three-state TX and RTS while the port is closed Tapio Reijonen
2026-11-11 13:54   ` sashiko-bot [this message]

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=sashiko-outbox-209112@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=tapio.reijonen@vaisala.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