diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-05 19:43:23 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-05 19:43:23 -0800 |
commit | 28e1445c650035668514df6f446c81f89990ac52 (patch) | |
tree | c2e15675eb23c5ac3ca6841b1851abb95929f351 /drivers/tty | |
parent | c015b4ad2ae57e5f07a5d4f746835356056c8e03 (diff) | |
parent | 494c1eac7e73f719af9d474a96ec8494c33efd6a (diff) | |
download | talos-op-linux-28e1445c650035668514df6f446c81f89990ac52.tar.gz talos-op-linux-28e1445c650035668514df6f446c81f89990ac52.zip |
Merge branch 'tty-linus' into 'tty-testing'
We need the fixes in drivers/tty/tty_io.c that were done in there for
future patches in this branch.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/serial_core.c | 2 | ||||
-rw-r--r-- | drivers/tty/tty_io.c | 15 |
2 files changed, 13 insertions, 4 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index 3e36ecf98624..1a2d90fe86da 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -363,7 +363,7 @@ uart_get_baud_rate(struct uart_port *port, struct ktermios *termios, * The spd_hi, spd_vhi, spd_shi, spd_warp kludge... * Die! Die! Die! */ - if (baud == 38400) + if (try == 0 && baud == 38400) baud = altbaud; /* diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index aa83cd1bf071..4bd48f79b94b 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -1763,6 +1763,8 @@ int tty_release(struct inode *inode, struct file *filp) int do_sleep, final; int idx; char buf[64]; + long timeout = 0; + int once = 1; if (tty_paranoia_check(tty, inode, __func__)) return 0; @@ -1832,9 +1834,16 @@ int tty_release(struct inode *inode, struct file *filp) if (!do_sleep) break; - printk(KERN_WARNING "%s: %s: read/write wait queue active!\n", - __func__, tty_name(tty, buf)); - schedule(); + if (once) { + once = 0; + printk(KERN_WARNING "%s: %s: read/write wait queue active!\n", + __func__, tty_name(tty, buf)); + } + schedule_timeout_killable(timeout); + if (timeout < 120 * HZ) + timeout = 2 * timeout + 1; + else + timeout = MAX_SCHEDULE_TIMEOUT; } if (o_tty) { |