Re: [PATCH v1] drivers: usb: wwan: treat any error as a fatal error

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

 





On 14.04.23 09:01, Johan Hovold wrote:
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.

Yes. The basic issue is that a physically disconnected device
produces the same errors as an intermittent failure for a short
time before the disconnection is detected.

Hence the correct way to handle this would be like usbhid does
with hid_io_error(), that is a delay before resubmitting
and eventually a device reset.

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).

Exactly. How would that look like conceptually?
A centralized work with a pool of URBs to be retried after a delay
and eventually a device reset?

Handling unbinding a driver would be tough, though.

	Regards
		Oliver



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

  Powered by Linux