From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Sergei Organov <osv@javad.com>
Cc: Andrew Morton <akpm@osdl.org>,
gregkh@suse.de, linux-kernel@vger.kernel.org,
linux-usb-devel@lists.sourceforge.net
Subject: Re: [PATCH] Airprime driver improvements to allow full speed EvDO transfers
Date: Mon, 10 Jul 2006 12:10:55 +0100 [thread overview]
Message-ID: <1152529855.27368.114.camel@localhost.localdomain> (raw)
In-Reply-To: <87d5cdg308.fsf@javad.com>
Ar Llu, 2006-07-10 am 14:36 +0400, ysgrifennodd Sergei Organov:
> However, the problem is easily seen for USB-to-tty drivers where there
> are no UARTS anywhere and speeds are rather high so that more than 4096
> bytes (the line discipline buffer size) could be received before a task
> has a chance to read from the line discipline buffer, and single flip
> size is not limited by the hardware.
There are no flip buffers in 2.6.17, they've gone. The tty buffering is
now a proper queuing system.
> Moreover, looking into the source code I don't see how tty can take care
> not to over-stuff the ldisc. ldisc`s receive_buf() routine doesn't tell
> the caller how many chars it actually consumed and silently throws away
Not in the current kernel tree. The current tree does this:
spin_lock_irqsave(&tty->buf.lock, flags);
head = tty->buf.head;
if (head != NULL) {
tty->buf.head = NULL;
for (;;) {
int count = head->commit - head->read;
if (!count) {
if (head->next == NULL)
break;
tbuf = head;
head = head->next;
tty_buffer_free(tty, tbuf);
continue;
}
if (!tty->receive_room) {
schedule_delayed_work(&tty->buf.work, 1);
break;
}
if (count > tty->receive_room)
count = tty->receive_room;
char_buf = head->char_buf_ptr + head->read;
flag_buf = head->flag_buf_ptr + head->read;
head->read += count;
spin_unlock_irqrestore(&tty->buf.lock, flags);
disc->receive_buf(tty, char_buf, flag_buf, count);
spin_lock_irqsave(&tty->buf.lock, flags);
}
tty->buf.head = head;
}
spin_unlock_irqrestore(&tty->buf.lock, flags);
next prev parent reply other threads:[~2006-07-10 10:53 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-30 5:48 Andy Gay
2006-06-30 7:10 ` Andrew Morton
2006-06-30 8:52 ` Pete Zaitcev
2006-06-30 16:59 ` Andy Gay
2006-06-30 10:51 ` Sergei Organov
2006-06-30 12:13 ` [linux-usb-devel] " Alan Cox
2006-06-30 12:02 ` Arjan van de Ven
2006-06-30 13:34 ` Alan Cox
2006-06-30 16:35 ` Andy Gay
2006-07-07 17:23 ` Sergei Organov
2006-07-07 20:07 ` Alan Cox
2006-07-10 10:36 ` Sergei Organov
2006-07-10 11:10 ` Alan Cox [this message]
2006-07-10 15:54 ` Sergei Organov
2006-07-10 17:31 ` Alan Cox
2006-07-10 17:24 ` Sergei Organov
2006-07-13 14:17 ` Sergei Organov
2006-07-13 15:40 ` Alan Cox
2006-07-13 18:20 ` Sergei Organov
2006-07-13 19:08 ` Greg KH
2006-07-14 10:13 ` Sergei Organov
2006-06-30 20:04 ` Roland Dreier
2006-06-30 20:13 ` Andy Gay
2006-07-02 18:48 ` Roland Dreier
2006-07-02 20:29 ` Andy Gay
2006-07-02 20:47 ` Roland Dreier
2006-07-03 7:00 ` Jeremy Fitzhardinge
2006-07-03 14:21 ` Andy Gay
2006-07-03 16:28 ` Jeremy Fitzhardinge
2006-07-03 17:00 ` Andy Gay
2006-07-03 17:00 ` Greg KH
2006-07-03 17:55 ` Andy Gay
2006-07-03 18:08 ` Jeremy Fitzhardinge
2006-07-03 18:16 ` Greg KH
2006-07-03 22:43 ` Andy Gay
2006-07-03 15:43 ` [linux-usb-devel] " Ken Brush
2006-07-03 16:19 ` Andy Gay
2006-07-11 18:31 ` Sergei Organov
2006-07-11 18:55 ` Andy Gay
2006-07-12 9:20 ` Sergei Organov
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=1152529855.27368.114.camel@localhost.localdomain \
--to=alan@lxorguk.ukuu.org.uk \
--cc=akpm@osdl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=osv@javad.com \
/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
Powered by JetHome