[lkml]   [2003]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectLoosing chars on serial console in 2.4
Hi List.

If I paste text into my serial console, some chars aren't echoed back. I also
loose some chars when doing reboot and init starts to print messages.

This is due to that almost no user of opost() bothers to check its return
value. The patch below fixes the problem, but it is ugly and possibly buggy.
I don't know how to fix this properly.

HW: custom 860 board at 115200 baud, using the standard arch/ppc/8xx_io/uart.c driver.


--- drivers/char/n_tty.c 1 Nov 2002 13:43:27 -0000
+++ drivers/char/n_tty.c 13 Feb 2003 13:45:33 -0000
@@ -186,8 +186,14 @@
static int opost(unsigned char c, struct tty_struct *tty)
int space, spaces;
+#if 1
+ unsigned long tmo = jiffies + HZ/10;

+ while(!(space = tty->driver.write_room(tty)) && !in_interrupt() && !time_after(jiffies, tmo))
+ cond_resched();
space = tty->driver.write_room(tty);
if (!space)
return -1;

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-03-22 13:33    [W:0.034 / U:3.800 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site