mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jon Mason <jon.mason@intel.com>
To: Dan Williams <djbw@fb.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
	"vinod.koul@intel.com" <vinod.koul@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"spear-devel@list.st.com" <spear-devel@list.st.com>,
	Shiraz Hashim <shiraz.hashim@st.com>,
	Deepak Sikri <deepak.sikri@st.com>,
	"dave.jiang@intel.com" <dave.jiang@intel.com>
Subject: Re: [PATCH] dmaengine/dmatest: terminate transfers only in case of errors
Date: Fri, 9 Nov 2012 12:56:18 -0700	[thread overview]
Message-ID: <20121109195617.GB25358@jonmason-lab> (raw)
In-Reply-To: <84A937D219C2B44EB8EA44831ACA1E49166B9A82@SC-MBX01-3.TheFacebook.com>

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
> 

      reply	other threads:[~2012-11-09 19:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-09 15:26 Viresh Kumar
2012-11-09 18:44 ` Dan Williams
2012-11-09 19:56   ` Jon Mason [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121109195617.GB25358@jonmason-lab \
    --to=jon.mason@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=deepak.sikri@st.com \
    --cc=djbw@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shiraz.hashim@st.com \
    --cc=spear-devel@list.st.com \
    --cc=vinod.koul@intel.com \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®