* Commit 59310d1ec (usb: gadget: introduce 'enabled' flag in struct usb_ep) broke atmel_usba_udc
@ 2026-05-12 10:23 Zixun LI
2026-05-13 11:25 ` Mattijs Korpershoek
0 siblings, 1 reply; 2+ messages in thread
From: Zixun LI @ 2026-05-12 10:23 UTC (permalink / raw)
To: Lukasz Majewski, Mattijs Korpershoek; +Cc: u-boot, stephan.gerhold
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() ?
Regards,
Zixun
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Commit 59310d1ec (usb: gadget: introduce 'enabled' flag in struct usb_ep) broke atmel_usba_udc
2026-05-12 10:23 Commit 59310d1ec (usb: gadget: introduce 'enabled' flag in struct usb_ep) broke atmel_usba_udc Zixun LI
@ 2026-05-13 11:25 ` Mattijs Korpershoek
0 siblings, 0 replies; 2+ messages in thread
From: Mattijs Korpershoek @ 2026-05-13 11:25 UTC (permalink / raw)
To: Zixun LI, Lukasz Majewski, Mattijs Korpershoek; +Cc: u-boot, stephan.gerhold
Hi Zixun,
On Tue, May 12, 2026 at 12:23, Zixun LI <admin@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-13 11:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12 10:23 Commit 59310d1ec (usb: gadget: introduce 'enabled' flag in struct usb_ep) broke atmel_usba_udc Zixun LI
2026-05-13 11:25 ` Mattijs Korpershoek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox