From: sashiko-bot@kernel.org
To: "Tapio Reijonen" <tapio.reijonen@vaisala.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH v2 4/4] serial: max310x: end the RTS envelope when a flush leaves nothing to send
Date: Tue, 17 Nov 2026 06:22:18 +0000 [thread overview]
Message-ID: <sashiko-outbox-218248@kernel.org> (raw)
In-Reply-To: <20261117-max310x-tx-fixes-v2-4-b395126fd23d@vaisala.com>
> With software-timed RTS, max310x_handle_tx() ends the envelope only at
> its entry check, when it finds the transmit fifo empty. If
> uart_flush_buffer() empties the fifo after that check, while the
> function reads TXFIFOLVL, the loop ends without writing to the chip and
> the function returns. Nothing was written, so no TX-empty interrupt
> follows. tx_state stays at MAX310X_TX_SEND and RTS stays asserted until
> the next write or until the port is closed, and an RS-485 transceiver
> blocks the bus for that time.
>
> A tcflush(TCOFLUSH) timed to the end of the delay before send
> reproduces it: 68 of 975 flushes left the port in the send state, seen
> by a following byte that left without the delay.
>
> Call max310x_delayed_stop_tx() when the loop has pushed nothing. It
> returns when data is still queued or the chip FIFO still drains, and
> arms the after-send hold otherwise. With the change, 9509 such flushes
> left no port in the send state.
>
> Fixes: 33632215e1bb ("serial: max310x: drive RTS in software when hardware delays are too short")
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Closes: https://sashiko.dev/#/patchset/20261116-max310x-tx-fixes-v1-0-61c01f180911%40vaisala.com
> Signed-off-by: Tapio Reijonen <tapio.reijonen@vaisala.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261117-max310x-tx-fixes-v2-0-b395126fd23d@vaisala.com?part=4
prev parent reply other threads:[~2026-11-17 6:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 6:14 [PATCH v2 0/4] serial: max310x: transmit path fixes Tapio Reijonen
2026-11-17 6:14 ` [PATCH v2 1/4] serial: max310x: do not advance the TX fifo past a flush Tapio Reijonen
2026-11-17 6:31 ` sashiko-bot
2026-11-17 6:14 ` [PATCH v2 2/4] serial: max310x: re-check the TX queue before the after-send hold Tapio Reijonen
2026-11-17 6:21 ` sashiko-bot
2026-11-17 6:14 ` [PATCH v2 3/4] serial: max310x: hold TX data until the software RTS send phase Tapio Reijonen
2026-11-17 6:48 ` sashiko-bot
2026-11-17 6:14 ` [PATCH v2 4/4] serial: max310x: end the RTS envelope when a flush leaves nothing to send Tapio Reijonen
2026-11-17 6:22 ` 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-218248@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-serial@vger.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 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.