From: "Albrecht Dreß" <albrecht.dress@arcor.de>
To: linuxppc-dev@lists.ozlabs.org
Subject: [MPC5200B] strange data loss on uart reception
Date: Fri, 29 Oct 2010 10:54:24 +0200 (CEST) [thread overview]
Message-ID: <1490489378.1288342464651.JavaMail.ngmail@webmail18.arcor-online.net> (raw)
Hi all,
I'm not sure if this is the right list, so please excuse me if I'm totally
wrong here, or if my question is really dumb...
My platform is a MPC5200B (roughly Icecube) based board with kernel 2.6.32.
>From a PC I try to send data through the MPC5200B's serial port, using the
standard mpc52xx_uart driver. The reading process is rather slow in
processing the incoming data. Thus, the uart is configured to use rts/cts
handshaking. The port is opened in (O_EXCL | O_RDWR) mode.
Sending large data blocks to the 5200, I noticed that complete chunks of
data are missing in the output read in user space. This is apparently *not*
a problem on the uart layer; the result of the TIOCGICOUNT ioctl does not
report any errors from the uart, and the serial_icounter_struct.rx field
contains *exactly* the correct number of data bytes I transmitted. The
data loss seems to occur only if the block is larger than 64 kByte, but I
didn't find a scheme of the actually missing number of bytes. However, it's
always a larger chunk of several hundred bytes to kBytes.
Am I simply too dumb to use the uart correctly, or is there some issue in
the kernel causing this effect? I noticed that the function
mpc52xx_uart_int_rx_chars() does not check the return value of
tty_insert_flip_char(). If the system runs out of space (actually, the
maximum buffer size used should be limited, in particular on embedded
systems!), might this be undetected? This might explain the bigger
"chunks", as the '5200's uart has a rather big fifo.
Any insight would be really appreciated!
Thanks in advance,
Albrecht.
reply other threads:[~2010-10-29 8:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1490489378.1288342464651.JavaMail.ngmail@webmail18.arcor-online.net \
--to=albrecht.dress@arcor.de \
--cc=linuxppc-dev@lists.ozlabs.org \
/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