[PATCH] usb: gadget: atmel: do not disable endpoints in reset_all_endpoints()
Zixun LI
admin at hifiphile.com
Tue May 12 15:11:16 CEST 2026
Endpoints should not be disabled on bus reset event inside UDC driver,
otherwise a racing condition will happen between gadget driver. Gadget
driver will free the requests and disable endpoints in disconnect ops
later.
Signed-off-by: Zixun LI <admin at hifiphile.com>
---
drivers/usb/gadget/atmel_usba_udc.c | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
index f7a92ded6da..b0de22961de 100644
--- a/drivers/usb/gadget/atmel_usba_udc.c
+++ b/drivers/usb/gadget/atmel_usba_udc.c
@@ -571,20 +571,6 @@ static void reset_all_endpoints(struct usba_udc *udc)
list_del_init(&req->queue);
request_complete(ep, req, -ECONNRESET);
}
-
- /* NOTE: normally, the next call to the gadget driver is in
- * charge of disabling endpoints... usually disconnect().
- * The exception would be entering a high speed test mode.
- *
- * FIXME remove this code ... and retest thoroughly.
- */
- list_for_each_entry(ep, &udc->gadget.ep_list, ep.ep_list) {
- if (ep->desc) {
- spin_unlock(&udc->lock);
- usba_ep_disable(&ep->ep);
- spin_lock(&udc->lock);
- }
- }
}
static struct usba_ep *get_ep_by_addr(struct usba_udc *udc, u16 wIndex)
---
base-commit: 5732bd0f457b4c671e46574d64d4acb099c0f0a5
change-id: 20260512-udc_ep-51a3f7a6befb
Best regards,
--
Zixun LI <admin at hifiphile.com>
More information about the U-Boot
mailing list