RE: [patch 2.6.12-rc3] dell_rbu: Resubmitting patch for new DellBIOS update driver

Abhay_Salunke_at_Dell.com
Date: 06/06/05

  • Next message: James Simmons: "Re: [Linux-fbdev-devel] [RFC/PATCH 2.6.12-rc5 1/1] Framebuffer driver for Arc LCD board"
    Date:	Mon, 6 Jun 2005 13:54:56 -0500
    To: <greg@kroah.com>
    
    

    > 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/

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

    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");
          
              rc = request_firmware_nowait (THIS_MODULE,
                    "install.log", new_device,
                    NULL,
                    callbackfn);
            if(rc) {
                    printk(KERN_ERR
                            "dcdrbu_init:"
                            " request_firmware_nowait failed %d\n", error);
            }

         return rc;
    }

    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.

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


  • Next message: James Simmons: "Re: [Linux-fbdev-devel] [RFC/PATCH 2.6.12-rc5 1/1] Framebuffer driver for Arc LCD board"

    Relevant Pages

    • [PATCH 11/19] add platform_device_register_simple
      ... struct device platform_bus = { ... +static void platform_device_release_simple ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: 2.6.10-rc1-mm3
      ... but if the fix is easy then there's no reason not to do ... And hotplug scripts ... My RH system here only comes with 256 /dev/pty* device nodes. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH][2.6] fix bridge sysfs improperly initialised knobject
      ... > then it can more easily be addressed by smarter ... > hotplug scripts in user space. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: 2.6.0-test5 vs. Ethernet cards
      ... >> The only way to shut down at this point is to turn off the power. ... > IIRC the problem is your hotplug scripts. ... I didn't guess that the hotplug scripts were used for that. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: evbug.ko
      ... > Any idea what might modprobe evbug.ko w/o operator intervention? ... It's new hotplug scripts. ... I, for example, have evbug, joydev, tsdev and eth1394 there. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)