Re: [PATCH 4/5] dmaengine: xdmac: Rework the chaining logic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Vinod,

On Mon, May 04, 2015 at 04:12:32PM +0530, Vinod Koul wrote:
> On Tue, Apr 28, 2015 at 11:03:22AM +0200, Maxime Ripard wrote:
> > So far, we were setting the NDE bit in our descriptors through some logic to
> > try to see if we were the last descriptor in the chain.
> > 
> > However, that was turning out to be rather complex to get right, while this
> > information is also available when we actually chain a new descriptor after an
> > already existing one.
> > 
> > Simplify this by never setting NDE unless when we actually chain a descriptor.
> > 
> > Signed-off-by: Maxime Ripard <maxime.ripard@xxxxxxxxxxxxxxxxxx>
> > ---
> >  drivers/dma/at_xdmac.c | 41 ++++++++++++++++++++---------------------
> >  1 file changed, 20 insertions(+), 21 deletions(-)
> > 
> > diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
> > index cbeadeeed9c0..67e566b2b24f 100644
> > --- a/drivers/dma/at_xdmac.c
> > +++ b/drivers/dma/at_xdmac.c
> > @@ -471,6 +471,20 @@ static struct at_xdmac_desc *at_xdmac_get_desc(struct at_xdmac_chan *atchan)
> >  	return desc;
> >  }
> >  
> > +static void at_xdmac_queue_desc(struct dma_chan *chan,
> > +				struct at_xdmac_desc *prev,
> > +				struct at_xdmac_desc *desc)
> > +{
> > +	if (!prev || !desc)
> > +		return;
> > +
> > +	prev->lld.mbr_nda = desc->tx_dma_desc.phys;
> > +	prev->lld.mbr_ubc |= AT_XDMAC_MBR_UBC_NDE;
> > +
> > +	dev_dbg(chan2dev(chan),	"%s: chain lld: prev=0x%p, mbr_nda=0x%08x\n",
> > +		__func__, prev, prev->lld.mbr_nda);
>
> please use %pad for printing mbr_nda which is dma_addr_t

Right, I'll change this.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux