Re: A workaround for request_firmware() stuck in module_init
From: Benjamin Herrenschmidt
Date: Wed Sep 05 2012 - 17:09:27 EST
On Wed, 2012-09-05 at 17:30 +0100, Alan Cox wrote:
>
> > Linus has said that he doesn't like to load firmware in probe(), but
> in some
> > situation the drivers have to load firmware in its probe():
>
> You don't want to load firmware in probe because of the locking
> problems
> - you can trigger a load of another device on the same bus - the defer
> dodges that nicely
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.
The only other option would be to make full operation of the driver
delayed even from open(), which is possible with network devices at
least but generally very complex to implement.
Cheers,
Ben.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/