lkml.org 
[lkml]   [2011]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] drivercore: Add driver probe deferral mechanism
Date
On Tuesday 05 July 2011, Greg KH wrote:
> > * go through all initcalls, record any devices that are not yet ready
> > * retry all devices on the list as long as at least one of them has
> > succeeded.
> > * when a new device gets matched from a module load, do that loop again
>
> You don't know when init calls are finished, or if a module is loaded,
> the driver core isn't that smart at all.

We know when most initcalls are finished (at late_initcall time), and
after that we don't need to know when a module gets loaded, only
when a device gets matched, and that's something we do know and
that Grant's patch uses already.

> > late_initcall(retry_devices);
>
> I wonder if doing this all from a workqueue in the first place is going
> to cause problems as probe isn't normally done this way at all.

True. It will definitely cause problems for any driver that calls
flush_work() in its probe function. We would need a private
singlethread_workqueue to avoid that.

Arnd


\
 
 \ /
  Last update: 2011-07-05 18:07    [from the cache]
©2003-2011 Jasper Spaans