From: Hector Palacios <hector.palacios@digi.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
linux-serial@vger.kernel.org
Cc: Huang Shijie <b32955@freescale.com>,
"shawn.guo@linaro.org" <shawn.guo@linaro.org>
Subject: mxs auart timeout waiting for transmission with hw flow control
Date: Mon, 30 Sep 2013 18:07:19 +0200 [thread overview]
Message-ID: <5249A1B7.4000404@digi.com> (raw)
Hi Uwe,
I saw your patch at http://www.spinics.net/lists/stable/msg12952.html and I believe
I'm having a similar issue when not using the port as console.
With hardware flow control enabled transmission fails at low baudrates (9600,38400).
Apparently the transmitter closes the port before the data has been really shifted out
(or even transferred by the DMA). While the console functions check the status of
AUART_STAT_BUSY, the standard functions don't, and the AUART is busy when shutdown is
called at low baudrates.
I also see the function uart_wait_until_sent() of serial_core.c getting out with
timeout expired. At 9600 baud, this function waits 2 or 4 jiffies. Increasing (a lot)
the timeout of this function solves the problem. I monitored the time it takes for TX
to be empty and it resulted in sometimes around 200 jiffies (@9600).
The issue can be reproduced using two iMX28 devices (transmitting between two ports on
the same platform usually works fine), configuring a low baudrate (9600) and hardware
flow enabled, and sending a file of 40K, for example. The last ~200 bytes or so are
typically not sent over the line.
Best regards,
--
Hector Palacios
next reply other threads:[~2013-09-30 16:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-30 16:07 Hector Palacios [this message]
2013-09-30 16:20 ` mxs auart timeout waiting for transmission with hw flow control Uwe Kleine-König
2013-09-30 16:41 ` Hector Palacios
2013-10-01 15:37 ` Hector Palacios
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=5249A1B7.4000404@digi.com \
--to=hector.palacios@digi.com \
--cc=b32955@freescale.com \
--cc=linux-serial@vger.kernel.org \
--cc=shawn.guo@linaro.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.