linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* mpc52xx_uart.c : Possible bug with TTY_OVERRUN and clear error condition?
@ 2013-09-18 13:08 Carlos Crisóstomo
  0 siblings, 0 replies; only message in thread
From: Carlos Crisóstomo @ 2013-09-18 13:08 UTC (permalink / raw)
  To: linuxppc-dev

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

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

[-- Attachment #2: Type: text/html, Size: 10503 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-09-18 13:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-18 13:08 mpc52xx_uart.c : Possible bug with TTY_OVERRUN and clear error condition? Carlos Crisóstomo

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).