[PATCH v4 62/64] usb: gadget: re-import epautoconf.c from kernel v6.16

Marek Vasut marex at nabladev.com
Wed Jul 1 13:00:24 CEST 2026


On 7/1/26 12:53 PM, Alexey Charkov wrote:
> On Wed, Jul 1, 2026 at 2:26 AM Marek Vasut <marex at nabladev.com> wrote:
>>
>> On 6/29/26 10:44 AM, Jens Wiklander wrote:
>>> From: Jerome Forissier <jerome.forissier at linaro.org>
>>>
>>> Replace drivers/usb/gadget/epautoconf.c with the one from the Linux
>>> kernel. Fixes will come later.
>>>
>>> Signed-off-by: Jerome Forissier <jerome.forissier at linaro.org>
>>> Signed-off-by: Jens Wiklander <jens.wiklander at linaro.org>
>>> Tested-by: Alexey Charkov <alchark at flipper.net>
>> How was this tested ?
> 
> Hi Marek,
> 
> This was tested using v1 of this series after applying all patches to
> the base commit referenced in that version's b4 metadata, see [1].
> 
> Tested on a Rockchip RK3576 based board with two DWC3 controllers as follows:
> - Set one controller to gadget mode, the other to host mode via DT
> - Confirmed no crashes or warnings in U-Boot at boot
> - Initialized the host mode controller via console commands with a USB
> 3.0 flash drive connected via a hub
> - Initialized the gadget mode controller via `ums`, pointing it at the
> flash drive connected to the other controller
> - Connected the gadget mode port to a Windows computer
> - Confirmed no crashes or warnings in U-boot
> - Confirmed the device is recognized as USB mass storage by the Windows computer
> - Mounted the USB mass storage device on Windows
> - Confirmed correct partitions and size
> - Confirmed correct data
> - Confirmed reading and writing works
> - No crashes or warnings in U-boot
> - Safely removed the device on Windows
> - Stopped `ums` in U-boot, confirmed no crashes or warnings while stopping
> 
> This worked better than the then-current U-boot master branch, which
> had trouble properly resetting the controller at boot, resulting in
> non-functional gadget mode.
The TB should then be attached to 64/64 only.


More information about the U-Boot mailing list