Commit 59310d1ec (usb: gadget: introduce 'enabled' flag in struct usb_ep) broke atmel_usba_udc
Mattijs Korpershoek
mkorpershoek at kernel.org
Wed May 13 13:25:13 CEST 2026
Hi Zixun,
On Tue, May 12, 2026 at 12:23, Zixun LI <admin at hifiphile.com> wrote:
> Hi,
> With 59310d1ec an "enabled" flag has been introduced to guard ep->ops
> against
> disable before enable or vice versa.
> In atmel_usba_udc/usba_ep_disable() returns an error if the endpoint is
> already disabled.
> When the gadget is re-attached, for example a dhcp command triggers
> usb_gadget_ops.pullup event, the bus is reset and
> atmel_usba_udc/reset_all_endpoints() is called. Since ep->enabled flag is
> still
> true, following usb_ep_disable()/usb_ep_enable() calls will fail.
>
> What's the correct fix, change atmel_usba_udc/reset_all_endpoints() ?
Thank you for testing and reporting this problem.
I've seen you have posted a patch fixing this here:
https://lore.kernel.org/all/20260512-udc_ep-v1-1-8a783e44cf7f@hifiphile.com/
Let's continue the discussion there.
Regards
Mattijs
>
> Regards,
> Zixun
More information about the U-Boot
mailing list