]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
USB: mos7840: fix broken TIOCMIWAIT
authorJohan Hovold <jhovold@gmail.com>
Tue, 19 Mar 2013 08:21:19 +0000 (09:21 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 25 Apr 2013 19:25:28 +0000 (20:25 +0100)
commit e670c6af12517d08a403487b1122eecf506021cf 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>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/serial/mos7840.c

index 43a38aab24e549186bf1c766bd1d4164e72ccfab..30ef604766e636f8bb0ffb48e3cfee3c6745a6a5 100644 (file)
@@ -453,6 +453,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);
        }
 }
 
@@ -2073,8 +2076,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;
        dbg("mos7840_change_port_settings mos7840_port->shadowLCR is End %x",
            mos7840_port->shadowLCR);
 }