diff options
author | Ladislav Michl <ladis@linux-mips.org> | 2016-11-18 19:11:26 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-21 11:36:16 +0100 |
commit | 1aba579f3cf51fd0fe0b4d46cc13823fd1200acb (patch) | |
tree | 1a522a1fc4aa36b8ed75eecfb5e05f8fa67afead /drivers/usb/class/cdc-acm.h | |
parent | cdc-acm: remove is_int_ep from acm structure (diff) | |
download | linux-1aba579f3cf51fd0fe0b4d46cc13823fd1200acb.tar.xz linux-1aba579f3cf51fd0fe0b4d46cc13823fd1200acb.zip |
cdc-acm: handle read pipe errors
Read urbs are submitted back only on success, causing read pipe
running out of urbs after few errors. No more characters can
be read from tty device then until it is reopened and no errors
are reported.
Fix that by always submitting urbs back and clearing stall on
-EPIPE.
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/class/cdc-acm.h')
-rw-r--r-- | drivers/usb/class/cdc-acm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h index eca5a5f80a54..c980f11cdf56 100644 --- a/drivers/usb/class/cdc-acm.h +++ b/drivers/usb/class/cdc-acm.h @@ -103,6 +103,9 @@ struct acm { spinlock_t write_lock; struct mutex mutex; bool disconnected; + unsigned long flags; +# define EVENT_TTY_WAKEUP 0 +# define EVENT_RX_STALL 1 struct usb_cdc_line_coding line; /* bits, stop, parity */ struct work_struct work; /* work queue entry for line discipline waking up */ unsigned int ctrlin; /* input control lines (DCD, DSR, RI, break, overruns) */ |