A filter driver with bus enumeration capabilities: aka serenum.

A filter driver with bus enumeration capabilities: aka serenum.

Post by bSBuYXZhY » Wed, 08 Oct 2008 00:53:01


A filter driver with bus enumeration capabilities: aka serenum.

I need to write a custom serial enumerator that can discover custom devices
on the serial port.
In the past I've written this based on serenum, and it works. But, now I
want to convert it to KMDF based on Toaster Bus. How can a driver be a
complete pass thru filter (for all i/o, create/close, power, pnp) and
enumerate childeren at the same time?

thanks in advance,

--
m navab
 
 
 

A filter driver with bus enumeration capabilities: aka serenum.

Post by Doron Hola » Wed, 08 Oct 2008 06:21:55

Yes, it is possible, but with one caveat. Since your filter is not the
power policy owner for the stack, it cannot ensure that when the child is
powered up that the parent stack is also powered up....BUT...for serial that
does not really matter b/c once you send the create to the serial stack from
the child stack, serial will stay powered on until it has been closed.

1) mark yourself as a filter, WdfFdoInitSetFilter
2) create a WDFCHILDLIST, you cannot use the built in FDO child list since
you are not the PPO, by calling WdfChildListCreate
3) mark a description id as present and you now have a child

The kbfiltr example in the wdk shows how to do exactly this, it is an upper
filter which enumerates a raw PDO

d


--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.