public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Manuel Estrada Sainz <ranty@ranty.pantax.net>
Cc: Andrew Morton <akpm@osdl.org>,
	LKML <linux-kernel@vger.kernel.org>,
	jt@hpl.hp.com, Simon Kelley <simon@thekelleys.org.uk>
Subject: [PATCH 2/2] Delay firmware hotplug event (was Re: [PATCH] request_firmware(): fixes and polishing.)
Date: Sun, 29 Feb 2004 01:34:22 -0500	[thread overview]
Message-ID: <200402290134.24580.dtor_core@ameritech.net> (raw)
In-Reply-To: <200402290132.57431.dtor_core@ameritech.net>


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


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

      reply	other threads:[~2004-02-29  6:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ranty@debian.org>
2004-02-25  1:34 ` [PATCH] request_firmware(): fixes and polishing Manuel Estrada Sainz
2004-02-25  1:34   ` Manuel Estrada Sainz
2004-02-25  1:34     ` Manuel Estrada Sainz
2004-02-25  1:34       ` Manuel Estrada Sainz
2004-02-25  1:34         ` Manuel Estrada Sainz
2004-02-25  1:34           ` Manuel Estrada Sainz
2004-02-25  1:34             ` Manuel Estrada Sainz
2004-02-25  1:34               ` Manuel Estrada Sainz
2004-02-25 19:47   ` Jean Tourrilhes
2004-02-25 23:40     ` Manuel Estrada Sainz
2004-02-29  6:30   ` Dmitry Torokhov
2004-02-29  6:32     ` [PATCH 1/2] Pin firmware module (was Re: [PATCH] request_firmware(): fixes and polishing.) Dmitry Torokhov
2004-02-29  6:34       ` Dmitry Torokhov [this message]

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=200402290134.24580.dtor_core@ameritech.net \
    --to=dtor_core@ameritech.net \
    --cc=akpm@osdl.org \
    --cc=jt@hpl.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ranty@ranty.pantax.net \
    --cc=simon@thekelleys.org.uk \
    /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