From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: felipe.balbi@nokia.com
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"dbrownell@users.sourceforge.net"
<dbrownell@users.sourceforge.net>
Subject: Re: TTY loosing bytes ?
Date: Tue, 6 Oct 2009 13:12:30 +0100 [thread overview]
Message-ID: <20091006131230.5301f711@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <20091006114528.GV4452@nokia.com>
> why doesn't receive_buf() return the amount of bytes actually received ?
You'd have to ask whoever wrote the code in 199something.
> I see flush_to_ldisc() believes it can flush everything before even
> calling receive_buf() then it will never act on the possibility of
> receive_buf() not being able to receive the entire data.
The ldisc is responsible for maintaining tty->receive_room correctly at
all times.
> Am I right ? Should receive_buf() return the amount of bytes actually
> received ? Also, why isn't receive_room enough to be sure there's
> enough space to really receive that block of data ?
I've not seen this reported elsewhere so I assume you are somehow
tripping a bug in the n_tty ldisc code. The other possibility is that you
are in canonical mode and some of your input is intentionally discarded
by the ldisc either as errors, overruns or through things like quoting or
flow control.
next prev parent reply other threads:[~2009-10-06 12:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-06 9:48 Felipe Balbi
2009-10-06 11:45 ` Felipe Balbi
2009-10-06 12:12 ` Alan Cox [this message]
2009-10-06 13:01 ` Felipe Balbi
2009-10-06 13:11 ` Alan Cox
2009-10-06 13:27 ` Felipe Balbi
2009-10-06 13:40 ` Alan Cox
2009-10-06 13:42 ` Felipe Balbi
2009-10-06 13:55 ` Felipe Balbi
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=20091006131230.5301f711@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=dbrownell@users.sourceforge.net \
--cc=felipe.balbi@nokia.com \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®