lkml.org 
[lkml]   [2004]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] Delay firmware hotplug event (was Re: [PATCH] request_firmware(): fixes and polishing.)
Date

===================================================================


ChangeSet@1.1695, 2004-02-29 00:27:53-05:00, dtor_core@ameritech.net
Firmware loader:
Do not call hotplug until firmware class device is completely
instantiated.


firmware_class.c | 6 ++++++
1 files changed, 6 insertions(+)


===================================================================



diff -Nru a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
--- a/drivers/base/firmware_class.c Sun Feb 29 01:21:18 2004
+++ b/drivers/base/firmware_class.c Sun Feb 29 01:21:18 2004
@@ -27,6 +27,7 @@
FW_STATUS_LOADING,
FW_STATUS_DONE,
FW_STATUS_ABORT,
+ FW_STATUS_READY,
};

static int loading_timeout = 10; /* In seconds */
@@ -96,6 +97,9 @@
int i = 0;
char *scratch = buffer;

+ if (!test_bit(FW_STATUS_READY, &fw_priv->status))
+ return -ENODEV;
+
if (buffer_size < (FIRMWARE_NAME_MAX + 10))
return -ENOMEM;
if (num_envp < 1)
@@ -362,6 +366,7 @@
goto error_unreg;
}

+ set_bit(FW_STATUS_READY, &fw_priv->status);
*class_dev_p = class_dev;
goto out;

@@ -415,6 +420,7 @@
add_timer(&fw_priv->timeout);
}

+ kobject_hotplug("add", &class_dev->kobj);
wait_for_completion(&fw_priv->completion);
set_bit(FW_STATUS_DONE, &fw_priv->status);

-
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/
\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.156 / U:0.660 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site