From: Vinod Koul <vinod.koul@intel.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: "dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>
Subject: Re: [PATCH v4 4/8] dmaengine: add verification of DMA_MEMSET_SG in dmaengine
Date: Sun, 27 Aug 2017 16:46:02 +0530 [thread overview]
Message-ID: <20170827111601.GU3053@localhost> (raw)
In-Reply-To: <CAPcyv4geOpEP2Ln5DALsOPz3f52x_ZLHcfNWJuMi8dfrb02Riw@mail.gmail.com>
On Wed, Aug 09, 2017 at 07:24:21PM -0700, Dan Williams wrote:
> On Mon, Aug 7, 2017 at 9:39 AM, Dave Jiang <dave.jiang@intel.com> wrote:
> > DMA_MEMSET_SG is missing the verification of having the operation set and
> > also a supporting function provided.
> >
> > Fixes: Commit 50c7cd2bd ("dmaengine: Add scatter-gathered memset")
> >
> > Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> > ---
> > drivers/dma/dmaengine.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
> > index 1c424f6..d9a71f0 100644
> > --- a/drivers/dma/dmaengine.c
> > +++ b/drivers/dma/dmaengine.c
> > @@ -935,6 +935,8 @@ int dma_async_device_register(struct dma_device *device)
> > !device->device_prep_dma_pq_val);
> > BUG_ON(dma_has_cap(DMA_MEMSET, device->cap_mask) &&
> > !device->device_prep_dma_memset);
> > + BUG_ON(dma_has_cap(DMA_MEMSET_SG, device->cap_mask) &&
> > + !device->device_prep_dma_memset_sg);
> > BUG_ON(dma_has_cap(DMA_INTERRUPT, device->cap_mask) &&
> > !device->device_prep_dma_interrupt);
> > BUG_ON(dma_has_cap(DMA_SG_SG, device->cap_mask) &&
> >
>
> One of these days we might convert all of these to a WARN_ON_ONCE()
> with a an error return. No need to crash dmaengine developer systems
> when they make this small mistake.
Yes I have been wanting to do that for a while now :) thanks for the
reminder...
--
~Vinod
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
next prev parent reply other threads:[~2017-08-27 11:09 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-07 16:39 [PATCH v4 0/8] Adding blk-mq and DMA support to pmem block driver Dave Jiang
2017-08-07 16:39 ` [PATCH v4 1/8] dmaengine: ioatdma: revert 7618d035 to allow sharing of DMA channels Dave Jiang
2017-08-07 16:39 ` [PATCH v4 2/8] dmaengine: change transaction type DMA_SG to DMA_SG_SG Dave Jiang
2017-08-10 2:15 ` Dan Williams
2017-08-10 2:20 ` Dan Williams
2017-08-10 16:22 ` Dave Jiang
2017-08-10 19:05 ` Dan Williams
2017-08-10 19:44 ` Dave Jiang
2017-08-10 20:09 ` Dan Williams
2017-08-07 16:39 ` [PATCH v4 3/8] dmaengine: Add DMA_MEMCPY_SG transaction op Dave Jiang
2017-08-08 13:16 ` Sinan Kaya
2017-08-08 15:58 ` Dave Jiang
2017-08-07 16:39 ` [PATCH v4 4/8] dmaengine: add verification of DMA_MEMSET_SG in dmaengine Dave Jiang
2017-08-10 2:24 ` Dan Williams
2017-08-27 11:16 ` Vinod Koul [this message]
2017-08-07 16:39 ` [PATCH v4 5/8] dmaengine: ioatdma: dma_prep_memcpy_sg support Dave Jiang
2017-08-07 16:39 ` [PATCH v4 6/8] dmaengine: add SG support to dmaengine_unmap Dave Jiang
2017-08-10 2:44 ` Dan Williams
2017-08-07 16:39 ` [PATCH v4 7/8] libnvdimm: Adding blk-mq support to the pmem driver Dave Jiang
2017-08-11 10:57 ` Christoph Hellwig
2017-08-11 17:18 ` Dave Jiang
2017-08-11 17:59 ` Dan Williams
2017-08-07 16:39 ` [PATCH v4 8/8] libnvdimm: add DMA support for pmem blk-mq Dave Jiang
2017-08-11 11:04 ` Christoph Hellwig
2017-08-11 18:01 ` Dave Jiang
2017-08-11 17:54 ` [PATCH v4 0/8] Adding blk-mq and DMA support to pmem block driver Elliott, Robert (Persistent Memory)
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=20170827111601.GU3053@localhost \
--to=vinod.koul@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-nvdimm@lists.01.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