[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAfSe-u6Prn=nnX8Y67DearNEuHH90Fo71R7hmxbvWGuPxyk2w@mail.gmail.com>
Date: Tue, 8 Sep 2020 15:27:10 +0800
From: Chunyan Zhang <zhang.lyra@...il.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: Tudor Ambarus <tudor.ambarus@...rochip.com>,
Mark Brown <broonie@...nel.org>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Ludovic Desroches <ludovic.desroches@...rochip.com>,
Nicolas Saenz Julienne <nsaenzjulienne@...e.de>,
Florian Fainelli <f.fainelli@...il.com>,
Ray Jui <rjui@...adcom.com>,
Scott Branden <sbranden@...adcom.com>,
bcm-kernel-feedback-list@...adcom.com,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Orson Zhai <orsonzhai@...il.com>,
Baolin Wang <baolin.wang7@...il.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...com>,
Masahisa Kojima <masahisa.kojima@...aro.org>,
Jassi Brar <jaswinder.singh@...aro.org>,
Laxman Dewangan <ldewangan@...dia.com>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
linux-spi@...r.kernel.org,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-rpi-kernel@...ts.infradead.org,
linux-arm-msm@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-tegra@...r.kernel.org, stable <stable@...r.kernel.org>
Subject: Re: [PATCH 01/11] spi: sprd: Release DMA channel also on probe deferral
On Tue, 1 Sep 2020 at 23:27, Krzysztof Kozlowski <krzk@...nel.org> wrote:
>
> If dma_request_chan() for TX channel fails with EPROBE_DEFER, the RX
> channel would not be released and on next re-probe it would be requested
> second time.
>
> Fixes: 386119bc7be9 ("spi: sprd: spi: sprd: Add DMA mode support")
> Cc: <stable@...r.kernel.org>
> Signed-off-by: Krzysztof Kozlowski <krzk@...nel.org>
Acked-by: Chunyan Zhang <zhang.lyra@...il.com>
Thanks,
Chunyan
> ---
> drivers/spi/spi-sprd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-sprd.c b/drivers/spi/spi-sprd.c
> index 6678f1cbc566..0443fec3a6ab 100644
> --- a/drivers/spi/spi-sprd.c
> +++ b/drivers/spi/spi-sprd.c
> @@ -563,11 +563,11 @@ static int sprd_spi_dma_request(struct sprd_spi *ss)
>
> ss->dma.dma_chan[SPRD_SPI_TX] = dma_request_chan(ss->dev, "tx_chn");
> if (IS_ERR_OR_NULL(ss->dma.dma_chan[SPRD_SPI_TX])) {
> + dma_release_channel(ss->dma.dma_chan[SPRD_SPI_RX]);
> if (PTR_ERR(ss->dma.dma_chan[SPRD_SPI_TX]) == -EPROBE_DEFER)
> return PTR_ERR(ss->dma.dma_chan[SPRD_SPI_TX]);
>
> dev_err(ss->dev, "request TX DMA channel failed!\n");
> - dma_release_channel(ss->dma.dma_chan[SPRD_SPI_RX]);
> return PTR_ERR(ss->dma.dma_chan[SPRD_SPI_TX]);
> }
>
> --
> 2.17.1
>
Powered by blists - more mailing lists