From: Denis Joseph Barrow <D.Barow@option.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: greg@kroah.com,
Linux USB kernel mailing list <linux-usb@vger.kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: question wrt /drivers/char/tty_io.c in pre 2.6.16 code
Date: Wed, 27 Aug 2008 17:55:31 +0200 [thread overview]
Message-ID: <48B578F3.1050908@option.com> (raw)
In-Reply-To: <48B52064.9070700@pobox.com>
Hi all,
In kernels prior to 2.6.16 it appears to me have
no mechanism for finding out if the tty recieve buffers
are full. This is important for me in implementing
flow control in the hso serial driver I'm developing
I don't want to lose characters.
The snippet from allesandro rubini's book
doesn't will just blindly flip buffers
& overrun if data is pushed in too quickly
into the tty layer.
for (i = 0; i < data_size; ++i) {
if (tty->flip.count >= TTY_FLIPBUF_SIZE)
tty_flip_buffer_push(tty);
tty_insert_flip_char(tty, data[i], TTY_NORMAL);
}
tty_flip_buffer_push(tty);
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?
Thank you,
D.J. Barrow
next prev parent reply other threads:[~2008-08-27 15:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080820010353.593820280@mini.kroah.org>
[not found] ` <20080820010738.GA3365-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2008-08-20 1:07 ` [patch 01/02] hso: icon 322 detection fix greg-U8xfFu+wG4EAvxtiuMwx3w
[not found] ` <20080820010752.GB3365-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2008-08-27 9:37 ` Jeff Garzik
[not found] ` <48B52064.9070700-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
2008-08-27 10:54 ` hso driver dropping characters on serial port & hacky fix Denis Joseph Barrow
2008-08-27 15:55 ` Denis Joseph Barrow [this message]
[not found] ` <48B578F3.1050908-x9gZzRpC1QbQT0dZR+AlfA@public.gmane.org>
2008-08-27 16:19 ` question wrt /drivers/char/tty_io.c in pre 2.6.16 code Greg KH
2008-08-27 16:37 ` Alan Cox
2008-08-28 7:47 ` Denis Joseph Barrow
2008-08-20 1:07 ` [patch 02/02] hso: dev_kfree_skb crash fix 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=48B578F3.1050908@option.com \
--to=d.barow@option.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).