Skip to content

Commit 986c174

Browse files
liubiinjhovold
authored andcommitted
USB: serial: usb_wwan: do not resubmit rx urb on fatal errors
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: 6c1ee66 ("USB-Serial: Fix error handling of usb_wwan") Cc: [email protected] Signed-off-by: Bin Liu <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
1 parent 788a4ee commit 986c174

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/usb/serial/usb_wwan.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ static void usb_wwan_indat_callback(struct urb *urb)
270270
if (status) {
271271
dev_dbg(dev, "%s: nonzero status: %d on endpoint %02x.\n",
272272
__func__, status, endpoint);
273+
274+
/* don't resubmit on fatal errors */
275+
if (status == -ESHUTDOWN || status == -ENOENT)
276+
return;
273277
} else {
274278
if (urb->actual_length) {
275279
tty_insert_flip_string(&port->port, data,

0 commit comments

Comments
 (0)