Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188785
b: refs/heads/master
c: 9c67d28
h: refs/heads/master
i:
  188783: cf633ec
v: v3
  • Loading branch information
Alessio Igor Bogani authored and Greg Kroah-Hartman committed Mar 19, 2010
1 parent 6009f4e commit d90c0bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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: 11b10d999469dc0514447a15e88c7ef14ec0761d
refs/heads/master: 9c67d28e4e7683b4f667fa4c7b6f9aee92b44b5c
6 changes: 4 additions & 2 deletions trunk/drivers/usb/serial/ftdi_sio.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ struct ftdi_private {
unsigned long tx_outstanding_bytes;
unsigned long tx_outstanding_urbs;
unsigned short max_packet_size;
struct mutex cfg_lock; /* Avoid mess by parallel calls of config ioctl() */
struct mutex cfg_lock; /* Avoid mess by parallel calls of config ioctl() and change_speed() */
};

/* struct ftdi_sio_quirk is used by devices requiring special attention. */
Expand Down Expand Up @@ -1273,8 +1273,8 @@ static int set_serial_info(struct tty_struct *tty,
(priv->flags & ASYNC_SPD_MASK)) ||
(((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST) &&
(old_priv.custom_divisor != priv->custom_divisor))) {
mutex_unlock(&priv->cfg_lock);
change_speed(tty, port);
mutex_unlock(&priv->cfg_lock);
}
else
mutex_unlock(&priv->cfg_lock);
Expand Down Expand Up @@ -2265,9 +2265,11 @@ static void ftdi_set_termios(struct tty_struct *tty,
clear_mctrl(port, TIOCM_DTR | TIOCM_RTS);
} else {
/* set the baudrate determined before */
mutex_lock(&priv->cfg_lock);
if (change_speed(tty, port))
dev_err(&port->dev, "%s urb failed to set baudrate\n",
__func__);
mutex_unlock(&priv->cfg_lock);
/* Ensure RTS and DTR are raised when baudrate changed from 0 */
if (!old_termios || (old_termios->c_cflag & CBAUD) == B0)
set_mctrl(port, TIOCM_DTR | TIOCM_RTS);
Expand Down

0 comments on commit d90c0bf

Please sign in to comment.