diff options
| author | Johan Hovold <johan@kernel.org> | 2023-06-04 14:35:03 +0200 |
|---|---|---|
| committer | Johan Hovold <johan@kernel.org> | 2023-06-07 17:00:23 +0200 |
| commit | 6ff58ae17fd9523246a260434133ed9ab7f56df2 (patch) | |
| tree | 286bf3fdeec1bef50a64f4597deef90c55f1c82f /drivers/usb/serial/io_ti.c | |
| parent | Linux 6.4-rc5 (diff) | |
| download | linux-6ff58ae17fd9523246a260434133ed9ab7f56df2.tar.gz linux-6ff58ae17fd9523246a260434133ed9ab7f56df2.zip | |
USB: serial: return errors from break handling
Start propagating errors to user space when setting the break state
fails.
This will be used by follow-on changes to also report when a driver or
device does not support break control.
Tested-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/io_ti.c')
| -rw-r--r-- | drivers/usb/serial/io_ti.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c index bc3c24ea42c1..7a3a6e539456 100644 --- a/drivers/usb/serial/io_ti.c +++ b/drivers/usb/serial/io_ti.c @@ -2421,7 +2421,7 @@ static int edge_tiocmget(struct tty_struct *tty) return result; } -static void edge_break(struct tty_struct *tty, int break_state) +static int edge_break(struct tty_struct *tty, int break_state) { struct usb_serial_port *port = tty->driver_data; struct edgeport_port *edge_port = usb_get_serial_port_data(port); @@ -2430,10 +2430,15 @@ static void edge_break(struct tty_struct *tty, int break_state) if (break_state == -1) bv = 1; /* On */ + status = ti_do_config(edge_port, UMPC_SET_CLR_BREAK, bv); - if (status) + if (status) { dev_dbg(&port->dev, "%s - error %d sending break set/clear command.\n", __func__, status); + return status; + } + + return 0; } static void edge_heartbeat_schedule(struct edgeport_serial *edge_serial) |
