[PATCH v2] usb: gadget: cdns3: Fix cdns3_ep_config() by setting ep.maxpacket

Mattijs Korpershoek mkorpershoek at baylibre.com
Fri Oct 11 14:33:04 CEST 2024


Hi,

On Mon, 07 Oct 2024 17:49:27 +0530, Siddharth Vadapalli wrote:
> The function cdns3_ep_config() calculates the maximum packet size based
> on the Endpoint Type and the Gadget Speed and stores it in the variable
> "max_packet_size". This value is then programmed in the USB Controller
> for the corresponding Endpoint. This may result in a mismatch between
> the maximum packet size programmed in the USB controller and the maximum
> packet size seen by the UDC Core via "maxpacket" member of "struct usb_ep".
> Additionally, since TD_SIZE is calculated in cdns3_ep_run_transfer() on the
> basis of the maximum packet size stored in the "maxpacket" member of
> "struct usb_ep", it may lead to an incorrect value of TD_SIZE when compared
> with what the USB controller actually expects (max_packet_size).
> 
> [...]

Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-dfu (u-boot-dfu)

[1/1] usb: gadget: cdns3: Fix cdns3_ep_config() by setting ep.maxpacket
      https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/c54c72dec7948093b200ae1290575a1e9abbbb40

--
Mattijs


More information about the U-Boot mailing list