<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <font size="-1"><font size="-1"><font size="-1">First of all, sorry
          for my english (I'm spanish)<font size="-1">.</font></font><font
          size="-1"><br>
          <br>
          At our company<font size="-1">, <font size="-1">w</font></font>e
          work <font size="-1">in var<font size="-1">ious projects <font
                size="-1">in control systems and automation in <font
                  size="-1">industrial environment, <font size="-1">mostly
                    with <font size="-1">embedded custom linux
                      distributions</font></font> with Freescale PowerPC
                  processo<font size="-1">rs</font></font></font></font></font>
          (MPC5200b, MPC5125, <font size="-1">P1022, MPC8536E<font
              size="-1">...)</font></font></font>.<br>
        <br>
        <font size="-1">In o<font size="-1">ne o<font size="-1">f our
              systems<font size="-1">, we have a MPC5125 connecte<font
                  size="-1">d with an ARM <font size="-1">Cortex
                    processo<font size="-1">r by serial port (ttyPSC<font
                        size="-1">X) using the standard mpc52xx_uart.c
                        driver. <font size="-1">Sudd<font size="-1">en<font
                              size="-1">tly <font size="-1">we have
                                encountered a situation in <font
                                  size="-1">serial communi<font
                                    size="-1">cationes whe<font
                                      size="-1">re<br>
                                      <font size="-1">all the incoming
                                        serial traffic has a '\0' <font
                                          size="-1">in the end of <font
                                            size="-1">each</font> serial
                                          transmission.<br>
                                          <br>
                                          <font size="-1">Looking at the
                                            <font size="-1">driver in <font
                                                size="-1">our custom
                                                2.6.33.7 kernel</font>,
                                              the insertion o<font
                                                size="-1">f the '\<font
                                                  size="-1">0' <font
                                                    size="-1">is in line
                                                    1308, <font
                                                      size="-1">on the
                                                      Overrun condition<font
                                                        size="-1">
                                                        (TTY_OVERRUN),
                                                        but looking at
                                                        the code, this
                                                        flag is never
                                                        cleared (as they
                                                        are<font
                                                          size="-1"> <font
                                                          size="-1">in
                                                          the line 1297</font>
                                                          in "clear
                                                          error
                                                          condition")<font
                                                          size="-1">
                                                          until the<font
                                                          size="-1">re
                                                          is some<br>
                                                          <font
                                                          size="-1">other

                                                          error
                                                          condition like
                                                          TTY_BREAK<font
                                                          size="-1">, <font
                                                          size="-1">TTY_PAR<font
                                                          size="-1">ITY,
                                                          TTY_FRAME<font
                                                          size="-1">.<br>
                                                          <br>
                                                          <font
                                                          size="-1">We
                                                          have resolved
                                                          this<font
                                                          size="-1">
                                                          issue adding a
                                                          clear error
                                                          condition
                                                          after the
                                                          overrun <font
                                                          size="-1">increment

                                                          in
                                                          port->ico<font
                                                          size="-1">unt.ov<font
                                                          size="-1">errun++;

                                                          but p<font
                                                          size="-1">erha<font
                                                          size="-1">ps
                                                          this <font
                                                          size="-1">is
                                                          not the <font
                                                          size="-1">best
                                                          solution<font
                                                          size="-1"><font
                                                          size="-1"> (<font
                                                          size="-1">dirty
                                                          hack).</font></font><font
                                                          size="-1"><font
                                                          size="-1"></font></font><br>
                                                          <br>
                                                          It has <font
                                                          size="-1">been
                                                          discuted in <a
class="moz-txt-link-freetext"
href="http://linuxppc.10917.n7.nabble.com/mpc52xx-uart-c-Port-Overruns-td53175.html">http://linuxppc.10917.n7.nabble.com/mpc52xx-uart-c-Port-Overruns-td53175.html</a>
                                                          for kernel
                                                          2.6.24<font
                                                          size="-1">
                                                          too.</font></font><br>
                                                          <br>
                                                          </font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font>Maybe

        <font size="-1">we can send you a patch for the next commit<font
            size="-1">, o<font size="-1">r can <font size="-1">anyone</font>
              <font size="-1">evaluate it for the <font size="-1">next
                  release? As we can see, this is happe<font size="-1">ning
                    <font size="-1">in <font size="-1">the latest <font
                          size="-1">release of the Linus kernel tree<font
                            size="-1"> too (3.11).</font><br>
                          <br>
                        </font></font></font></font></font></font></font></font></font>Thank

        you<font size="-1"><font size="-1"><font size="-1">.<br>
              <br>
              <font size="-1">Regards,<br>
              </font> </font></font></font></font></font>
    <div class="moz-signature">--<br>
      <font size="2"><font face="Verdana">Carlos Cri<font size="2">sóstomo
            Vals<br>
            <font size="2">Opera<font size="2">ting System <font
                  size="2">Design Director<br>
                  <font size="2">Product Development<br>
                    <br>
                    <font size="2">Arteche Smart-<font size="2">Grid<br>
                        <font size="2">Sistemas Avanzados de Control
                          S.A.<br>
                          <font size="2">Colquide 6, Portal 2,<br>
                            <font size="2">282<font size="2">30 Las
                                Rozas - Madrid - Spain<br>
                                carlos<font size="2">_DOT_</font>crisostomo<font
                                  size="2"><font size="2">_</font>AT<font
                                    size="2">_</font></font>sacne<font
                                  size="2">t<font size="2">_DOT_</font>es</font><br>
                                <br>
                                <font size="2"><a class="moz-txt-link-abbreviated" href="http://www.sacnet.es">www.sacnet.es</a><br>
                                  <font size="2">www.<font size="2">arteche.com</font></font><br>
                                </font></font></font></font></font></font></font></font></font></font></font></font></font></font><font
        size="2"><font face="Verdana"></font></font></div>
  </body>
</html>