]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
USB: omap_udc: DMA: Don't enable burst 4 mode
authorAaro Koskinen <aaro.koskinen@iki.fi>
Mon, 13 Apr 2026 18:49:12 +0000 (21:49 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Apr 2026 15:49:28 +0000 (09:49 -0600)
Commit 65111084c63d7 ("USB: more omap_udc updates (dma and omap1710)")
added setting for DMA burst 4 mode. But I think this should be undone for
two reasons:

- It breaks DMA on 15xx boards - transfers just silently stall.

- On newer OMAP1 boards, like Nokia 770 (omap1710), there is no measurable
performance impact when testing TCP throughput with g_ether with large
15000 byte MTU size.

It's also worth noting that when the original change was made, the
OMAP_DMA_DATA_BURST_4 handling in arch/arm/plat-omap/dma.c was broken, and
actually resulted in the same as the OMAP_DMA_DATA_BURST_DIS i.e. burst
disabled. This was fixed not until a couple kernel releases later in an
unrelated commit 1a8bfa1eb998a ("[ARM] 3142/1: OMAP 2/5: Update files
common to omap1 and omap2").

So based on this it seems there was never really a very good reason to
enable this burst mode in omap_udc, so remove it now to allow 15xx DMA
to work again (it provides 2x throughput compared to PIO mode).

Fixes: 65111084c63d ("[PATCH] USB: more omap_udc updates (dma and omap1710)")
Cc: stable <stable@kernel.org>
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Link: https://patch.msgid.link/ad06qHLclWHeSGnV@darkstar.musicnaut.iki.fi
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/omap_udc.c

index 91139ae668f480a6a391d02f3a711466790a77d7..f3ca79cece1bea3d7dd81171e869f52a0b4acf3c 100644 (file)
@@ -733,8 +733,6 @@ static void dma_channel_claim(struct omap_ep *ep, unsigned channel)
                if (status == 0) {
                        omap_writew(reg, UDC_TXDMA_CFG);
                        /* EMIFF or SDRC */
-                       omap_set_dma_src_burst_mode(ep->lch,
-                                               OMAP_DMA_DATA_BURST_4);
                        omap_set_dma_src_data_pack(ep->lch, 1);
                        /* TIPB */
                        omap_set_dma_dest_params(ep->lch,
@@ -756,8 +754,6 @@ static void dma_channel_claim(struct omap_ep *ep, unsigned channel)
                                UDC_DATA_DMA,
                                0, 0);
                        /* EMIFF or SDRC */
-                       omap_set_dma_dest_burst_mode(ep->lch,
-                                               OMAP_DMA_DATA_BURST_4);
                        omap_set_dma_dest_data_pack(ep->lch, 1);
                }
        }