diff options
author | David S. Miller <davem@davemloft.net> | 2014-11-14 01:01:12 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-14 01:01:12 -0500 |
commit | 076ce4482569ea1a2c27b4ca71a309adaf91d398 (patch) | |
tree | 2ae9e42612f35be897f190983fc292d7af781cd2 /drivers/tty/n_tty.c | |
parent | d649a7a81f3b5bacb1d60abd7529894d8234a666 (diff) | |
parent | b23dc5a7cc6ebc9a0d57351da7a0e8454c9ffea3 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/ethernet/chelsio/cxgb4vf/sge.c
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
sge.c was overlapping two changes, one to use the new
__dev_alloc_page() in net-next, and one to use s->fl_pg_order in net.
ixgbe_phy.c was a set of overlapping whitespace changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/tty/n_tty.c')
-rw-r--r-- | drivers/tty/n_tty.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index 89c4cee253e3..2e900a98c3e3 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c | |||
@@ -2413,12 +2413,17 @@ static unsigned int n_tty_poll(struct tty_struct *tty, struct file *file, | |||
2413 | 2413 | ||
2414 | poll_wait(file, &tty->read_wait, wait); | 2414 | poll_wait(file, &tty->read_wait, wait); |
2415 | poll_wait(file, &tty->write_wait, wait); | 2415 | poll_wait(file, &tty->write_wait, wait); |
2416 | if (test_bit(TTY_OTHER_CLOSED, &tty->flags)) | ||
2417 | mask |= POLLHUP; | ||
2416 | if (input_available_p(tty, 1)) | 2418 | if (input_available_p(tty, 1)) |
2417 | mask |= POLLIN | POLLRDNORM; | 2419 | mask |= POLLIN | POLLRDNORM; |
2420 | else if (mask & POLLHUP) { | ||
2421 | tty_flush_to_ldisc(tty); | ||
2422 | if (input_available_p(tty, 1)) | ||
2423 | mask |= POLLIN | POLLRDNORM; | ||
2424 | } | ||
2418 | if (tty->packet && tty->link->ctrl_status) | 2425 | if (tty->packet && tty->link->ctrl_status) |
2419 | mask |= POLLPRI | POLLIN | POLLRDNORM; | 2426 | mask |= POLLPRI | POLLIN | POLLRDNORM; |
2420 | if (test_bit(TTY_OTHER_CLOSED, &tty->flags)) | ||
2421 | mask |= POLLHUP; | ||
2422 | if (tty_hung_up_p(file)) | 2427 | if (tty_hung_up_p(file)) |
2423 | mask |= POLLHUP; | 2428 | mask |= POLLHUP; |
2424 | if (!(mask & (POLLHUP | POLLIN | POLLRDNORM))) { | 2429 | if (!(mask & (POLLHUP | POLLIN | POLLRDNORM))) { |