summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBin Liu <b-liu@ti.com>2020-05-13 16:36:46 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-11 09:21:39 +0200
commitf37a82c00f0095d2ab4d8111399c23de5e8202fa (patch)
tree5b917b75ad57b4c0f6bebfe0b5b53a89a681f90e /drivers
parenta913cddf136aa4a4795860dff73d6611321b9fc3 (diff)
USB: serial: usb_wwan: do not resubmit rx urb on fatal errors
commit 986c1748c84d7727defeaeca74a73b37f7d5cce1 upstream. usb_wwan_indat_callback() shouldn't resubmit rx urb if the previous urb status is a fatal error. Or the usb controller would keep processing the new urbs then run into interrupt storm, and has no chance to recover. Fixes: 6c1ee66a0b2b ("USB-Serial: Fix error handling of usb_wwan") Cc: stable@vger.kernel.org Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/serial/usb_wwan.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c
index 485bad73b6ed..814a72935a21 100644
--- a/drivers/usb/serial/usb_wwan.c
+++ b/drivers/usb/serial/usb_wwan.c
@@ -305,6 +305,10 @@ static void usb_wwan_indat_callback(struct urb *urb)
if (status) {
dev_dbg(dev, "%s: nonzero status: %d on endpoint %02x.\n",
__func__, status, endpoint);
+
+ /* don't resubmit on fatal errors */
+ if (status == -ESHUTDOWN || status == -ENOENT)
+ return;
} else {
if (urb->actual_length) {
tty_insert_flip_string(&port->port, data,