RE: [PATCH] r8152: stop submitting rx for -EPROTO

From: Hayes Wang
Date: Thu Sep 30 2021 - 12:13:56 EST


Oliver Neukum <oneukum@xxxxxxxx>
> Sent: Thursday, September 30, 2021 5:30 PM
[...]
> Hi,
>
> Hayes proposed a solution. Basically you solve this the way HID or WDM do it
> delaying resubmission. This makes me wonder whether this problem is specific
> to any driver. If it is not, as I would argue, do we have a deficiency
> in our API?

I think the major question is that the driver doesn't know whether
it is necessary to stop submitting bulk transfer or not. There are
two situations with the same error code. One needs to resubmit
the bulk transfer. The other needs to stop the transfer. The original
idea is that the disconnect event would stop submitting transfer for
the second situation. However, for this case, the disconnect event
comes very late, so the submission couldn't be stopped in time.
The best solution is the driver could get another error code which
indicates the device is disappear for the second situation. Then,
I don't need to do delayed resubmission.

Best Regards,
Hayes