Skip to content

Commit f4bbae2

Browse files
committed
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: Corey Minyard <cminyard@mvista.com> Signed-off-by: Johan Hovold <johan@kernel.org>
1 parent 6ff58ae commit f4bbae2

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

drivers/usb/serial/cp210x.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,8 +1437,14 @@ static int cp210x_tiocmget(struct tty_struct *tty)
14371437
static int cp210x_break_ctl(struct tty_struct *tty, int break_state)
14381438
{
14391439
struct usb_serial_port *port = tty->driver_data;
1440+
struct cp210x_serial_private *priv = usb_get_serial_data(port->serial);
14401441
u16 state;
14411442

1443+
if (priv->partnum == CP210X_PARTNUM_CP2105) {
1444+
if (cp210x_interface_num(port->serial) == 1)
1445+
return -ENOTTY;
1446+
}
1447+
14421448
if (break_state == 0)
14431449
state = BREAK_OFF;
14441450
else

0 commit comments

Comments
 (0)