Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-27 Thread Ming Lei
On Fri, Sep 28, 2012 at 1:22 AM, Joachim Eastwood wrote: > > I am also having problems with ASoC modules and deferred probing. This > patch seems to improve the a lot situation, though. Now it work most > of the time, but occasionally I get the warning below. > > Not sure if this is directly

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-27 Thread Mark Brown
On Thu, Sep 27, 2012 at 07:22:38PM +0200, Joachim Eastwood wrote: > [ 13.14] sysfs: cannot create duplicate filename > '/devices/platform/ssc.0/atmel-ssc-dai.0' > [ 13.14] Modules linked in: snd_soc_mpa1600_wm8776(+) Oh, dear. This is probably a genuine bug, triggered by but not

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-27 Thread Joachim Eastwood
Hi, On Thu, Sep 27, 2012 at 4:03 PM, Russell King - ARM Linux wrote: > On Thu, Sep 27, 2012 at 02:58:09PM +0100, Russell King - ARM Linux wrote: >> On Thu, Sep 27, 2012 at 07:47:46AM +0800, Ming Lei wrote: >> > On Thu, Sep 27, 2012 at 4:23 AM, Russell King - ARM Linux >> > wrote: >> > > To be

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-27 Thread Ming Lei
On Thu, Sep 27, 2012 at 10:03 PM, Russell King - ARM Linux wrote: > On Thu, Sep 27, 2012 at 02:58:09PM +0100, Russell King - ARM Linux wrote: >> On Thu, Sep 27, 2012 at 07:47:46AM +0800, Ming Lei wrote: >> > On Thu, Sep 27, 2012 at 4:23 AM, Russell King - ARM Linux >> > wrote: >> > > To be

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-27 Thread Russell King - ARM Linux
On Thu, Sep 27, 2012 at 02:58:09PM +0100, Russell King - ARM Linux wrote: > On Thu, Sep 27, 2012 at 07:47:46AM +0800, Ming Lei wrote: > > On Thu, Sep 27, 2012 at 4:23 AM, Russell King - ARM Linux > > wrote: > > > To be honest, I've not bothered to test the above patch, and now when I > > > look

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-27 Thread Russell King - ARM Linux
On Thu, Sep 27, 2012 at 07:47:46AM +0800, Ming Lei wrote: > On Thu, Sep 27, 2012 at 4:23 AM, Russell King - ARM Linux > wrote: > > To be honest, I've not bothered to test the above patch, and now when I > > look at it, I notice it's broken - in that on error it will corrupt the > > driver list.

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-27 Thread Russell King - ARM Linux
On Thu, Sep 27, 2012 at 07:47:46AM +0800, Ming Lei wrote: On Thu, Sep 27, 2012 at 4:23 AM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: To be honest, I've not bothered to test the above patch, and now when I look at it, I notice it's broken - in that on error it will corrupt the

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-27 Thread Russell King - ARM Linux
On Thu, Sep 27, 2012 at 02:58:09PM +0100, Russell King - ARM Linux wrote: On Thu, Sep 27, 2012 at 07:47:46AM +0800, Ming Lei wrote: On Thu, Sep 27, 2012 at 4:23 AM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: To be honest, I've not bothered to test the above patch, and now when

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-27 Thread Ming Lei
On Thu, Sep 27, 2012 at 10:03 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Thu, Sep 27, 2012 at 02:58:09PM +0100, Russell King - ARM Linux wrote: On Thu, Sep 27, 2012 at 07:47:46AM +0800, Ming Lei wrote: On Thu, Sep 27, 2012 at 4:23 AM, Russell King - ARM Linux

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-27 Thread Joachim Eastwood
Hi, On Thu, Sep 27, 2012 at 4:03 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Thu, Sep 27, 2012 at 02:58:09PM +0100, Russell King - ARM Linux wrote: On Thu, Sep 27, 2012 at 07:47:46AM +0800, Ming Lei wrote: On Thu, Sep 27, 2012 at 4:23 AM, Russell King - ARM Linux

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-27 Thread Mark Brown
On Thu, Sep 27, 2012 at 07:22:38PM +0200, Joachim Eastwood wrote: [ 13.14] sysfs: cannot create duplicate filename '/devices/platform/ssc.0/atmel-ssc-dai.0' [ 13.14] Modules linked in: snd_soc_mpa1600_wm8776(+) Oh, dear. This is probably a genuine bug, triggered by but not really

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-27 Thread Ming Lei
On Fri, Sep 28, 2012 at 1:22 AM, Joachim Eastwood manab...@gmail.com wrote: I am also having problems with ASoC modules and deferred probing. This patch seems to improve the a lot situation, though. Now it work most of the time, but occasionally I get the warning below. Not sure if this is

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-26 Thread Ming Lei
On Thu, Sep 27, 2012 at 4:23 AM, Russell King - ARM Linux wrote: > On Wed, Sep 26, 2012 at 01:08:33PM -0700, Greg Kroah-Hartman wrote: >> On Sun, Sep 16, 2012 at 09:24:43PM +0800, Ming Lei wrote: >> > diff --git a/drivers/base/bus.c b/drivers/base/bus.c >> > index 181ed26..17d7437 100644 >> > ---

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-26 Thread Greg Kroah-Hartman
On Wed, Sep 26, 2012 at 09:23:21PM +0100, Russell King - ARM Linux wrote: > On Wed, Sep 26, 2012 at 01:08:33PM -0700, Greg Kroah-Hartman wrote: > > On Sun, Sep 16, 2012 at 09:24:43PM +0800, Ming Lei wrote: > > > diff --git a/drivers/base/bus.c b/drivers/base/bus.c > > > index 181ed26..17d7437

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-26 Thread Russell King - ARM Linux
On Wed, Sep 26, 2012 at 01:08:33PM -0700, Greg Kroah-Hartman wrote: > On Sun, Sep 16, 2012 at 09:24:43PM +0800, Ming Lei wrote: > > diff --git a/drivers/base/bus.c b/drivers/base/bus.c > > index 181ed26..17d7437 100644 > > --- a/drivers/base/bus.c > > +++ b/drivers/base/bus.c > > @@ -714,12

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-26 Thread Greg Kroah-Hartman
On Sun, Sep 16, 2012 at 09:24:43PM +0800, Ming Lei wrote: > On Sun, Sep 16, 2012 at 4:25 PM, Russell King - ARM Linux > wrote: > > > > It isn't. As I said, it's a race condition due to lack of locking - the > > driver hasn't been added to the list of drivers at this point: > > > > int

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-26 Thread Greg Kroah-Hartman
On Sun, Sep 16, 2012 at 09:24:43PM +0800, Ming Lei wrote: On Sun, Sep 16, 2012 at 4:25 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: It isn't. As I said, it's a race condition due to lack of locking - the driver hasn't been added to the list of drivers at this point: int

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-26 Thread Russell King - ARM Linux
On Wed, Sep 26, 2012 at 01:08:33PM -0700, Greg Kroah-Hartman wrote: On Sun, Sep 16, 2012 at 09:24:43PM +0800, Ming Lei wrote: diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 181ed26..17d7437 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -714,12 +714,12 @@ int

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-26 Thread Greg Kroah-Hartman
On Wed, Sep 26, 2012 at 09:23:21PM +0100, Russell King - ARM Linux wrote: On Wed, Sep 26, 2012 at 01:08:33PM -0700, Greg Kroah-Hartman wrote: On Sun, Sep 16, 2012 at 09:24:43PM +0800, Ming Lei wrote: diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 181ed26..17d7437 100644 ---

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-26 Thread Ming Lei
On Thu, Sep 27, 2012 at 4:23 AM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Wed, Sep 26, 2012 at 01:08:33PM -0700, Greg Kroah-Hartman wrote: On Sun, Sep 16, 2012 at 09:24:43PM +0800, Ming Lei wrote: diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 181ed26..17d7437

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-16 Thread Ming Lei
On Sun, Sep 16, 2012 at 4:25 PM, Russell King - ARM Linux wrote: > > It isn't. As I said, it's a race condition due to lack of locking - the > driver hasn't been added to the list of drivers at this point: > > int bus_add_driver(struct device_driver *drv) > { > ... > if

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-16 Thread Russell King - ARM Linux
On Sun, Sep 16, 2012 at 02:41:28PM +0800, Ming Lei wrote: > On Sat, Aug 18, 2012 at 10:58 PM, Russell King - ARM Linux > wrote: > > Okay, so EPROBE_DEFER seems to work when I build everything into the > > kernel, but when I build a pile of ASoC drivers as modules, it fails > > every time I've

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-16 Thread Ming Lei
On Sat, Aug 18, 2012 at 10:58 PM, Russell King - ARM Linux wrote: > Okay, so EPROBE_DEFER seems to work when I build everything into the > kernel, but when I build a pile of ASoC drivers as modules, it fails > every time I've tried booting the platform so far. > > This is a v3.5 based kernel,

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-16 Thread Ming Lei
On Sat, Aug 18, 2012 at 10:58 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: Okay, so EPROBE_DEFER seems to work when I build everything into the kernel, but when I build a pile of ASoC drivers as modules, it fails every time I've tried booting the platform so far. This is a v3.5

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-16 Thread Russell King - ARM Linux
On Sun, Sep 16, 2012 at 02:41:28PM +0800, Ming Lei wrote: On Sat, Aug 18, 2012 at 10:58 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: Okay, so EPROBE_DEFER seems to work when I build everything into the kernel, but when I build a pile of ASoC drivers as modules, it fails every

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-16 Thread Ming Lei
On Sun, Sep 16, 2012 at 4:25 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: It isn't. As I said, it's a race condition due to lack of locking - the driver hasn't been added to the list of drivers at this point: int bus_add_driver(struct device_driver *drv) { ... if

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-15 Thread Russell King - ARM Linux
On Sat, Sep 15, 2012 at 09:03:04AM -0700, Greg Kroah-Hartman wrote: > On Sat, Aug 18, 2012 at 03:58:56PM +0100, Russell King - ARM Linux wrote: > > Okay, so EPROBE_DEFER seems to work when I build everything into the > > kernel, but when I build a pile of ASoC drivers as modules, it fails > >

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-15 Thread Greg Kroah-Hartman
On Sat, Aug 18, 2012 at 03:58:56PM +0100, Russell King - ARM Linux wrote: > Okay, so EPROBE_DEFER seems to work when I build everything into the > kernel, but when I build a pile of ASoC drivers as modules, it fails > every time I've tried booting the platform so far. Ugh, sorry for the delay in

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-15 Thread Greg Kroah-Hartman
On Sat, Aug 18, 2012 at 03:58:56PM +0100, Russell King - ARM Linux wrote: Okay, so EPROBE_DEFER seems to work when I build everything into the kernel, but when I build a pile of ASoC drivers as modules, it fails every time I've tried booting the platform so far. Ugh, sorry for the delay in

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-15 Thread Russell King - ARM Linux
On Sat, Sep 15, 2012 at 09:03:04AM -0700, Greg Kroah-Hartman wrote: On Sat, Aug 18, 2012 at 03:58:56PM +0100, Russell King - ARM Linux wrote: Okay, so EPROBE_DEFER seems to work when I build everything into the kernel, but when I build a pile of ASoC drivers as modules, it fails every time