]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cdc-acm: handle read pipe errors
authorLadislav Michl <ladis@linux-mips.org>
Fri, 18 Nov 2016 18:11:26 +0000 (19:11 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 23 Sep 2019 20:11:55 +0000 (21:11 +0100)
commit00452300a6ef012b1d7ce97c9c04d665237a3e0e
tree43f149098abfd53811bbcde9eb175d31763f32ee
parent41266b6b31d2fa89ad385f2bc17c9eec48defa05
cdc-acm: handle read pipe errors

commit 1aba579f3cf51fd0fe0b4d46cc13823fd1200acb upstream.

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>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/class/cdc-acm.c
drivers/usb/class/cdc-acm.h