From: sashiko-bot@kernel.org
To: "Martin Fuzzey" <martin.fuzzey@flowbird.group>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH v2] serial: sc16is7xx: fix data corruption due to unexpected xon/xoff
Date: Thu, 01 Oct 2026 10:11:42 +0000 [thread overview]
Message-ID: <20261001101142.E046A1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261001100534.1225894-1-martin.fuzzey@flowbird.group>
> The hardware supports automatically sending XON/OFF based on the
> FIFO status and that is already implemented by the driver.
> However that capability was not announced with the UPF_SOFT_FLOW bit.
>
> When the port is opened with the default of XON enabled the driver
> configures that in the hardware.
> If userspace does not want XON/OFF (which is normally the case) it will
> use TCSETS to disactivate it. However the serial core optimises this
> to only notify the driver if someting imporant has changed, and for
> XON/XOFF thit is only if the driver declares UPF_SOFT_FLOW.
>
> So we end up with unwanted XON/XOFF in the data stream.
>
> The problem only occurs if nothing else needed to be set by termios,
> ie if the user space requested values are the same as the default values,
> except for XON/XOFF.
> Since the default speed is 9600 this means that the problem only occurs
> when requesting 9600, otherwise the call to the driver will be made to
> change the speed, and that will also clear the XON/XOFF.
> As 9600 is quite rare these days that probably explains why this hasn't
> already been seen.
>
> It also only occurs on the first port open after boot since the subsequent
> opens will use the "logical state" set by TCSETS but not communicated to
> the driver the first time.
>
> Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261001100534.1225894-1-martin.fuzzey@flowbird.group?part=1
prev parent reply other threads:[~2026-10-01 10:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 10:05 [PATCH v2] serial: sc16is7xx: fix data corruption due to unexpected xon/xoff Martin Fuzzey
2026-10-01 10:11 ` 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=20261001101142.E046A1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=martin.fuzzey@flowbird.group \
--cc=sashiko-reviews@lists.linux.dev \
/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