From: Sergey Organov <sorganov@gmail.com>
To: Francesco Dolcini <francesco@dolcini.it>
Cc: "Fabio Estevam" <festevam@gmail.com>,
"Francesco Dolcini" <francesco.dolcini@toradex.com>,
linux-serial@vger.kernel.org, "Fugang Duan" <fugang.duan@nxp.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Shawn Guo" <shawnguo@kernel.org>,
"Johan Hovold" <johan@kernel.org>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"NXP Linux Team" <linux-imx@nxp.com>
Subject: Re: imx serial chars lost issue
Date: Wed, 26 Oct 2022 22:18:31 +0300 [thread overview]
Message-ID: <878rl2bdh4.fsf@osv.gnss.ru> (raw)
In-Reply-To: <Y1jihi+8L4ctFO9B@francesco-nb.int.toradex.com> (Francesco Dolcini's message of "Wed, 26 Oct 2022 09:32:22 +0200")
Francesco Dolcini <francesco@dolcini.it> writes:
> On Wed, Oct 26, 2022 at 12:06:34AM -0300, Fabio Estevam wrote:
>> Hi Francesco,
>>
>> On Mon, Oct 3, 2022 at 8:08 AM Francesco Dolcini
>> <francesco.dolcini@toradex.com> wrote:
>> >
>> > Hello all,
>> > recently I have been experiencing an issue with the imx uart on i.MX6ULL
>>
>> Does this also happen with other i.MX devices or only on i.MX6ULL?
>
> I do not know for sure, I did not try to actively reproduce the issue on
> another SoC. On the other hand the issue with the i.MX6ULL was noticed
> during some testing, and we do exactly the same tests on other SoC and
> there the issue is either not present or just happening very
> infrequently.
>
>> > SoC, on the tty console (no flow control, 1152008n1), chars after the 32nd
>> > are lost when typing "fast" (copy/paste or writing to the uart using
>> > automated tools).
>> >
>> > This was tested on Linux 6.0, however it does not look like a brand new
>> > regression, kernel 5.4 was somehow subject to the same issue, although
>> > it was way more difficult to trigger it.
>> >
>> > While I do understand that without flow control this is something that
>> > cannot be prevented, it is pretty fishy that is always the chars after
>> > the 32nd.
>> >
>> > I guess that might be happening is that the FIFO is emptied only by a
>> > timer or when it is full, instead of emptying it when half-full, and the
>> > CPU might not be fast enough leading to an overflow and the chars lost.
>> >
>> > Any idea?
>>
>> Can you share a reproducer?
>
> Just open the uart console with a terminal application and copy/paste the
> following:
>
> echo -n "12345678901234567890123456789012345678901234567890123456789012345678901234567890" | wc
>
> This is supposed to count 80 chars, you'll get less.
I've tested this on my board featuring iMX6SX CPU, using socat on both
ends of the serial line:
On PC, using MOXA multi-port serial board:
$ echo -n "12345678901234567890123456789012345678901234567890123456789012345678901234567890" | socat - /dev/ttyMI3,cfmakeraw,b115200
while running
$ socat -u /dev/ttymxc5,cfmakeraw,b115200 ./log
on the board, and I got exactly 80 bytes in the ./log.
The kernel running does not contain mentioned 7a637784d517 ("serial:
imx: reduce RX interrupt frequency") though, so maybe it's just that.
-- Sergey Organov
next prev parent reply other threads:[~2022-10-26 19:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-03 11:08 imx serial chars lost issue Francesco Dolcini
2022-10-26 3:06 ` Fabio Estevam
2022-10-26 7:32 ` Francesco Dolcini
2022-10-26 8:09 ` Lucas Stach
2022-10-26 19:18 ` Sergey Organov [this message]
2022-10-26 6:56 ` Uwe Kleine-König
2022-10-26 7:58 ` Francesco Dolcini
2022-10-26 19:36 ` Sergey Organov
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=878rl2bdh4.fsf@osv.gnss.ru \
--to=sorganov@gmail.com \
--cc=festevam@gmail.com \
--cc=francesco.dolcini@toradex.com \
--cc=francesco@dolcini.it \
--cc=fugang.duan@nxp.com \
--cc=johan@kernel.org \
--cc=kernel@pengutronix.de \
--cc=linux-imx@nxp.com \
--cc=linux-serial@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/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.