Matching problems
Richard Hughes
hughsient at gmail.com
Tue Jun 5 15:22:42 PDT 2007
On Tue, 2007-06-05 at 22:54 +0100, Bastien Nocera wrote:
>
> > This leads me to think that we are not actually waiting for the dmi
> > prober to finish before we do the fdi scanning, and are thus not
> > matching.
>
> Isn't this the same problem we talked about a couple of weeks ago? If
> so, it's just that the race condition got more acute.
No, I think we've just misunderstood the problem; I was on the money a
few weeks ago when I mentioned it with you:
1. We create computer with:
device udi = /org/freedesktop/Hal/devices/computer
system.kernel.name = 'Linux' (string)
system.kernel.machine = 'i686' (string)
info.bus = 'unknown' (string)
info.udi = '/org/freedesktop/Hal/devices/computer' (string)
info.subsystem = 'unknown' (string)
info.product = 'Computer' (string)
system.kernel.version = '2.6.21-1.3194.fc7' (string)
2. We then add devices using coldplug_synthesize_events, doing
di_search_and_merge on each one as they are added.
3. We then run the probers and wait until they finish.
4. We then run di_search_and_merge on the computer device in
computer_probing_helper_done.
Now, the display matching quirks work because the device they are added
to is not a device added by coldplug (but computer itself), and thus
step 4 matches them and merges them. The laptop_panel quirks do not work
as the new device is added and di_search_and_merge'd before the probers
have finished, and we do not rescan devices doing absolute references
after step 4.
Let me do some more testing to verify, and see if I can come up with a
fix that doesn't break lots of other stuff.
I'm not sure if we can just do one of:
* coldplug after the probers:
* di_search_and_merge just absolute device
* di_search_and_merge every device
Let me play.
Richard.
More information about the hal
mailing list