[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdV=kCg62C06jMSdse0QZacKn4R2EqmW2BZuZ+cBwr5tmQ@mail.gmail.com>
Date: Wed, 7 Jan 2026 09:44:40 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Claudiu <claudiu.beznea@...on.dev>
Cc: gregkh@...uxfoundation.org, jirislaby@...nel.org,
prabhakar.mahadev-lad.rj@...renesas.com, wsa+renesas@...g-engineering.com,
namcao@...utronix.de, linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org,
Claudiu Beznea <claudiu.beznea.uj@...renesas.com>, stable@...r.kernel.org
Subject: Re: [PATCH] serial: sh-sci: Check that the DMA cookie is valid
On Thu, 18 Dec 2025 at 08:40, Claudiu <claudiu.beznea@...on.dev> wrote:
> From: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
>
> The driver updates struct sci_port::tx_cookie to zero right before the TX
> work is scheduled, or to -EINVAL when DMA is disabled.
> dma_async_is_complete(), called through dma_cookie_status() (and possibly
> through dmaengine_tx_status()), considers cookies valid only if they have
> values greater than or equal to 1.
>
> Passing zero or -EINVAL to dmaengine_tx_status() before any TX DMA
> transfer has started leads to an incorrect TX status being reported, as the
> cookie is invalid for the DMA subsystem. This may cause long wait times
> when the serial device is opened for configuration before any TX activity
> has occurred.
>
> Check that the TX cookie is valid before passing it to
> dmaengine_tx_status().
>
> Fixes: 7cc0e0a43a91 ("serial: sh-sci: Check if TX data was written to device in .tx_empty()")
> Cc: stable@...r.kernel.org
> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists