Commit f4bbae27 authored by Johan Hovold's avatar Johan Hovold

USB: serial: cp210x: disable break signalling on CP2105 SCI

Only the first UART interface (ECI) on CP2105 supports break signalling.

Return an error on requests for break state changes for the second
interface (SCI) to avoid transmitting a garbage character and waiting
when break is not supported.
Tested-by: default avatarCorey Minyard <cminyard@mvista.com>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent 6ff58ae1
......@@ -1437,8 +1437,14 @@ static int cp210x_tiocmget(struct tty_struct *tty)
static int cp210x_break_ctl(struct tty_struct *tty, int break_state)
{
struct usb_serial_port *port = tty->driver_data;
struct cp210x_serial_private *priv = usb_get_serial_data(port->serial);
u16 state;
if (priv->partnum == CP210X_PARTNUM_CP2105) {
if (cp210x_interface_num(port->serial) == 1)
return -ENOTTY;
}
if (break_state == 0)
state = BREAK_OFF;
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment