public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Abhay_Salunke@Dell.com
Cc: marcel@holtmann.org, linux-kernel@vger.kernel.org, akpm@osdl.org,
	Matt_Domsch@Dell.com
Subject: Re: [patch 2.6.12-rc3] dell_rbu: Resubmitting patch for new DellBIOS update driver
Date: Mon, 6 Jun 2005 12:22:26 -0700	[thread overview]
Message-ID: <20050606192226.GA12138@kroah.com> (raw)
In-Reply-To: <367215741E167A4CA813C8F12CE0143B3ED3AC@ausx2kmpc115.aus.amer.dell.com>

On Mon, Jun 06, 2005 at 01:54:56PM -0500, Abhay_Salunke@Dell.com wrote:
> > On Mon, Jun 06, 2005 at 11:27:53AM -0500, Abhay_Salunke@Dell.com
> wrote:
> > > > The firmware class creates a sysfs file.  That is what I am
> referring
> > > to
> > > > here.
> > > >
> > > By doing a copy of the image to the sysfs file are we trying to do
> the
> > > automatic actions done by the hotplug scripts manually?
> > 
> > Ok, it seems everyone is way confused here.  This is what I was
> thinking
> > of when I suggested using the firmware code:
> > 	- module loads and registers with firmware core doing the
> > 	  "request_firmware_nowait" call.
> > 	- a hotplug event gets generated that everyone just ignores
> > 	  (because it isn't really a big deal.)
> 
> At this instance the function returns and no entry is seen in
> /sys/class/firmware/

Hm, the entry should be there if you have set up the device structures
properly.

But that's not the main problem here...

> > 	- At some point, the user copies the firmware to the sysfs file
> > 	  because they want to update their bios.
> > 	- the module is then told that firmware is present and it does
> > 	  something with it.
> > 
> > Note, that between step 2 and 3, it could be _days_ or _months_.  No
> > need to touch any hotplug scripts at all.
> > 
> > Does this make more sense now?  It seems pretty simple to me...
> 
> But the code still fails; here's the code snippet tired...

<snip>

Ok, in re-reading the firmware code, you are correct, it will still
timeout in 10 seconds and call your callback.  

Which, in my opinion, is wrong.  We should have some way to say "wait
forever".  Care to change the firmware_class.c code to support this?

I was assuming that this would wait forever, and is why I pointed you in
this direction.  Sorry about the confusion here.

> struct device *new_device;
> void callbackfn(const struct firmware *fw, void *context)
> {
>         printk("callbackfn: entry\n");
> 
>         if (!fw)
>                 printk("Got invalid fw entry \n");
> 
>         printk("callbackfn: exit\n");
> }
> 
> static int __init dcdrbu_init(void)
> {
>         int rc = 0;
>         
>         init_packet_head();
> 
>         new_device = kmalloc(sizeof (struct device), GFP_KERNEL);
> 
>         if (!new_device) {
>                 printk("dcdrbu_init: kmalloc failed \n");
>                 return -ENOMEM;
>         }
> 
>         device_initialize(new_device);
>         strcpy(new_device->bus_id, "dell_rbu");

You need to register your device with the driver core, right?

And why not just point to the cpu device instead?  Or some other
platform device...

> In this case the fw pointer returned in the callback is NULL, it also
> happens without any delay and I also see a message as below in
> /var/log/messages.
> hald[2888]: Timed out waiting for hotplug event 305. Rebasing to 306.

You can ignore hald messages, they do not come from the kernel :)

thanks,

greg k-h

  reply	other threads:[~2005-06-06 19:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-06 18:54 [patch 2.6.12-rc3] dell_rbu: Resubmitting patch for new DellBIOS update driver Abhay_Salunke
2005-06-06 19:22 ` Greg KH [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-06-07 14:47 Abhay_Salunke
2005-06-07 15:01 ` Greg KH
2005-06-06 20:22 Abhay_Salunke
2005-06-06 20:35 ` Greg KH
2005-06-06 20:01 Abhay_Salunke
2005-06-06 20:12 ` Greg KH
2005-06-06 16:27 Abhay_Salunke
2005-06-06 18:16 ` Greg KH
2005-06-03 19:57 Abhay_Salunke
2005-06-03 20:33 ` Greg KH
2005-06-03 19:00 Abhay_Salunke
2005-06-03 19:29 ` Greg KH
2005-06-03 13:30 Abhay_Salunke
2005-06-03 16:53 ` Marcel Holtmann
2005-06-03 18:03 ` Greg KH
2005-06-02 22:25 Abhay_Salunke
2005-06-02 22:45 ` Marcel Holtmann
2005-06-02 22:50 ` Andrew Morton
2005-06-03  5:19 ` Greg KH
2005-05-23 15:36 Abhay_Salunke
2005-05-23 15:50 ` Greg KH

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=20050606192226.GA12138@kroah.com \
    --to=greg@kroah.com \
    --cc=Abhay_Salunke@Dell.com \
    --cc=Matt_Domsch@Dell.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    /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