Re: [PATCH v1 1/1] Revert "serial: 8250_port: Drop duplicate NULL check"

From: Andy Shevchenko

Date: Mon Oct 12 2026 - 16:30:37 EST


On Sat, Oct 10, 2026 at 09:37:56PM +0200, Ferry Toth wrote:
> This reverts commit 7885af04df6e4efd72910200c1bfc079d61202e4.
>
> Commit 7885af04df6e ("serial: 8250_port: Drop duplicate NULL check")
> added `up->dma = NULL;` to serial8250_release_dma(), with the stated
> intent of making sure DMA would not be used again after release.
>
> However, up->dma is assigned once at probe time. serial8250_do_startup()
> only calls serial8250_request_dma() when up->dma is non-NULL, so after
> the first close the pointer stays NULL and DMA is never re-acquired.
>
> On Intel Tangier (Edison) with HSU DMA this causes a regression: the
> first port open uses TX DMA, the second and later opens transmit in PIO
> mode, producing 64-byte FIFO bursts with ~50us gaps between them.

As discussed off-list with Ferry the culprit patch was inspired
by 8250_omap implementation which may have the same bug lurking.
Thanks, Ferry, for a good catch!

Acked-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

--
With Best Regards,
Andy Shevchenko