u-boot/drivers/usb/cdns3
Siddharth Vadapalli c54c72dec7 usb: gadget: cdns3: Fix cdns3_ep_config() by setting ep.maxpacket
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).

Fix this.

Fixes: 7e91f6ccdc ("usb: Add Cadence USB3 host and gadget driver")
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20241007121927.1680039-1-s-vadapalli@ti.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-10-11 14:32:38 +02:00
..
cdns3-ti.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
core.c usb: gadget: cdns3: Convert interrupt handling to usb_gadget_generic_ops 2024-07-05 14:08:24 +02:00
core.h usb: Add Cadence USB3 host and gadget driver 2019-11-07 00:24:59 +01:00
debug.h usb: Add Cadence USB3 host and gadget driver 2019-11-07 00:24:59 +01:00
drd.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
drd.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
ep0.c usb: cdns3: Fix not calling dev_xxx with a device 2020-09-30 08:53:51 -04:00
gadget-export.h usb: gadget: cdns3: Convert interrupt handling to usb_gadget_generic_ops 2024-07-05 14:08:24 +02:00
gadget.c usb: gadget: cdns3: Fix cdns3_ep_config() by setting ep.maxpacket 2024-10-11 14:32:38 +02:00
gadget.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
host-export.h usb: Add Cadence USB3 host and gadget driver 2019-11-07 00:24:59 +01:00
host.c dm: core: Require users of devres to include the header 2020-02-05 19:33:46 -07:00
Kconfig Rename SPL_USB_HOST_SUPPORT to SPL_USB_HOST 2021-07-28 14:27:54 -04:00
Makefile usb: cdns3: Add TI wrapper driver for CDNS USB3 controller 2019-11-07 00:24:59 +01:00
trace.c usb: Add Cadence USB3 host and gadget driver 2019-11-07 00:24:59 +01:00
trace.h usb: Add Cadence USB3 host and gadget driver 2019-11-07 00:24:59 +01:00