[lkml]   [2005]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 2.6.13-mm1
On Thu, Sep 01, 2005 at 07:22:53AM -0700, Martin J. Bligh wrote:
> - if (count > (TTY_FLIPBUF_SIZE - tty->flip.count))
> - count = TTY_FLIPBUF_SIZE - tty->flip.count;
> -
> + count = tty_buffer_request_room(tty, N_INBUF);
> +

Should be "int count = " yes

> /* If flip is full, just reschedule a later read */
> if (count == 0) {
> poll_mask |= HVC_POLL_READ;
> shouldn't be deleting the declaration of count.
> and possibly the "flip removal" was incomplete (line 636) ???

Yep. You can remove the tty->flip.count test or use count, but at that
point count is guaranteed to be > 0 I believe. Fixed both in my tree will
push a new diff to Andre soon.

Also if you are tidying up all the 'read 64 chars and take a break' stuff
should just go away. The kernel will buffer large chunks of data for you
now. In the ideal case if you know the total pending space you can do

int len = tty_buffer_request_room(tty, len)

and it'll look to kmalloc a big enough buffer for you if the buffer pool
isn't suitable. Even if that fails (its a hint) the tty layer will split the
data across multiple smaller buffers for you when you use tty_insert_flip_*

So you should be able to just ram data at it as it comes off the hvc.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-09-01 16:52    [W:0.180 / U:18.396 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site