mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
[PATCH] remove TTY_DONT_FLIP
Remove TTY_DONT_FLIP tty flag. This flag was introduced in 2.1.X kernels to prevent the N_TTY line discipline functions read_chan() and n_tty_receive_buf() from running at the same time. 2.2.15 introduced tty->read_lock to protect access to the N_TTY read buffer, which is the only state requiring protection between these two functions. The current TTY_DONT_FLIP implementation is broken for SMP, and is not universally honored by drivers that send data directly to the line discipline receive_buf function. Because TTY_DONT_FLIP is not necessary, is broken in implementation, and is not universally honored, it is removed. Signed-off-by: Paul Fulghum <[email protected]> Cc: Alan Cox <[email protected]> Cc: Theodore Ts'o <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
e0ac4761fa
commit
817d6d3bce
9 changed files with 7 additions and 42 deletions
|
|
@ -2573,12 +2573,6 @@ static void flush_to_flip_buffer(struct e100_serial *info)
|
|||
|
||||
DFLIP(
|
||||
if (1) {
|
||||
|
||||
if (test_bit(TTY_DONT_FLIP, &tty->flags)) {
|
||||
DEBUG_LOG(info->line, "*** TTY_DONT_FLIP set flip.count %i ***\n", tty->flip.count);
|
||||
DEBUG_LOG(info->line, "*** recv_cnt %i\n", info->recv_cnt);
|
||||
} else {
|
||||
}
|
||||
DEBUG_LOG(info->line, "*** rxtot %i\n", info->icount.rx);
|
||||
DEBUG_LOG(info->line, "ldisc %lu\n", tty->ldisc.chars_in_buffer(tty));
|
||||
DEBUG_LOG(info->line, "room %lu\n", tty->ldisc.receive_room(tty));
|
||||
|
|
|
|||
|
|
@ -588,13 +588,6 @@ void jsm_input(struct jsm_channel *ch)
|
|||
len = min(len, (N_TTY_BUF_SIZE - 1) - tp->read_cnt);
|
||||
ld = tty_ldisc_ref(tp);
|
||||
|
||||
/*
|
||||
* If the DONT_FLIP flag is on, don't flush our buffer, and act
|
||||
* like the ld doesn't have any space to put the data right now.
|
||||
*/
|
||||
if (test_bit(TTY_DONT_FLIP, &tp->flags))
|
||||
len = 0;
|
||||
|
||||
/*
|
||||
* If we were unable to get a reference to the ld,
|
||||
* don't flush our buffer, and act like the ld doesn't
|
||||
|
|
|
|||
Loading…
Reference in a new issue