USB: ftdi_sio.c: Fill LSR fields of the ftdi async_icount structure
authorUwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Mon, 10 Oct 2011 15:24:34 +0000 (17:24 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 18 Oct 2011 20:46:30 +0000 (13:46 -0700)
Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/ftdi_sio.c

index a865df81a551ea28e2ba0542ff3186544014a621..372ae5baa632d556e0a3937ecaad441d01413360 100644 (file)
@@ -1954,6 +1954,14 @@ static int ftdi_process_packet(struct tty_struct *tty,
           N.B. packet may be processed more than once, but differences
           are only processed once.  */
        status = packet[0] & FTDI_STATUS_B0_MASK;
+       if (status & FTDI_RS0_CTS)
+               priv->icount.cts++;
+       if (status & FTDI_RS0_DSR)
+               priv->icount.dsr++;
+       if (status & FTDI_RS0_RI)
+               priv->icount.rng++;
+       if (status & FTDI_RS0_RLSD)
+               priv->icount.dcd++;
        if (status != priv->prev_status) {
                priv->diff_status |= status ^ priv->prev_status;
                wake_up_interruptible(&priv->delta_msr_wait);