lkml.org 
[lkml]   [2009]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] driver core: remove polling for driver_probe_done(v2)
From
2009/1/30 Cornelia Huck <cornelia.huck@de.ibm.com>:
> On Fri, 30 Jan 2009 10:31:42 +0800,
> tom.leiming@gmail.com wrote:
>
>
>> /**
>> + * driver_wait_probe_done_and_dev_appear
>> + * wait until the probe sequence is finished _and_ the dev @name appears.
>> + *
>> + */
>> +void driver_wait_probe_done_and_dev_appear(char *name)
>> +{
>> + pr_debug("%s: probe_count = %d\n", __func__,
>> + atomic_read(&probe_count));
>> +
>> + wait_event(probe_waitqueue, (atomic_read(&probe_count) == 0) &&
>> + name_to_dev_t(name));
>
> probe_waitqueue is only woken at the end of really_probe(), not when
> whatever needs to be done to make the device available is done...

Yes.

If probing done does not mean the device is available, this patch should be
ignored or fixed further.

But polling is really not good, is there a approach to avoid the polling for
appearence of the root device?

Thanks!

>
>> +}
>> +/**
>> * driver_probe_device - attempt to bind device & driver together
>> * @drv: driver to bind a device to
>> * @dev: device to try to bind to the driver
>



--
Lei Ming


\
 
 \ /
  Last update: 2009-01-30 11:21    [W:1.378 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site