lkml.org 
[lkml]   [2009]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectTTY loosing bytes ?
Hi all,

I'm facing a weird issue with TTY when using u_serial gadget.

The problem seems to be related to ldisc's buffer getting full. Imagine
a situation where you have 510 bytes available on N_TTY's buffer and you
try to flush 512 bytes then the code path would look like:

--> flush_to_ldisc();
--> n_tty_receive_buf(512 bytes);
--> i = 510;
--> memcpy(i);

--> i = 0;
--> memcpy(i);
<-- wake_up_interruptible();

What happens is that we loose those 2 extra bytes. I tried digging this
problem and try to find a fix for it but it's been really complicated
for me.

Hope you guys can help. Actually, I've been reproducing the problem on
2.6.28 but looking at the code current mainline should have the same
problem. I also cherry-picked the relevant patches to my 2.6.28 tree
(hope I got all of them) and it still failed.

Sorry I'm reporting such a problem with such an old kernel but upgrading
the kernel right now is just impossible.

If you guys could give any pointers I would be really glad.

--
balbi


\
 
 \ /
  Last update: 2009-10-06 12:01    [W:0.099 / U:0.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site