mpc52xx_uart.c : Possible bug with TTY_OVERRUN and clear error condition?

Carlos Crisóstomo carlos.crisostomo at sacnet.es
Wed Sep 18 23:08:17 EST 2013


First of all, sorry for my english (I'm spanish).

At our company, we work in various projects in control systems and 
automation in industrial environment, mostly with embedded custom linux 
distributions with Freescale PowerPC processors (MPC5200b, MPC5125, 
P1022, MPC8536E...).

In one of our systems, we have a MPC5125 connected with an ARM Cortex 
processor by serial port (ttyPSCX) using the standard mpc52xx_uart.c 
driver. Suddently we have encountered a situation in serial 
communicationes where
all the incoming serial traffic has a '\0' in the end of each serial 
transmission.

Looking at the driver in our custom 2.6.33.7 kernel, the insertion of 
the '\0' is in line 1308, on the Overrun condition(TTY_OVERRUN), but 
looking at the code, this flag is never cleared (as they arein the line 
1297 in "clear error condition")until there is some
other error condition like TTY_BREAK, TTY_PARITY, TTY_FRAME.

We have resolved thisissue adding a clear error condition after the 
overrun increment in port->icount.overrun++; but perhaps this is not the 
best solution(dirty hack).

It has been discuted in 
http://linuxppc.10917.n7.nabble.com/mpc52xx-uart-c-Port-Overruns-td53175.html 
for kernel 2.6.24too.

Maybe we can send you a patch for the next commit, or can anyone 
evaluate it for the next release? As we can see, this is happening in 
the latest release of the Linus kernel treetoo (3.11).

Thank you.

Regards,
--
Carlos Crisóstomo Vals
Operating System Design Director
Product Development

Arteche Smart-Grid
Sistemas Avanzados de Control S.A.
Colquide 6, Portal 2,
28230 Las Rozas - Madrid - Spain
carlos_DOT_crisostomo_AT_sacnet_DOT_es

www.sacnet.es
www.arteche.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20130918/50413827/attachment-0001.html>


More information about the Linuxppc-dev mailing list