]> git.dujemihanovic.xyz Git - u-boot.git/commit
usb: ci_udc: don't use "advance" feature when setting address
authorIon Agorria <ion@agorria.com>
Tue, 26 Nov 2024 07:29:56 +0000 (09:29 +0200)
committerMattijs Korpershoek <mkorpershoek@baylibre.com>
Tue, 26 Nov 2024 08:56:03 +0000 (09:56 +0100)
commit35d967f5a8219adc47628247a98c302b1870313e
treeb80535159a11f639c5e6aabf525eae9103e7a8d7
parent06b8aafd6810d86f37d5b1cd9c1966f1e42403ed
usb: ci_udc: don't use "advance" feature when setting address

In the older USB controllers like for example in ChipIdea controller
used by the Tegra 2 the "USBADRA: Device Address Advance" bitflag
does not exist, so the new device address set during SET_ADDRESS
can't be deferred by hardware, which causes the host to not recognize
the device and give an error.

Instead store it until ep completes to apply the change into the hw
register as Linux kernel does. This should fix regression on old and
and be compatible with newer controllers.

Inspired by: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ef15e5490edc7edf808d3477ab32e0e320792f65

Signed-off-by: Ion Agorria <ion@agorria.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20241126072956.64778-2-clamor95@gmail.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
drivers/usb/gadget/ci_udc.c
drivers/usb/gadget/ci_udc.h