Re: BUG: linux 5.15.0 hang on usb_wwan_indat_callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 13, 2023 at 12:50:12PM +0800, qianfan wrote:
> The resubmit logic in usb_wwan_indat_callback semms need improve:
> 
> 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;
> }
> 
> maybe this patch is better?
> 
> switch (status) {
> case -ESHOTDOWN:
> case -ENOENT:
> case -ECONNRESET:
> case -EOVERFLOW:
> case -EPROTO:
>     reutrn;
> }

In fact, it would be better to treat any error you don't recognize as a 
fatal error.

Alan Stern



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux