lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CO1PR11MB5026C04E7F8DA29F87268D3CDAE80@CO1PR11MB5026.namprd11.prod.outlook.com>
Date:   Wed, 11 Nov 2020 01:44:23 +0000
From:   "Sia, Jee Heng" <jee.heng.sia@...el.com>
To:     Vinod Koul <vkoul@...nel.org>
CC:     "Eugeniy.Paltsev@...opsys.com" <Eugeniy.Paltsev@...opsys.com>,
        "andriy.shevchenko@...ux.intel.com" 
        <andriy.shevchenko@...ux.intel.com>,
        "dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2 09/15] dmaengine: dw-axi-dmac: Support burst residue
 granularity



> -----Original Message-----
> From: Vinod Koul <vkoul@...nel.org>
> Sent: 09 November 2020 5:51 PM
> To: Sia, Jee Heng <jee.heng.sia@...el.com>
> Cc: Eugeniy.Paltsev@...opsys.com; andriy.shevchenko@...ux.intel.com;
> dmaengine@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH v2 09/15] dmaengine: dw-axi-dmac: Support burst residue
> granularity
> 
> On 27-10-20, 14:38, Sia Jee Heng wrote:
> > Add support for DMA_RESIDUE_GRANULARITY_BURST so that AxiDMA can
> > report DMA residue.
> >
> > Existing AxiDMA driver only support data transfer between memory to
> > memory operation, therefore reporting DMA residue to the DMA clients
> > is not supported.
> >
> > Reporting DMA residue to the DMA clients is important as DMA clients
> > shall invoke dmaengine_tx_status() to understand the number of bytes
> > been transferred so that the buffer pointer can be updated accordingly.
> >
> > Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> > Signed-off-by: Sia Jee Heng <jee.heng.sia@...el.com>
> > ---
> >  .../dma/dw-axi-dmac/dw-axi-dmac-platform.c    | 44 ++++++++++++++++---
> >  drivers/dma/dw-axi-dmac/dw-axi-dmac.h         |  2 +
> >  2 files changed, 39 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> > b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> > index 011cf7134f25..cd99557a716c 100644
> > --- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> > +++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> > @@ -265,14 +265,36 @@ dma_chan_tx_status(struct dma_chan *dchan,
> dma_cookie_t cookie,
> >  		  struct dma_tx_state *txstate)
> >  {
> >  	struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
> > -	enum dma_status ret;
> > +	struct virt_dma_desc *vdesc;
> > +	enum dma_status status;
> > +	u32 completed_length;
> > +	unsigned long flags;
> > +	u32 completed_blocks;
> > +	size_t bytes = 0;
> > +	u32 length;
> > +	u32 len;
> >
> > -	ret = dma_cookie_status(dchan, cookie, txstate);
> > +	status = dma_cookie_status(dchan, cookie, txstate);
> 
> txstate can be null, so please check that as well in the below condition and
> return if that is the case
[>>] noted. Will factor in the null condition check in v3
> 
> --
> ~Vinod

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ