[ofw] RE: ibal pnp question
Fab Tillier
ftillier at windows.microsoft.com
Thu Dec 4 10:00:16 PST 2008
>> I'm debugging WinMad and hitting into an issue where the winmad driver
>> has received pnp notification that a CA has been added and is in the D0
>> power state, but the CA is not yet known to ibal. Does anyone know
>> what Windows PnP corresponds to when IBAL is aware of a device
> existing?
>
> The best that I can tell is that there is no correlation between a
> Windows AddDevice PnP event and an IBAL AddDevice PnP event. Does
> anyone know the code well enough to confirm this?
They aren't correlated. However, the HCA driver registers itself with IBAL from its start device handler I believe, and that will queue a CA_ADD IBAL PnP event for processing. So the Windows PnP event triggers the IBAL PnP event, but there's no synchronization between the two - the IBAL PnP event could lag the Windows one by an indeterminate amount.
> Can an IBAL
> AddDevice PnP event occur after the device has been removed? (It
> looks like it to me, but I may not be seeing where that
> synchronization is.)
No. When pnp_ca_event runs for CA_ADD, a reference is taken on the ci_ca object. That reference is released after the async callback item for CA_REMOVE has run. This effectively prevents the ci_ca from being destroyed until the IBAL PnP event queue is drained (at least through the CA_REMOVE event).
-Fab
More information about the ofw
mailing list