On Fri, Apr 14, 2023 at 01:53:06PM +0800, qianfanguijin@xxxxxxx wrote: > From: qianfan Zhao <qianfanguijin@xxxxxxx> > > Kernel print such flood message when the modem dead (the device is not > disconnected but it doesn't response anything): > > option1 ttyUSB1: usb_wwan_indat_callback: nonzero status: -71 on endpoint 05. > option1 ttyUSB1: usb_wwan_indat_callback: nonzero status: -71 on endpoint 05. > ... > > So treat any error that doesn't recognized as a fatal error and do not > resubmit again. This could potentially break setups that are currently able to recover from intermittent errors. Try adding the missing known fatal ones as you suggested in your other thread first. There could still be an issue with -EPROTO (-71) error that would require some kind of back-off or limit, but that would need to be implemented in a more central place rather than in each and every usb driver (as has been discussed in the past). > Signed-off-by: qianfan Zhao <qianfanguijin@xxxxxxx> > --- > drivers/usb/serial/usb_wwan.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c > index cb01283d4d15..daa3e2beff0f 100644 > --- a/drivers/usb/serial/usb_wwan.c > +++ b/drivers/usb/serial/usb_wwan.c > @@ -227,8 +227,7 @@ static void usb_wwan_indat_callback(struct urb *urb) > __func__, status, endpoint); > > /* don't resubmit on fatal errors */ > - if (status == -ESHUTDOWN || status == -ENOENT) > - return; > + return; > } else { > if (urb->actual_length) { > tty_insert_flip_string(&port->port, data, Johan