[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfFQt3ST7DrWSuR2YmfU0xdd1p2TS7RyUD0hN1_dJ-tYA@mail.gmail.com>
Date: Fri, 5 Feb 2016 00:27:19 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Peter Hurley <peter@...leysoftware.com>
Cc: Russell King <linux@....linux.org.uk>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>
Subject: Re: Data corruption on serial interface under load
On Fri, Feb 5, 2016 at 12:24 AM, Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
> On Thu, Feb 4, 2016 at 10:06 PM, Peter Hurley <peter@...leysoftware.com> wrote:
>>> Original sample:
>>> 00000000: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 .ELF............
>>> 00000010: 02 00 03 00 01 00 00 00 19 8d 04 08 34 00 00 00 ............4...
>>> 00000020: 2c f2 00 00 00 00 00 00 34 00 20 00 04 00 28 00 ,.......4. ...(.
>>>
>>> Received sample:
>>> 00000000: 7f 00 45 00 4c 00 46 00 01 00 01 00 01 00 00 00 ..E.L.F.........
>>> 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
>>> 00000020: 02 00 00 00 03 00 00 00 01 00 00 00 00 19 8d 04 ................
>> 2) If you mean the NUL bytes for overruns, I could have some functional mode
>> mis-branched in the N_TTY line discipline.
>
> Yeah, this one.
>
>> What are the termios settings
>> on the rx side?
>
> I'm using this [1] tool with small patch applied that enables internal
> loopback (TCIOM_LOOP).
Here are the calls
ret = cfsetspeed(&new_term, opts.baudrate);
cfmakeraw(&new_term);
new_term.c_cflag |= CREAD;
new_term.c_cflag &= ~CRTSCTS;
new_term.c_cc[VMIN] = 64;
new_term.c_cc[VTIME] = 8;
...
ret = tcflush(fd, TCIFLUSH);
ret = fcntl(fd, F_SETFL, 0);
> [1] https://git.breakpoint.cc/cgit/bigeasy/serialcheck.git/
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists