Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware before hibernation/suspend

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Michael-Luke Jones
Date: Monday, May 28, 2007 - 1:48 am

On 28 May 2007, at 08:43, Rafael J. Wysocki wrote:


[added Rob Landley to CC]

I think asynchronous loading should be made the default behaviour.  
However, we need to think and document how to do firmware loading.

Firmware loading can be done at two different times:
Device Driver Load
First use of Device Driver

For a network device, this correlates to when the driver is first  
loaded into memory or at 'ifconfig up' respectively.

At device driver load, firmware loading must be asynchronous. This is  
because device driver init can occur before userspace runs and  
registers a hotplug/uevent event handler. If device use is attempted  
before firmware loads, a -ENOFIRMWARE call would be great so that  
userspace and thus the user can be clearly informed what the problem is.

However, at 'first use' firmware loading, the synchronous interface  
should remain. 'ifconfig up' either works or it doesn't, and as I see  
it, has to just hang around until firmware turns up.

One more thing, it seems that the asynchronous firmware loading  
thread just spawns a _request_firmware() call which then times out at  
60 seconds. I think, if the first request fails it spawns another. 60  
seconds is *far* too long for this type of thing, and this was set at  
10 seconds before the last two kernel releases (which is even a bit  
slow itself). Unfortunately, this appears to a case of quite senior  
kernel developers pushing a bodge upstream rather than fixing the  
underlying issue :( [1] [2]

Documentation for how hotplug/uevent handlers should cope with these  
types of firmware loading is also *strongly* requested, in order for  
lightweight but fully functional implementations to be made.

Documentation > Reference Implementation :)

Michael-Luke

[1] http://tinyurl.com/2colng (git.kernel.org)
[2] http://tinyurl.com/224h54 (redhat bugzilla)

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC][PATCH -mm 0/3] PM: Hibernation and suspend notifiers, Rafael J. Wysocki, (Sun May 27, 1:29 pm)
[RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers, Rafael J. Wysocki, (Sun May 27, 1:30 pm)
[RFC][PATCH -mm 2/3] PM: Disable usermode helper before hi ..., Rafael J. Wysocki, (Sun May 27, 1:30 pm)
[RFC][PATCH -mm 3/3] PM: Disable _request_firmware before ..., Rafael J. Wysocki, (Sun May 27, 1:31 pm)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ..., Michael-Luke Jones, (Sun May 27, 1:45 pm)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ..., Rafael J. Wysocki, (Sun May 27, 2:45 pm)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ..., Rafael J. Wysocki, (Sun May 27, 2:55 pm)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ..., Rafael J. Wysocki, (Sun May 27, 3:01 pm)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ..., Rafael J. Wysocki, (Mon May 28, 12:43 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ..., Rafael J. Wysocki, (Mon May 28, 12:44 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ..., Michael-Luke Jones, (Mon May 28, 1:48 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ..., Michael-Luke Jones, (Mon May 28, 3:26 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ..., Michael-Luke Jones, (Mon May 28, 3:41 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ..., Rafael J. Wysocki, (Mon May 28, 4:22 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ..., Rafael J. Wysocki, (Mon May 28, 4:28 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ..., Michael-Luke Jones, (Mon May 28, 4:38 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ..., Michael-Luke Jones, (Mon May 28, 5:07 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ..., Michael-Luke Jones, (Mon May 28, 5:26 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ..., Michael-Luke Jones, (Mon May 28, 6:10 am)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers, Rafael J. Wysocki, (Mon May 28, 10:26 am)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers, Rafael J. Wysocki, (Mon May 28, 10:29 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ..., Rafael J. Wysocki, (Mon May 28, 10:43 am)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers, Rafael J. Wysocki, (Tue May 29, 3:24 pm)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers, Rafael J. Wysocki, (Wed May 30, 1:44 pm)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers, Rafael J. Wysocki, (Wed May 30, 2:11 pm)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers, Rafael J. Wysocki, (Wed May 30, 10:42 pm)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers, Rafael J. Wysocki, (Wed May 30, 10:44 pm)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers, Rafael J. Wysocki, (Thu May 31, 1:02 pm)
Re: [RFC][PATCH -mm 1/2] PM: Introduce hibernation and sus ..., Rafael J. Wysocki, (Mon Jun 4, 12:56 am)