* [PATCH] mtd: onenand: omap2: Pass correct flags for prep_dma_memcpy
@ 2020-01-04 7:34 Peter Ujfalusi
2020-01-04 8:46 ` H. Nikolaus Schaller
2020-01-04 20:29 ` Aaro Koskinen
0 siblings, 2 replies; 3+ messages in thread
From: Peter Ujfalusi @ 2020-01-04 7:34 UTC (permalink / raw)
To: kyungmin.park, miquel.raynal, aaro.koskinen, vigneshr
Cc: hns, tony, linux-mtd, linux-kernel, linux-omap
The commit converting the driver to DMAengine was missing the flags for
the memcpy prepare call.
It went unnoticed since the omap-dma drive was ignoring them.
Fixes: 3ed6a4d1de2c5 (" mtd: onenand: omap2: Convert to use dmaengine for memcp")
Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
Hi,
Aaro reported [1] a failure on omap2-onenand pointing to
4689d35c765c696bdf0535486a990038b242a26b. It looks like the root cause is the
conversion of omap2-onenand to DMAengine which missed the flags.
Basically the client is waiting for a callback without asking for it. This
certainly causes timeout.
I have not tested the patch, but it should fix the issue.
[1] https://lore.kernel.org/lkml/20200103081726.GD15023@darkstar.musicnaut.iki.fi/
drivers/mtd/nand/onenand/omap2.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/onenand/omap2.c b/drivers/mtd/nand/onenand/omap2.c
index edf94ee54ec7..71a632b815aa 100644
--- a/drivers/mtd/nand/onenand/omap2.c
+++ b/drivers/mtd/nand/onenand/omap2.c
@@ -328,7 +328,8 @@ static inline int omap2_onenand_dma_transfer(struct omap2_onenand *c,
struct dma_async_tx_descriptor *tx;
dma_cookie_t cookie;
- tx = dmaengine_prep_dma_memcpy(c->dma_chan, dst, src, count, 0);
+ tx = dmaengine_prep_dma_memcpy(c->dma_chan, dst, src, count,
+ DMA_CTRL_ACK | DMA_PREP_INTERRUPT);
if (!tx) {
dev_err(&c->pdev->dev, "Failed to prepare DMA memcpy\n");
return -EIO;
--
Peter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mtd: onenand: omap2: Pass correct flags for prep_dma_memcpy
2020-01-04 7:34 [PATCH] mtd: onenand: omap2: Pass correct flags for prep_dma_memcpy Peter Ujfalusi
@ 2020-01-04 8:46 ` H. Nikolaus Schaller
2020-01-04 20:29 ` Aaro Koskinen
1 sibling, 0 replies; 3+ messages in thread
From: H. Nikolaus Schaller @ 2020-01-04 8:46 UTC (permalink / raw)
To: Peter Ujfalusi
Cc: kyungmin.park, Miquel Raynal, Aaro Koskinen, Vignesh Raghavendra,
Tony Lindgren, linux-mtd, Linux Kernel Mailing List, Linux-OMAP,
Discussions about the Letux Kernel
> Am 04.01.2020 um 08:34 schrieb Peter Ujfalusi <peter.ujfalusi@ti.com>:
>
> The commit converting the driver to DMAengine was missing the flags for
> the memcpy prepare call.
> It went unnoticed since the omap-dma drive was ignoring them.
s/drive/driver/
>
> Fixes: 3ed6a4d1de2c5 (" mtd: onenand: omap2: Convert to use dmaengine for memcp")
> Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
> Hi,
>
> Aaro reported [1] a failure on omap2-onenand pointing to
> 4689d35c765c696bdf0535486a990038b242a26b. It looks like the root cause is the
> conversion of omap2-onenand to DMAengine which missed the flags.
>
> Basically the client is waiting for a callback without asking for it. This
> certainly causes timeout.
>
> I have not tested the patch, but it should fix the issue.
makes the gta04a5one.dts work again.
Tested-by: H. Nikolaus Schaller <hns@goldelico.com>
BR and thanks!
Nikolaus
>
> [1] https://lore.kernel.org/lkml/20200103081726.GD15023@darkstar.musicnaut.iki.fi/
>
> drivers/mtd/nand/onenand/omap2.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/onenand/omap2.c b/drivers/mtd/nand/onenand/omap2.c
> index edf94ee54ec7..71a632b815aa 100644
> --- a/drivers/mtd/nand/onenand/omap2.c
> +++ b/drivers/mtd/nand/onenand/omap2.c
> @@ -328,7 +328,8 @@ static inline int omap2_onenand_dma_transfer(struct omap2_onenand *c,
> struct dma_async_tx_descriptor *tx;
> dma_cookie_t cookie;
>
> - tx = dmaengine_prep_dma_memcpy(c->dma_chan, dst, src, count, 0);
> + tx = dmaengine_prep_dma_memcpy(c->dma_chan, dst, src, count,
> + DMA_CTRL_ACK | DMA_PREP_INTERRUPT);
> if (!tx) {
> dev_err(&c->pdev->dev, "Failed to prepare DMA memcpy\n");
> return -EIO;
> --
> Peter
>
> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
> Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mtd: onenand: omap2: Pass correct flags for prep_dma_memcpy
2020-01-04 7:34 [PATCH] mtd: onenand: omap2: Pass correct flags for prep_dma_memcpy Peter Ujfalusi
2020-01-04 8:46 ` H. Nikolaus Schaller
@ 2020-01-04 20:29 ` Aaro Koskinen
1 sibling, 0 replies; 3+ messages in thread
From: Aaro Koskinen @ 2020-01-04 20:29 UTC (permalink / raw)
To: Peter Ujfalusi
Cc: kyungmin.park, miquel.raynal, vigneshr, hns, tony, linux-mtd,
linux-kernel, linux-omap
Hi,
On Sat, Jan 04, 2020 at 09:34:53AM +0200, Peter Ujfalusi wrote:
> The commit converting the driver to DMAengine was missing the flags for
> the memcpy prepare call.
> It went unnoticed since the omap-dma drive was ignoring them.
>
> Fixes: 3ed6a4d1de2c5 (" mtd: onenand: omap2: Convert to use dmaengine for memcp")
> Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
> Hi,
>
> Aaro reported [1] a failure on omap2-onenand pointing to
> 4689d35c765c696bdf0535486a990038b242a26b. It looks like the root cause is the
> conversion of omap2-onenand to DMAengine which missed the flags.
>
> Basically the client is waiting for a callback without asking for it. This
> certainly causes timeout.
>
> I have not tested the patch, but it should fix the issue.
This fixes the issue on Nokia boards.
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Thanks,
A.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-04 20:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-04 7:34 [PATCH] mtd: onenand: omap2: Pass correct flags for prep_dma_memcpy Peter Ujfalusi
2020-01-04 8:46 ` H. Nikolaus Schaller
2020-01-04 20:29 ` Aaro Koskinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).