lkml.org 
[lkml]   [2012]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: A workaround for request_firmware() stuck in module_init
From
Date
On Thu, 2012-09-06 at 00:18 +0100, Alan Cox wrote:
> > But then you have cases where probe() -> register_with_my_subsystem() ->
> > open(). Network devices come to mind. IE. udev must be able to deal with
> > a synchronous firmware load from probe I'm afraid.
>
> I don't believe so. You have
>
> begin probe
> find match .. .firmware_name is set
> issue firmware load request
> set defer flag
> end probe
>
> Later..
>
> firmware load complete
> kick probe up arse
>
> begin probe
> find match .. .firmware is loaded
> call ->probe()
> register
> open
> happiness
> end probe

Ok, so this is my fault for picking the thread half way through and
missing the crucial point ... deferring probe() itself. BTW. Deferring
probe is useful for other things.

I've long advocated this as a way to deal with various soft dependencies
between services for example. Cases of a driver hooking up to two or 3
different busses, and wanting all the bits to be actually probed &
connected to each other in order, that sort of thing.

This can be done by defining the initialization order, have the "late"
ones defer when the depend aren't initialized yet, and kick probe arse
from bus notifiers (tho that could be moved to the core via some
helpers).

Cheers,
Ben.





\
 
 \ /
  Last update: 2012-09-06 07:42    [W:0.044 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site