public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] add TIMEOUT to firmware_class hotplug event
@ 2005-03-17  2:34 Kay Sievers
  2005-03-17  5:46 ` Greg KH
  2005-03-17 23:56 ` Greg KH
  0 siblings, 2 replies; 5+ messages in thread
From: Kay Sievers @ 2005-03-17  2:34 UTC (permalink / raw)
  To: linux-kernel; +Cc: Hannes Reinecke, Greg KH

On Tue, 2005-03-15 at 09:25 +0100, Hannes Reinecke wrote:
> The current implementation of the firmware class breaks a fundamental
> assumption in udevd: that the physical device can be initialised fully
> prior to executing the next event for that device.

Here we add a TIMEOUT value to the hotplug environment of the firmware
requesting event. I will adapt udevd not to wait for anything else, if
it finds a TIMEOUT key.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>

===== drivers/base/firmware_class.c 1.25 vs edited =====
--- 1.25/drivers/base/firmware_class.c	2004-11-26 21:26:48 +01:00
+++ edited/drivers/base/firmware_class.c	2005-03-17 03:22:37 +01:00
@@ -102,6 +102,9 @@
 	if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &len,
 			"FIRMWARE=%s", fw_priv->fw_id))
 		return -ENOMEM;
+	if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &len,
+			"TIMEOUT=%i", loading_timeout))
+		return -ENOMEM;
 
 	envp[i] = NULL;
 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] add TIMEOUT to firmware_class hotplug event
  2005-03-17  2:34 [PATCH] add TIMEOUT to firmware_class hotplug event Kay Sievers
@ 2005-03-17  5:46 ` Greg KH
  2005-03-17 11:07   ` Kay Sievers
  2005-03-17 23:56 ` Greg KH
  1 sibling, 1 reply; 5+ messages in thread
From: Greg KH @ 2005-03-17  5:46 UTC (permalink / raw)
  To: Kay Sievers; +Cc: linux-kernel, Hannes Reinecke

On Thu, Mar 17, 2005 at 03:34:31AM +0100, Kay Sievers wrote:
> On Tue, 2005-03-15 at 09:25 +0100, Hannes Reinecke wrote:
> > The current implementation of the firmware class breaks a fundamental
> > assumption in udevd: that the physical device can be initialised fully
> > prior to executing the next event for that device.
> 
> Here we add a TIMEOUT value to the hotplug environment of the firmware
> requesting event. I will adapt udevd not to wait for anything else, if
> it finds a TIMEOUT key.

Can't you just trigger off of the FIRMWARE variable instead?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] add TIMEOUT to firmware_class hotplug event
  2005-03-17  5:46 ` Greg KH
@ 2005-03-17 11:07   ` Kay Sievers
  2005-03-17 22:55     ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Kay Sievers @ 2005-03-17 11:07 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, Hannes Reinecke

On Wed, 2005-03-16 at 21:46 -0800, Greg KH wrote:
> On Thu, Mar 17, 2005 at 03:34:31AM +0100, Kay Sievers wrote:
> > On Tue, 2005-03-15 at 09:25 +0100, Hannes Reinecke wrote:
> > > The current implementation of the firmware class breaks a fundamental
> > > assumption in udevd: that the physical device can be initialised fully
> > > prior to executing the next event for that device.
> > 
> > Here we add a TIMEOUT value to the hotplug environment of the firmware
> > requesting event. I will adapt udevd not to wait for anything else, if
> > it finds a TIMEOUT key.
> 
> Can't you just trigger off of the FIRMWARE variable instead?

Sure, that will work too. I just thought it would be nice to give
userspace a hint about the event behavior the kernel expects, instead of
adding an exception to the udevd event management?

Thanks,
Kay


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] add TIMEOUT to firmware_class hotplug event
  2005-03-17 11:07   ` Kay Sievers
@ 2005-03-17 22:55     ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2005-03-17 22:55 UTC (permalink / raw)
  To: Kay Sievers; +Cc: linux-kernel, Hannes Reinecke

On Thu, Mar 17, 2005 at 12:07:55PM +0100, Kay Sievers wrote:
> On Wed, 2005-03-16 at 21:46 -0800, Greg KH wrote:
> > On Thu, Mar 17, 2005 at 03:34:31AM +0100, Kay Sievers wrote:
> > > On Tue, 2005-03-15 at 09:25 +0100, Hannes Reinecke wrote:
> > > > The current implementation of the firmware class breaks a fundamental
> > > > assumption in udevd: that the physical device can be initialised fully
> > > > prior to executing the next event for that device.
> > > 
> > > Here we add a TIMEOUT value to the hotplug environment of the firmware
> > > requesting event. I will adapt udevd not to wait for anything else, if
> > > it finds a TIMEOUT key.
> > 
> > Can't you just trigger off of the FIRMWARE variable instead?
> 
> Sure, that will work too. I just thought it would be nice to give
> userspace a hint about the event behavior the kernel expects, instead of
> adding an exception to the udevd event management?

Hm, so by adding the TIMEOUT value, we are telling userspace that we
better act on this operation soon, right?  That's a special case too :)

Anyway, sure, this is fine, I'll go add this to the driver-bk tree.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] add TIMEOUT to firmware_class hotplug event
  2005-03-17  2:34 [PATCH] add TIMEOUT to firmware_class hotplug event Kay Sievers
  2005-03-17  5:46 ` Greg KH
@ 2005-03-17 23:56 ` Greg KH
  1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2005-03-17 23:56 UTC (permalink / raw)
  To: Kay Sievers; +Cc: linux-kernel, Hannes Reinecke

On Thu, Mar 17, 2005 at 03:34:31AM +0100, Kay Sievers wrote:
> On Tue, 2005-03-15 at 09:25 +0100, Hannes Reinecke wrote:
> > The current implementation of the firmware class breaks a fundamental
> > assumption in udevd: that the physical device can be initialised fully
> > prior to executing the next event for that device.
> 
> Here we add a TIMEOUT value to the hotplug environment of the firmware
> requesting event. I will adapt udevd not to wait for anything else, if
> it finds a TIMEOUT key.
> 
> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>

Applied, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-03-18  0:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-17  2:34 [PATCH] add TIMEOUT to firmware_class hotplug event Kay Sievers
2005-03-17  5:46 ` Greg KH
2005-03-17 11:07   ` Kay Sievers
2005-03-17 22:55     ` Greg KH
2005-03-17 23:56 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox