linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Carlos Crisóstomo" <carlos.crisostomo@sacnet.es>
To: linuxppc-dev@lists.ozlabs.org
Subject: mpc52xx_uart.c : Possible bug with TTY_OVERRUN and clear error condition?
Date: Wed, 18 Sep 2013 15:08:17 +0200	[thread overview]
Message-ID: <5239A5C1.2000809@sacnet.es> (raw)

[-- 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 --]

                 reply	other threads:[~2013-09-18 13:36 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=5239A5C1.2000809@sacnet.es \
    --to=carlos.crisostomo@sacnet.es \
    --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;
as well as URLs for NNTP newsgroup(s).