* [PATCH] dma: imx: correct sdmac->status for cyclic dma tx
@ 2013-12-13 5:52 jiada_wang at mentor.com
2014-05-14 21:42 ` Fabio Estevam
0 siblings, 1 reply; 4+ messages in thread
From: jiada_wang at mentor.com @ 2013-12-13 5:52 UTC (permalink / raw)
To: linux-arm-kernel
From: Jiada Wang <jiada_wang@mentor.com>
In cyclic dma tx's handler sdma_handle_channel_loop(),
SDMA channel statue is set to either DMA_ERROR or DMA_IN_PROGRESS
based on each period's status. This has the following issues:
1) If one period's status is BD_RROR, then channel status
will be set to DMA_ERROR, but it will be overwritten to DMA_IN_PROGRESS
if the following periods are OK.
2) DMA client may call sdma_control(DMA_TERMINATE_ALL) to stop the cyclic dma
operation, sdma channel status will be set to DMA_ERROR,
but if after this handler is called, then again the channel status will be overwritten
to DMA_IN_PROGRESS. Then the following dmaengine_prep_dma_cyclic() will always fail,
as channel status is DMA_IN_PROGRESS.
As in cyclic dma tx, channel status will be initially set to DMA_IN_PROGRESS,
driver only needs to change it to DMA_ERROR, when something wrong happens
(one period status is wrong, or stoped by client explicitly).
Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
---
drivers/dma/imx-sdma.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index c75679d..c8a0094 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -605,8 +605,6 @@ static void sdma_handle_channel_loop(struct sdma_channel *sdmac)
if (bd->mode.status & BD_RROR)
sdmac->status = DMA_ERROR;
- else
- sdmac->status = DMA_IN_PROGRESS;
bd->mode.status |= BD_DONE;
sdmac->buf_tail++;
--
1.8.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] dma: imx: correct sdmac->status for cyclic dma tx
2013-12-13 5:52 jiada_wang at mentor.com
@ 2014-05-14 21:42 ` Fabio Estevam
0 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2014-05-14 21:42 UTC (permalink / raw)
To: linux-arm-kernel
Jiada,
On Fri, Dec 13, 2013 at 3:52 AM, <jiada_wang@mentor.com> wrote:
> From: Jiada Wang <jiada_wang@mentor.com>
>
> In cyclic dma tx's handler sdma_handle_channel_loop(),
> SDMA channel statue is set to either DMA_ERROR or DMA_IN_PROGRESS
> based on each period's status. This has the following issues:
>
> 1) If one period's status is BD_RROR, then channel status
> will be set to DMA_ERROR, but it will be overwritten to DMA_IN_PROGRESS
> if the following periods are OK.
> 2) DMA client may call sdma_control(DMA_TERMINATE_ALL) to stop the cyclic dma
> operation, sdma channel status will be set to DMA_ERROR,
> but if after this handler is called, then again the channel status will be overwritten
> to DMA_IN_PROGRESS. Then the following dmaengine_prep_dma_cyclic() will always fail,
> as channel status is DMA_IN_PROGRESS.
>
> As in cyclic dma tx, channel status will be initially set to DMA_IN_PROGRESS,
> driver only needs to change it to DMA_ERROR, when something wrong happens
> (one period status is wrong, or stoped by client explicitly).
>
> Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
It seems this one got lost as you did not put the dma maintainer on Cc.
Please run ./scripts/get_maintainer.pl and re-submit it.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] dma: imx: correct sdmac->status for cyclic dma tx
@ 2014-05-15 1:22 jiada_wang at mentor.com
2014-06-01 11:40 ` Vinod Koul
0 siblings, 1 reply; 4+ messages in thread
From: jiada_wang at mentor.com @ 2014-05-15 1:22 UTC (permalink / raw)
To: linux-arm-kernel
From: Jiada Wang <jiada_wang@mentor.com>
In cyclic dma tx's handler sdma_handle_channel_loop(),
SDMA channel statue is set to either DMA_ERROR or DMA_IN_PROGRESS
based on each period's status. This has the following issues:
1) If one period's status is BD_RROR, then channel status
will be set to DMA_ERROR, but it will be overwritten to DMA_IN_PROGRESS
if the following periods are OK.
2) DMA client may call sdma_control(DMA_TERMINATE_ALL) to stop the cyclic dma
operation, sdma channel status will be set to DMA_ERROR,
but if after this handler is called, then again the channel status will be overwritten
to DMA_IN_PROGRESS. Then the following dmaengine_prep_dma_cyclic() will always fail,
as channel status is DMA_IN_PROGRESS.
As in cyclic dma tx, channel status will be initially set to DMA_IN_PROGRESS,
driver only needs to change it to DMA_ERROR, when something wrong happens
(one period status is wrong, or stoped by client explicitly).
Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
---
drivers/dma/imx-sdma.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 19041ce..1287146 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -607,8 +607,6 @@ static void sdma_handle_channel_loop(struct sdma_channel *sdmac)
if (bd->mode.status & BD_RROR)
sdmac->status = DMA_ERROR;
- else
- sdmac->status = DMA_IN_PROGRESS;
bd->mode.status |= BD_DONE;
sdmac->buf_tail++;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] dma: imx: correct sdmac->status for cyclic dma tx
2014-05-15 1:22 [PATCH] dma: imx: correct sdmac->status for cyclic dma tx jiada_wang at mentor.com
@ 2014-06-01 11:40 ` Vinod Koul
0 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2014-06-01 11:40 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, May 14, 2014 at 06:22:13PM -0700, jiada_wang at mentor.com wrote:
> From: Jiada Wang <jiada_wang@mentor.com>
>
> In cyclic dma tx's handler sdma_handle_channel_loop(),
> SDMA channel statue is set to either DMA_ERROR or DMA_IN_PROGRESS
> based on each period's status. This has the following issues:
>
> 1) If one period's status is BD_RROR, then channel status
> will be set to DMA_ERROR, but it will be overwritten to DMA_IN_PROGRESS
> if the following periods are OK.
> 2) DMA client may call sdma_control(DMA_TERMINATE_ALL) to stop the cyclic dma
> operation, sdma channel status will be set to DMA_ERROR,
> but if after this handler is called, then again the channel status will be overwritten
> to DMA_IN_PROGRESS. Then the following dmaengine_prep_dma_cyclic() will always fail,
> as channel status is DMA_IN_PROGRESS.
>
> As in cyclic dma tx, channel status will be initially set to DMA_IN_PROGRESS,
> driver only needs to change it to DMA_ERROR, when something wrong happens
> (one period status is wrong, or stoped by client explicitly).
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-01 11:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-15 1:22 [PATCH] dma: imx: correct sdmac->status for cyclic dma tx jiada_wang at mentor.com
2014-06-01 11:40 ` Vinod Koul
-- strict thread matches above, loose matches on Subject: below --
2013-12-13 5:52 jiada_wang at mentor.com
2014-05-14 21:42 ` Fabio Estevam
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).