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]
Date:	Mon, 19 Sep 2011 09:56:10 +0000
From:	Barry Song <Barry.Song@....com>
To:	Vinod Koul <vinod.koul@...el.com>
CC:	"21cnbao@...il.com" <21cnbao@...il.com>,
	Arnd Bergmann <arnd@...db.de>,
	Jassi Brar <jaswinder.singh@...aro.org>,
	Linus Walleij <linus.walleij@...aro.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	DL-SHA-WorkGroupLinux <Workgroup.Linux@....com>,
	Rongjun Ying <Rongjun.Ying@....com>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: RE: [PATCH v2] dmaengine: add CSR SiRFprimaII DMAC driver



> -----Original Message-----
> From: Vinod Koul [mailto:vinod.koul@...el.com]
> Sent: 2011年9月19日 17:41
> To: Barry Song
> Cc: 21cnbao@...il.com; Arnd Bergmann; Jassi Brar; Linus Walleij;
> linux-kernel@...r.kernel.org; DL-SHA-WorkGroupLinux; Rongjun Ying;
> linux-arm-kernel@...ts.infradead.org
> Subject: RE: [PATCH v2] dmaengine: add CSR SiRFprimaII DMAC driver
> 
> On Mon, 2011-09-19 at 09:23 +0000, Barry Song wrote:
> > Hi Vinod,
> > Thanks!
> >
> > > -----Original Message-----
> > > From: Vinod Koul [mailto:vinod.koul@...el.com]
> > > Sent: 2011年9月19日 17:00
> > > To: Barry Song
> > > Cc: Arnd Bergmann; Jassi Brar; Linus Walleij; linux-kernel@...r.kernel.org;
> > > DL-SHA-WorkGroupLinux; Rongjun Ying;
> linux-arm-kernel@...ts.infradead.org
> > > Subject: Re: [PATCH v2] dmaengine: add CSR SiRFprimaII DMAC driver
> > >
> > > On Fri, 2011-09-16 at 02:56 -0700, Barry Song wrote:
> > > > From: Rongjun Ying <rongjun.ying@....com>
> > > >
> > > > Cc: Jassi Brar <jaswinder.singh@...aro.org>
> > > > Cc: Arnd Bergmann <arnd@...db.de>
> > > > Cc: Linus Walleij <linus.walleij@...aro.org>
> > > > Signed-off-by: Rongjun Ying <rongjun.ying@....com>
> > > > Signed-off-by: Barry Song <Baohua.Song@....com>
> > > > ---
> > > >  -v2:
> > > >  use generic xfer API from jassi;
> > > >  delete sirf self-defined slave config;
> > > >  fix feedback from vinod;
> > > >  fix filter function: we have two dmac, clients drivers think the chan id as
> > > 0~31;
> > > >  rename regs to base;
> > > >  delete redundant chan_id initialization in probe since dmaengine core
> will
> > > >  re-write it, refer to my patch too:
> > > >  [PATCH] dmaengine: delete redundant chan_id and chancnt initialization
> in
> > > dma drivers
> > > >  http://www.spinics.net/lists/kernel/msg1237455.html
> > > >
> > > >  this patch doesn't provide a common way for filter and doesn't use the
> > > jassi's v2 patch.
> > > > +
> > > > +static int sirfsoc_dma_slave_config(struct sirfsoc_dma_chan *schan,
> > > > +	struct dma_slave_config *config)
> > > > +{
> > > > +	u32 addr, direction;
> > > > +	unsigned long flags;
> > > > +
> > > > +	switch (config->direction) {
> > > > +	case DMA_FROM_DEVICE:
> > > > +		direction = 0;
> > > > +		addr = config->dst_addr;
> > > > +		break;
> > > > +
> > > > +	case DMA_TO_DEVICE:
> > > > +		direction = 1;
> > > > +		addr = config->src_addr;
> > > > +		break;
> > > > +
> > > > +	default:
> > > > +		return -EINVAL;
> > > > +	}
> > > > +
> > > > +	if ((config->src_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES) ||
> > > > +		(config->dst_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES))
> > > > +		return -EINVAL;
> > > > +
> > > > +	spin_lock_irqsave(&schan->lock, flags);
> > > > +	schan->addr = addr;
> > > > +	schan->direction = direction;
> > > > +	schan->mode = (config->src_maxburst == 4 ? 1 : 0);
> > > > +	spin_unlock_irqrestore(&schan->lock, flags);
> > > Not sure why you support this, there seem to be no DMA_SLAVE support in
> > > this version ate least
> >
> > Not. I support dma_slave. But I have no prep_slave_sg function since I can
> use the gen xfer to replace it.
> Yes thats okay...
> 
> Then I have questions on genxfer function...
> where are you copying either src or dstn_start address, you seem to
> completely ignore them?

Since I only support memory->device or device ->memory, and channel number is fixed to every device. Then I actually don't care device address at all. Either src or dst is fixed to the device's address.

> 
> Do you support only slave transfers or M2M as well for this driver?
> If only slave you might want to check if dma_config_slave is set for
> this channel or not.

I support only slave transfer. Actually I have dma_config_slave. do you mean I need to check whether slave config cmd is really called before executing dma?

> 
> --
> ~Vinod

-barry



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ