# Re: \[PATCH\] usbnet: Activate halt interrupt endpoint before re-submit URB

- From: Ming Lei \<hidden\>
- Date: 2012-06-19 15:50:14 
- List: netdev
- Page: https://ratatoskr.run/netdev/2012/06/10897514
- Thread: https://ratatoskr.run/netdev/2012/06/10897514/t.md

```text
On Tue, Jun 19, 2012 at 12:51 AM, Oliver Neukum [ref] wrote:

>
> Then I am inclined to say that this is not fully thought through
> If the endpoint stalls, the device has detected an error.
> We have no idea how to generically handle this error.
> We might come into a vicious circle.

Why does it come into a vicious circle? If the interrupt endpoint is
HALTed, the clear halt event is scheduled to call usb_clear_halt(int pipe),
and if it returns successfully, the pipe shouldn't be halted any more,
so the later usb_submit_urb() should be OK on the interrupt endpoint.

The similar handling policy is taken for RX/TX endpoints in case they
are halted.

> Could you add a sanity limit for the
> amount of halts we clear?

Looks it is not needed, at least clearing HALT on Rx/Tx endpoints
works well without the limit.

Thanks,
-- 
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
```
