Commit eeec32a7 authored by Alan Cox's avatar Alan Cox Committed by Greg Kroah-Hartman

nozomi: quick fix for the close/close bug

Nozomi goes wrong if you get the sequence

	open
	open
	close

	[stuff]
	close

which turns out to occur on some ppp type setups.

This is a quick patch up for the problem. It's not really fixing Nozomi
which completely fails to implement tty open/close semantics and all the
other needed stuff. Doing it right is a rather more invasive patch set and
not one that will backport.
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3f001711
...@@ -1651,10 +1651,10 @@ static void ntty_close(struct tty_struct *tty, struct file *file) ...@@ -1651,10 +1651,10 @@ static void ntty_close(struct tty_struct *tty, struct file *file)
dc->open_ttys--; dc->open_ttys--;
port->count--; port->count--;
tty_port_tty_set(port, NULL);
if (port->count == 0) { if (port->count == 0) {
DBG1("close: %d", nport->token_dl); DBG1("close: %d", nport->token_dl);
tty_port_tty_set(port, NULL);
spin_lock_irqsave(&dc->spin_mutex, flags); spin_lock_irqsave(&dc->spin_mutex, flags);
dc->last_ier &= ~(nport->token_dl); dc->last_ier &= ~(nport->token_dl);
writew(dc->last_ier, dc->reg_ier); writew(dc->last_ier, dc->reg_ier);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment