From: Denis Joseph Barrow <D.Barow@option.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jeff Garzik <jgarzik@pobox.com>,
greg@kroah.com,
Linux USB kernel mailing list <linux-usb@vger.kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: question wrt /drivers/char/tty_io.c in pre 2.6.16 code
Date: Thu, 28 Aug 2008 09:47:18 +0200 [thread overview]
Message-ID: <48B65806.5020909@option.com> (raw)
In-Reply-To: <20080827173746.11b91c07@lxorguk.ukuu.org.uk>
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
next prev parent reply other threads:[~2008-08-28 7:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080820010353.593820280@mini.kroah.org>
2008-08-20 1:07 ` [patch 00/02] 2 more hso.c patches greg
2008-08-20 1:07 ` greg-U8xfFu+wG4EAvxtiuMwx3w
2008-08-20 1:07 ` [patch 01/02] hso: icon 322 detection fix greg
2008-08-20 1:07 ` greg-U8xfFu+wG4EAvxtiuMwx3w
2008-08-27 9:37 ` Jeff Garzik
2008-08-27 9:37 ` Jeff Garzik
2008-08-27 10:54 ` hso driver dropping characters on serial port & hacky fix Denis Joseph Barrow
2008-08-27 10:54 ` Denis Joseph Barrow
2008-08-27 15:55 ` question wrt /drivers/char/tty_io.c in pre 2.6.16 code Denis Joseph Barrow
2008-08-27 16:19 ` Greg KH
2008-08-27 16:19 ` Greg KH
2008-08-27 16:37 ` Alan Cox
2008-08-27 16:37 ` Alan Cox
2008-08-28 7:47 ` Denis Joseph Barrow [this message]
2008-08-20 1:07 ` [patch 02/02] hso: dev_kfree_skb crash fix greg
2008-08-20 1:07 ` greg-U8xfFu+wG4EAvxtiuMwx3w
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=48B65806.5020909@option.com \
--to=d.barow@option.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=greg@kroah.com \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.