Re: nozomi: ERESTARTSYS to userspace?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jiri Slaby <jirislaby@...>
Cc: Paul Hardwick <p.hardwick@...>, Linux Kernel Mailing List <linux-kernel@...>
Date: Monday, October 8, 2007 - 8:02 am

>         if (unlikely(down_trylock(&port->tty_sem))) {

serial driver write methods are called from the ldisc not the tty so the
code is in fact totally bogus.

I suspect what is needed (other than to take the entire driver to bits
and put it back together using serial_core) is 

	if (down_trylock(&port->tty_sem))
		return 0;

and the driver is then required to wake the write wait queue when that
condition becomes false - or at least before/when it runs out of
data (which currently it doesn't seem to for all cases).

Lots of other breakage in it as well (termios function is totally bogus,
tty_flip_queue_function is a no-op) etc etc

Alan
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
nozomi: ERESTARTSYS to userspace?, Jiri Slaby, (Mon Oct 8, 6:26 am)
Re: nozomi: ERESTARTSYS to userspace?, Alan Cox, (Mon Oct 8, 8:02 am)