From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hannes Reinecke Date: Tue, 15 Mar 2005 16:07:09 +0000 Subject: Re: Firmware class breaks udev Message-Id: <4237082D.7060008@suse.de> MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------000205050900020406020607" List-Id: References: <42369BE6.7020807@suse.de> In-Reply-To: <42369BE6.7020807@suse.de> To: linux-hotplug@vger.kernel.org This is a multi-part message in MIME format. --------------000205050900020406020607 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Kay Sievers wrote: > On Tue, 2005-03-15 at 14:09 +0100, Hannes Reinecke wrote: [ .. ] >>This is not what happens. >>modprobe will return _after_ device initialisation finished, ie after >>the firmware is loaded (or not, as the case might be). >>The firmware event is triggered when modprobe is still running, so udev >>thinks the device is still initialising and waits until modprobe return= s >>before executing that event. >=20 > Ick, I expected modprobe to return. This is what I saw the last time > with the ipw2100 driver.=20 >=20 Well, yes. After the timeout :-(. >>>>For now I'll be putting in a quick exit for firmware events (ie not w= ait >>>>for the devices initialisation to finish) but this is nevertheless _n= asty_. >>>The time I stumbled across a similar problem with the firmware class, = I >>>thought about adding a TIMEOUT=3D to the hotplug environment which ude= v >>>can use to prioritize such events. But we should better replace >>>class_firmware. >>> >>That's what i thought also. (That's why I named the variable 'timeout')= . >=20 > You have put that into the kernel hotplug env? Or udev itself? >=20 udev. This time I've attached the patch :-). It might be not a bad idea to have a 'TIMEOUT' variable within the kernel, then we can set it to a proper value. Cheers, Hannes --=20 Dr. Hannes Reinecke hare@suse.de SuSE Linux AG S390 & zSeries Maxfeldstra=C3=9Fe 5 +49 911 74053 688 90409 N=C3=BCrnberg http://www.suse.de --------------000205050900020406020607 Content-Type: text/plain; name="udev-053-udevd-override-timeout-events.patch" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="udev-053-udevd-override-timeout-events.patch" ZGlmZiAtcHVyIHVkZXYtZ2xpYmMvdWRldmQuYyB1ZGV2LTA1My91ZGV2ZC5jCi0tLSB1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bmdfbGlzdCwgbm9kZSkgewogCQlpZiAobG9vcF9tc2ctPmRldnBhdGggPT0gTlVMTCkKIAkJ CWNvbnRpbnVlOwpAQCAtNDkwLDYgKzUwMyw5IEBAIHN0YXRpYyBzdHJ1Y3QgaG90cGx1Z19t c2cgKmdldF91ZGV2c2VuZF8KIAogCQlpZiAoc3RybmNtcChrZXksICJQSFlTREVWUEFUSD0i LCAxMikgPT0gMCkKIAkJCW1zZy0+cGh5c2RldnBhdGggPSAma2V5WzEyXTsKKworCQlpZiAo c3RybmNtcChrZXksICJGSVJNV0FSRT0iLCA5KSA9PSAwKQorCQkJbXNnLT50aW1lb3V0ID0g MTA7CiAJfQogCW1zZy0+ZW52cFtpKytdID0gIlVERVZEX0VWRU5UPTEiOwogCW1zZy0+ZW52 cFtpXSA9IE5VTEw7CmRpZmYgLXB1ciB1ZGV2LWdsaWJjL3VkZXZkLmggdWRldi0wNTMvdWRl dmQuaAotLS0gdWRldi1nbGliYy91ZGV2ZC5oCTIwMDUtMDItMTEgMjA6NTU6MTIuMDAwMDAw MDAwICswMTAwCisrKyB1ZGV2LTA1My91ZGV2ZC5oCTIwMDUtMDMtMTUgMDk6MzQ6NTAuMDAw MDAwMDAwICswMTAwCkBAIC02MCw2ICs2MCw3IEBAIHN0cnVjdCBob3RwbHVnX21zZyB7CiAJ Y2hhciAqc3Vic3lzdGVtOwogCXVuc2lnbmVkIGxvbmcgbG9uZyBzZXFudW07CiAJY2hhciAq cGh5c2RldnBhdGg7CisJdW5zaWduZWQgaW50IHRpbWVvdXQ7CiAJY2hhciAqZW52cFtIT1RQ TFVHX05VTV9FTlZQKzFdOwogCWNoYXIgZW52YnVmW107CiB9Owo= --------------000205050900020406020607-- ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel