Files
u-boot/drivers/usb
Stephan Gerhold eeef122302 usb: gadget: f_acm: Claim requested USB endpoints
U-Boot has an older version of the Linux gadget API, where USB endpoints
returned by usb_ep_autoconfig() are not automatically claimed. As written
in the documentation comment:

 "To prevent the endpoint from being returned by a later autoconfig call,
  claim it by assigning ep->driver_data to some non-null value."

Right now f_acm doesn't do that, which means that e.g. ep_in and ep_notify
may end up being assigned the same endpoint. Surprisingly, the ACM console
is still somehow working, but this is not the expected behavior. It will
break with a later commit that disallows calling usb_ep_enable() multiple
times.

Fix this by assigning some data to ep->driver_data, similar to the other
gadget drivers.

Fixes: fc2b399ac0 ("usb: gadget: Add CDC ACM function")
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Link: https://lore.kernel.org/r/20250407-acm-fixes-v1-1-e3dcb592d6d6@linaro.org
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-04-23 09:50:52 +02:00
..
2025-04-11 12:16:44 -06:00
2025-04-11 12:16:44 -06:00
2025-04-03 16:54:49 -06:00
2024-10-17 03:12:47 +02:00
2025-01-20 19:26:54 -06:00