[lkml]   [2008]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: question wrt /drivers/char/tty_io.c in pre 2.6.16 code
Thanks Greg/Alan,
As for maintaining 2 and a half year old distros that's my job.
I think I figured out a way of doing the flow control.
I need to wrap the line discipline function pointer
disc->ops->receive_buf(tty, char_buf,flag_buf, count);
in /drivers/char/tty_io.c for my hso driver anyway
I can put in a counter in this wrapper decrementing
the buffers full & increment the counter each time
I call tty_flip_buffer_push(tty); which I will only
do if there are less than 2 buffers busy.

If this idea is plain wrong let me know.

Alan Cox wrote:
>> The new tty_insert_flip_string returns the
>> number of bytes successfully copied to tty recieve buffers
>> how do I implement this functionality in pre 2.6.16 code,
>> can it be done?
> Probably but it'll be really ugly. You need to stick your nose into the
> innards of struct tty_struct and check the space left in the current flip
> buffer entry.
> What you do if it is full is another question.
> Alan.

best regards,
D.J. Barrow

 \ /
  Last update: 2008-08-28 09:51    [W:0.053 / U:2.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site