Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299140
b: refs/heads/master
c: fca5430
h: refs/heads/master
v: v3
  • Loading branch information
Simon Arlott authored and Greg Kroah-Hartman committed Apr 9, 2012
1 parent bf77007 commit 5a1c3b5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cd4376e23a59a2adf3084cb5f4a523e6d5fd4e49
refs/heads/master: fca5430d48d53eaf103498c33fd0d1984b9f448b
24 changes: 13 additions & 11 deletions trunk/drivers/usb/serial/ftdi_sio.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ struct ftdi_private {
unsigned long last_dtr_rts; /* saved modem control outputs */
struct async_icount icount;
wait_queue_head_t delta_msr_wait; /* Used for TIOCMIWAIT */
char prev_status, diff_status; /* Used for TIOCMIWAIT */
char prev_status; /* Used for TIOCMIWAIT */
char transmit_empty; /* If transmitter is empty or not */
struct usb_serial_port *port;
__u16 interface; /* FT2232C, FT2232H or FT4232H port interface
Expand Down Expand Up @@ -1982,17 +1982,19 @@ 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);
char diff_status = status ^ priv->prev_status;

if (diff_status & FTDI_RS0_CTS)
priv->icount.cts++;
if (diff_status & FTDI_RS0_DSR)
priv->icount.dsr++;
if (diff_status & FTDI_RS0_RI)
priv->icount.rng++;
if (diff_status & FTDI_RS0_RLSD)
priv->icount.dcd++;

wake_up_interruptible_all(&priv->delta_msr_wait);
priv->prev_status = status;
}

Expand Down

0 comments on commit 5a1c3b5

Please sign in to comment.