]> git.baikalelectronics.ru Git - kernel.git/commit
tty: N_TTY SIGIO only works for read
authorThomas Pfaff <tpfaff@pcs.com>
Fri, 2 Jan 2009 13:47:13 +0000 (13:47 +0000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 2 Jan 2009 18:19:40 +0000 (10:19 -0800)
commit39ba44808a942c8e31f9e83fca3ede7540fd68c4
tree258cbb425a03d5f444014d32c59a22f13d4ed492
parent4c64c2b7156ee6f2b899025e979151616f9c9de6
tty: N_TTY SIGIO only works for read

The N_TTY ldisc layer does not send SIGIO POLL_OUTs correctly when output is
possible due to flawed handling of the TTY_DO_WRITE_WAKEUP bit. It will
either send no SIGIOs at all or on every tty wakeup.

The fix is to set the bit when the tty driver write would block and test
and clear it on write wakeup.

[Merged with existing N_TTY patches and a small buglet fixed -- Alan]

Signed-off-by: Thomas Pfaff <tpfaff@pcs.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/n_tty.c