[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091006141115.12ad22dd@lxorguk.ukuu.org.uk>
Date: Tue, 6 Oct 2009 14:11:15 +0100
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: felipe.balbi@...ia.com
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"dbrownell@...rs.sourceforge.net" <dbrownell@...rs.sourceforge.net>
Subject: Re: TTY loosing bytes ?
> With the patch above I still get this messages but it still goes through
> since not receive_buf is returning the amount of bytes actually
> received. Then flush_to_ldisc() will retry those bytes on the next
> iteration. Maybe this is not the desired patch though ?
>
> Thanks a lot for the comments Alan.
First guess try the following
n_tty: For some I/O patterns n_tty will lose bytes
From: Alan Cox <alan@...ux.intel.com>
Fix the obvious disagreement between the receive path and the receive room
logic.
Signed-off-by: Alan Cox <alan@...ux.intel.com>
---
drivers/char/n_tty.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c
index 2e50f4d..27b28ca 100644
--- a/drivers/char/n_tty.c
+++ b/drivers/char/n_tty.c
@@ -95,6 +95,9 @@ static void n_tty_set_room(struct tty_struct *tty)
/* tty->read_cnt is not read locked ? */
int left = N_TTY_BUF_SIZE - tty->read_cnt - 1;
+ if (tty->real_raw)
+ left = min(left, N_TTY_BUF_SIZE - tty->read_head - 1);
+
/*
* If we are doing input canonicalization, and there are no
* pending newlines, let characters through without limit, so
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists