linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Larry Finger <larry.finger@lwfinger.net>,
	Matt Mackall <mpm@selenic.com>,
	linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
	Monakhov Dmitriy <dmonakhov@openvz.org>
Subject: Re: 2.6.21-rc4-mm1
Date: Fri, 23 Mar 2007 21:06:18 -0800	[thread overview]
Message-ID: <20070323210618.6a41f5da.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070323111029.4089ccfb@gondolin.boeblingen.de.ibm.com>

On Fri, 23 Mar 2007 11:10:29 +0100 Cornelia Huck <cornelia.huck@de.ibm.com> wrote:

> On Thu, 22 Mar 2007 13:55:51 -0500,
> Larry Finger <larry.finger@lwfinger.net> wrote:
> 
> > Cornelia Huck wrote:
> > > On Thu, 22 Mar 2007 07:23:06 -0500,
> > > 
> > > This would indicate that dev_uevent had been called. But how could
> > > kobject_uevent then return an error without moaning about an uevent()
> > > error code? Maybe the following debug patch could shed some light on
> > > this (all moaning is prefixed with kobject_uevent_env, so it should be
> > > easy to spot)...
> > 
> > I applied the debug patch, but I don't see any error codes being returned. This time I also got the
> > General Protection Faults. An excerpt of the log is attached.
> 
> Hm, I think I have an idea about what happened.
> 
> The firmware class tried to suppress the first KOBJ_ADD uevent by
> returning -ENODEV in firmware_uevent if FW_STATUS_READY was not set.
> This only worked as long as the return code of kobject_uevent was not
> checked in device_add. hack-to-make-wireless-work.patch made that first
> uevent return successfully, but this possible triggered some udev rule
> too early, leading to firmware load failures.
> 
> The following (completely untested) patch uses uevent_suppress to stop
> the uevent from being generated during device_add. Does this work for
> you?
> 
> ---
>  drivers/base/firmware_class.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> --- linux-2.6.orig/drivers/base/firmware_class.c
> +++ linux-2.6/drivers/base/firmware_class.c
> @@ -333,6 +333,7 @@ static int fw_register_device(struct dev
>  	f_dev->parent = device;
>  	f_dev->class = &firmware_class;
>  	dev_set_drvdata(f_dev, fw_priv);
> +	f_dev->uevent_suppress = 1;
>  	retval = device_register(f_dev);
>  	if (retval) {
>  		printk(KERN_ERR "%s: device_register failed\n",
> @@ -385,6 +386,7 @@ static int fw_setup_device(struct firmwa
>                  set_bit(FW_STATUS_READY, &fw_priv->status);
>          else
>                  set_bit(FW_STATUS_READY_NOHOTPLUG, &fw_priv->status);
> +	f_dev->uevent_suppress = 0;
>  	*dev_p = f_dev;
>  	goto out;

hm.

Would I be right in guessing that this was all triggered by
uevent-improve-error-checking-and-handling.patch?

If so, do you think I should labour on with
uevent-improve-error-checking-and-handling.patch plus your fix, or should I
drop the lot?  (I'm inclined toward the latter, but I'm still not
sure which patch(es) need to be dropped).

Thanks.

  parent reply	other threads:[~2007-03-24  5:07 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070319205623.299d0378.akpm@linux-foundation.org>
     [not found] ` <1174433034.62033.16.camel@localhost>
2007-03-21  6:36   ` 2.6.21-rc4-mm1 Andrew Morton
2007-03-21  9:52     ` 2.6.21-rc4-mm1 Edward Shishkin
2007-03-21 14:12     ` [Bluez-devel] 2.6.21-rc4-mm1 Marcel Holtmann
2007-03-21 16:13     ` 2.6.21-rc4-mm1 Larry Finger
2007-03-23 19:40       ` 2.6.21-rc4-mm1 Zan Lynx
2007-03-24  1:49         ` 2.6.21-rc4-mm1 Larry Finger
2007-03-21 18:14     ` 2.6.21-rc4-mm1 Larry Finger
2007-03-21 18:34       ` 2.6.21-rc4-mm1 Michael Buesch
2007-03-21 19:00         ` 2.6.21-rc4-mm1 John W. Linville
2007-03-21 18:59       ` 2.6.21-rc4-mm1 John W. Linville
2007-03-21 20:22         ` 2.6.21-rc4-mm1 Matt Mackall
2007-03-21 20:48           ` 2.6.21-rc4-mm1 Larry Finger
2007-03-21 21:03           ` 2.6.21-rc4-mm1 Larry Finger
2007-03-21 21:39             ` 2.6.21-rc4-mm1 Randy Dunlap
2007-03-21 21:45           ` 2.6.21-rc4-mm1 Andrew Morton
2007-03-22  7:39           ` 2.6.21-rc4-mm1 Andrew Morton
2007-03-22 11:35             ` 2.6.21-rc4-mm1 Cornelia Huck
     [not found]               ` <4602752A.5050109@lwfinger.net>
2007-03-22 17:10                 ` 2.6.21-rc4-mm1 Cornelia Huck
2007-03-22 18:55                   ` 2.6.21-rc4-mm1 Larry Finger
2007-03-23 10:10                     ` 2.6.21-rc4-mm1 Cornelia Huck
2007-03-23 15:00                       ` 2.6.21-rc4-mm1 Larry Finger
2007-03-24  5:06                       ` Andrew Morton [this message]
2007-03-26  9:09                         ` 2.6.21-rc4-mm1 Cornelia Huck
2007-03-26  9:22                           ` 2.6.21-rc4-mm1 Andrew Morton
2007-03-26 10:34                             ` 2.6.21-rc4-mm1 Eric Rannaud
2007-03-26 10:44                               ` 2.6.21-rc4-mm1 Andrew Morton
2007-03-27  9:25                               ` 2.6.21-rc4-mm1 Kay Sievers
2007-03-27 17:17                                 ` 2.6.21-rc4-mm1 Cornelia Huck
2007-03-28  1:26                                   ` 2.6.21-rc4-mm1 Eric Rannaud
2007-03-28  8:25                                     ` 2.6.21-rc4-mm1 Cornelia Huck
2007-03-24 22:32             ` 2.6.21-rc4-mm1 Matt Mackall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070323210618.6a41f5da.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=cornelia.huck@de.ibm.com \
    --cc=dmonakhov@openvz.org \
    --cc=larry.finger@lwfinger.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mpm@selenic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).