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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 27 Sep 2012 15:31:11 +0530
From:	Vinod Koul <vinod.koul@...ux.intel.com>
To:	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:	Viresh Kumar <viresh.linux@...il.com>,
	linux-kernel@...r.kernel.org,
	spear-devel <spear-devel@...t.st.com>,
	Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Subject: Re: [PATCHv3 5/7] dmaengine: dw_dmac: add PCI part of the driver

On Thu, 2012-09-27 at 12:43 +0300, Andy Shevchenko wrote:
> On Thu, 2012-09-27 at 14:14 +0530, Vinod Koul wrote: 
> > > +static int __devinit dw_pci_probe(struct pci_dev *pdev,
> > > +				  const struct pci_device_id *id)
> > > +{
> > ...
> > > +
> > > +	pd = platform_device_alloc("dw_dmac", instance);
> > Why can't the core driver library be agnostic. Why do we care if the
> > device is platform, pci or something else. 
> > There is nothing in dma API callbacks which driver implements that
> > warrants it to be some device.
> > 
> > You have already taken care of dma controller accesses be arch
> > independent so I don't see a reason why this should be done?
> I'm afraid I didn't get you comment.
Let me try again.

what does it take to do platform and PCI driver for this:
1. make dma h/w access (read/write) platform independent. which you have
already done
2. Device registration: Create two probes, or use common probe.
You smartly chose the second one BUT by creating another device.
If you look closely at the probe then I would say it would be easy to
create library for probe which can be used across both pci and platform
driver probes. The probe library which initializes driver and registers
with dmaengine needs device struct and resources can be provided by each
probe.

-- 
~Vinod

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ