[PPC/MPC5200B] strange data loss on uart reception

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[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: pgphDYL1UagNt.pgp
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux