linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PPC/MPC5200B] strange data loss on uart reception
@ 2010-10-31 17:27 Albrecht Dreß
  2010-11-01  3:10 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Albrecht Dreß @ 2010-10-31 17:27 UTC (permalink / raw)
  To: linux-serial

[-- Attachment #1: Type: text/plain, Size: 1674 bytes --]

[re-posted from the linuxppc-dev list...]

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 go undetected?  This might explain the bigger "chunks", as the '5200's uart has a rather big fifo (512 bytes).

Any insight would be really appreciated!

Thanks in advance,
Albrecht.

[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-11-03  4:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-31 17:27 [PPC/MPC5200B] strange data loss on uart reception Albrecht Dreß
2010-11-01  3:10 ` Greg KH
2010-11-01 14:41   ` Albrecht Dreß
2010-11-02 18:06     ` Albrecht Dreß
2010-11-03  4:02       ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).