linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Problem with hotplug functions
@ 2004-10-30 16:28 Marcel Holtmann
  2004-10-30 18:16 ` Dmitry Torokhov
  2004-10-30 19:40 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Marcel Holtmann @ 2004-10-30 16:28 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Hi,

I have a little problem with the hotplug functions and in particular
with the one from firmware_class. The problem is that the extra env
variables are not set when hotplug is called. Maybe this is fixed
somewhere, but the lastest Bitkeeper snapshot of the Linus tree is not
working for me.

I see a problem in kobject_hotplug() at lib/kobject_uevent.c:

        if (hotplug_ops->hotplug) {
                /* have the kset specific function add its stuff */
                retval = hotplug_ops->hotplug (kset, kobj,
                                  &envp[i], NUM_ENVP - i, scratch,
                                  BUFFER_SIZE - (scratch - buffer));
                if (retval) {
                        pr_debug ("%s - hotplug() returned %d\n",
                                  __FUNCTION__, retval);
                        goto exit;
                }
        }

        spin_lock(&sequence_lock);
        seq = ++hotplug_seqnum;
        spin_unlock(&sequence_lock);

        envp [i++] = scratch;
        scratch += sprintf(scratch, "SEQNUM=%lld", (long long)seq) + 1;

The hotplug function of hotplug_ops get called, but afterwards its
values are overwritten by the sequence number. Is this correct or do I
made a thinking mistake?

Regards

Marcel



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with hotplug functions
  2004-10-30 16:28 Problem with hotplug functions Marcel Holtmann
@ 2004-10-30 18:16 ` Dmitry Torokhov
  2004-10-30 19:40 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2004-10-30 18:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: Marcel Holtmann

On Saturday 30 October 2004 11:28 am, Marcel Holtmann wrote:
> Hi,
> 
> I have a little problem with the hotplug functions and in particular
> with the one from firmware_class. The problem is that the extra env
> variables are not set when hotplug is called.

Hm, that must be the reason why firmare loading for my atmel wireless
card stopped working recently.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with hotplug functions
  2004-10-30 16:28 Problem with hotplug functions Marcel Holtmann
  2004-10-30 18:16 ` Dmitry Torokhov
@ 2004-10-30 19:40 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2004-10-30 19:40 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: Linux Kernel Mailing List

On Sat, Oct 30, 2004 at 06:28:02PM +0200, Marcel Holtmann wrote:
> 
> The hotplug function of hotplug_ops get called, but afterwards its
> values are overwritten by the sequence number. Is this correct or do I
> made a thinking mistake?

You are correct, there's another thread on lkml about proposed patches
to solve this bug.  The last one from Kay looks like the final version
I'll send to Linus tomorrow.

Sorry about this.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-10-30 19:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-30 16:28 Problem with hotplug functions Marcel Holtmann
2004-10-30 18:16 ` Dmitry Torokhov
2004-10-30 19:40 ` Greg KH

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).