Skip to content

Commit

Permalink
USB: mos7840: fix broken TIOCMIWAIT
Browse files Browse the repository at this point in the history
commit e670c6a upstream.

Make sure waiting processes are woken on modem-status changes.

Currently processes are only woken on termios changes regardless of
whether the modem status has changed.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
jhovold authored and gregkh committed Apr 5, 2013
1 parent 957bed0 commit dfa7981
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/usb/serial/mos7840.c
Expand Up @@ -423,6 +423,9 @@ static void mos7840_handle_new_msr(struct moschip_port *port, __u8 new_msr)
icount->rng++;
smp_wmb();
}

mos7840_port->delta_msr_cond = 1;
wake_up_interruptible(&mos7840_port->delta_msr_wait);
}
}

Expand Down Expand Up @@ -2021,8 +2024,6 @@ static void mos7840_change_port_settings(struct tty_struct *tty,
mos7840_port->read_urb_busy = false;
}
}
wake_up(&mos7840_port->delta_msr_wait);
mos7840_port->delta_msr_cond = 1;
dev_dbg(&port->dev, "%s - mos7840_port->shadowLCR is End %x\n", __func__,
mos7840_port->shadowLCR);
}
Expand Down

0 comments on commit dfa7981

Please sign in to comment.