* [PATCH] dmaengine/dmatest: terminate transfers only in case of errors
@ 2012-11-09 15:26 Viresh Kumar
2012-11-09 18:44 ` Dan Williams
0 siblings, 1 reply; 3+ messages in thread
From: Viresh Kumar @ 2012-11-09 15:26 UTC (permalink / raw)
To: vinod.koul; +Cc: djbw, linux-kernel, spear-devel, Shiraz Hashim, Deepak Sikri
From: Shiraz Hashim <shiraz.hashim@st.com>
dmatest erroneously terminated transfers in normal cases also leading to
test failures for multiple threads over a channel. Fix this and
terminate transfers only in case of errors.
Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Deepak Sikri <deepak.sikri@st.com>
---
drivers/dma/dmatest.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index 8f130d4e..ce58b8e 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -509,7 +509,9 @@ err_srcs:
thread_name, total_tests, failed_tests, ret);
/* terminate all transfers on specified channels */
- chan->device->device_control(chan, DMA_TERMINATE_ALL, 0);
+ if (ret)
+ chan->device->device_control(chan, DMA_TERMINATE_ALL, 0);
+
if (iterations > 0)
while (!kthread_should_stop()) {
DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wait_dmatest_exit);
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine/dmatest: terminate transfers only in case of errors
2012-11-09 15:26 [PATCH] dmaengine/dmatest: terminate transfers only in case of errors Viresh Kumar
@ 2012-11-09 18:44 ` Dan Williams
2012-11-09 19:56 ` Jon Mason
0 siblings, 1 reply; 3+ messages in thread
From: Dan Williams @ 2012-11-09 18:44 UTC (permalink / raw)
To: Viresh Kumar, vinod.koul
Cc: linux-kernel, spear-devel, Shiraz Hashim, Deepak Sikri,
jon.mason, dave.jiang
On 11/9/12 7:26 AM, "Viresh Kumar" <viresh.kumar@linaro.org> wrote:
>From: Shiraz Hashim <shiraz.hashim@st.com>
>
>dmatest erroneously terminated transfers in normal cases also leading to
>test failures for multiple threads over a channel. Fix this and
>terminate transfers only in case of errors.
>
>Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
>Signed-off-by: Deepak Sikri <deepak.sikri@st.com>
>---
> drivers/dma/dmatest.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
>index 8f130d4e..ce58b8e 100644
>--- a/drivers/dma/dmatest.c
>+++ b/drivers/dma/dmatest.c
>@@ -509,7 +509,9 @@ err_srcs:
> thread_name, total_tests, failed_tests, ret);
>
> /* terminate all transfers on specified channels */
>- chan->device->device_control(chan, DMA_TERMINATE_ALL, 0);
>+ if (ret)
>+ chan->device->device_control(chan, DMA_TERMINATE_ALL, 0);
>+
This and commit 9704efa "dmaengine/dmatest: Terminate transfers on all
channels in case of error or exit" are broken for channels that don't
implement the optional ->device_control. Care to fix that up?
--
Dan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine/dmatest: terminate transfers only in case of errors
2012-11-09 18:44 ` Dan Williams
@ 2012-11-09 19:56 ` Jon Mason
0 siblings, 0 replies; 3+ messages in thread
From: Jon Mason @ 2012-11-09 19:56 UTC (permalink / raw)
To: Dan Williams
Cc: Viresh Kumar, vinod.koul, linux-kernel, spear-devel,
Shiraz Hashim, Deepak Sikri, dave.jiang
On Fri, Nov 09, 2012 at 06:44:18PM +0000, Dan Williams wrote:
>
>
> On 11/9/12 7:26 AM, "Viresh Kumar" <viresh.kumar@linaro.org> wrote:
>
> >From: Shiraz Hashim <shiraz.hashim@st.com>
> >
> >dmatest erroneously terminated transfers in normal cases also leading to
> >test failures for multiple threads over a channel. Fix this and
> >terminate transfers only in case of errors.
> >
> >Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
> >Signed-off-by: Deepak Sikri <deepak.sikri@st.com>
> >---
> > drivers/dma/dmatest.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> >diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
> >index 8f130d4e..ce58b8e 100644
> >--- a/drivers/dma/dmatest.c
> >+++ b/drivers/dma/dmatest.c
> >@@ -509,7 +509,9 @@ err_srcs:
> > thread_name, total_tests, failed_tests, ret);
> >
> > /* terminate all transfers on specified channels */
> >- chan->device->device_control(chan, DMA_TERMINATE_ALL, 0);
> >+ if (ret)
> >+ chan->device->device_control(chan, DMA_TERMINATE_ALL, 0);
> >+
>
> This and commit 9704efa "dmaengine/dmatest: Terminate transfers on all
> channels in case of error or exit" are broken for channels that don't
> implement the optional ->device_control. Care to fix that up?
I think the best way is to call dmaengine_terminate_all() and have a
sanity check in dmaengine_device_control() that checks for a NULL
device_control. I have a patch that does this and fixes the NULL
pointer error I am seeing on IOAT. I will send it out shortly.
Thanks,
Jon
>
>
> --
> Dan
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-09 19:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-09 15:26 [PATCH] dmaengine/dmatest: terminate transfers only in case of errors Viresh Kumar
2012-11-09 18:44 ` Dan Williams
2012-11-09 19:56 ` Jon Mason
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®