[PATCH v2 1/2] usb: ci: Fix gadget reinit

Mattijs Korpershoek mkorpershoek at baylibre.com
Tue Nov 21 09:21:27 CET 2023


Hi,

On Mon, 20 Nov 2023 01:08:34 +0100, Simon Holesch wrote:
> The ChipIdea device controller wasn't properly cleaned up when disabled.
> So enabling it again left it in a broken state. The problem occurred for
> example when the host unbinds the driver and binds it again.
> 
> During the first setup, when the out request is queued, the endpoint is
> primed (`epprime`). If the endpoint is then disabled, it stayed primed
> with the initial buffer. So after the endpoint is re-enabled, the device
> controller and device driver were out of sync: the new out request was
> in the driver queue head, yet not submitted, but the "complete" function
> was still called, since the endpoint was primed with the old buffer.
> 
> [...]

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

[1/2] usb: ci: Fix gadget reinit
      https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/b272c87925025a44ad6ff851711c68847a4cff4a
[2/2] usb: fastboot: Add missing newline in pr_err
      https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/6f68dcd0259f9f1c03f097669e9490b13b5325c7

--
Mattijs


More information about the U-Boot mailing list