Re: [PATCH] usb: dwc2: fix fifo reinit in dwc2_hsotg_core_init_disconnected

From: Thinh Nguyen

Date: Tue Nov 03 2026 - 20:08:09 EST


On Wed, Oct 14, 2026, Fabrice Gasnier wrote:
> Currently, the fifo gets re-init, with a running DMA, e.g. when

This can only happen on the is_usb_reset path right?

> using_desc_dma():
> - dwc2_hsotg_init_fifo -> Flushes the FIFO, DMA may run in parallel
> - DCFG_DESCDMA_EN gets cleared (e.g. disables dma desc)
> - then DCFG_DESCDMA_EN gets set back again.
>
> So move the dwc2_hsotg_init_fifo() call after DCFG_DESCDMA_EN gets
> cleared e.g. DCFG write. Then the FIFO can be flushed safely, before
> DCFG_DESCDMA_EN is set back on.
>
> A BNA interrupt may happen on EP0, before this change. When it happens
> we can't recover to a working device.
>
> Fixes: 5b7d70c6dbf2 ("USB: Gadget driver for Samsung HS/OtG block")

The should be:

Fixes: a5c18f113150 ("usb: dwc2: gadget: Enable descriptor DMA mode")

Otherwise, this looks good to me. Please send a v2 with the above Fixes
tag and you can add this:

Acked-by: Thinh Nguyen <Thinh.Nguyen@xxxxxxxxxxxx>

Thanks,
Thinh