Re: WdfFdoAddStaticChild not called by bus driver for child device

Tech-Archive recommends: Speed Up your PC by fixing your registry



that was from the v1.1 DDK overlay. perhaps you are looking in the dynamic
version, but the static version of busenum definitely calls this API

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.


"wenhua" <wenhua@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5D2081C6-E743-41A3-8B28-CCD30134B0B5@xxxxxxxxxxxxxxxx
Maybe you the latest WDF. What I looked came from WDF DDK 1.1 and WDK
5384,
both buspdo.c don't call WdfFdoAddStaticChild in Bus_CreatePdo. The
buspdo.c
in WDF DDK 1.1 has the file date 04/20/2006, the buspdo.c in WDK 5384 has
the
file date 05/18/2006.

Actually, I searched the whole WDF sample code directories, only one
driver
calls this function, but not toaster bus driver.

Wenhua

"Doron Holan [MS]" wrote:

look in buspdo.c, Bus_CreatePdo()

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.


"wenhua" <wenhua@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A1DD7D9D-EF96-4AE8-A618-7F087E5AB687@xxxxxxxxxxxxxxxx
I was reading the static sample code, I didn't see WdfFdoAddStaticChild
called after WdfDeviceCreate is called.

For dynamic enumeration, I know it's another Wdf function.

"Doron Holan [MS]" wrote:

there are 2 models for bus enumeration in KMDF. static and dynamic.
static
is for devices that do not come and go alot, you know what you are
going
to
enumerate when you load. dynamic is for devices that come and go
based
on
HW or user mode events. static uses WdfFdoAddStaticChild, dynamic
uses
a
WDFCHILDLIST object. the busenum sample shows both models,
src\kmdf\toaster\bus\dynamic and src\kmdf\toaster\bus\static

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.


"wenhua" <wenhua@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:28611909-C16D-4317-AF0B-638CD6CF1CBC@xxxxxxxxxxxxxxxx
I was reading WDF document. The document says to enumerate the
devices
on a
bus, after calling WdfDeviceCreate to create a framework device
object
that
represents a PDO, the bus driver must call WdfFdoAddStaticChild to
add
the
child device to the child list.

As a bus driver, in WDM model, the bus driver needs to call
IoInvalidateDeviceRelations to let PNP manager a new device is
present
on
the
bus so that PNP manager can start the device configuration. So I
guess
in
framework WdfFdoAddStaticChild will call
IoInvalidateDeviceRelations,
that's
why it must be called after calling WdfDeviceCreate.

But looking the WDF sample driver source, the toaster bus driver
doesn't
call this function. Because I assume toaster bus dirver should work
just
like
its WDM version, I wonder why the WdfFdoAddStaticChild is not called
by
toaster bus driver.

Wenhua









.



Relevant Pages

  • Re: WdfFdoAddStaticChild not called by bus driver for child device
    ... Maybe you the latest WDF. ... both buspdo.c don't call WdfFdoAddStaticChild in Bus_CreatePdo. ... but not toaster bus driver. ... Please do not send e-mail directly to this alias. ...
    (microsoft.public.development.device.drivers)
  • Re: WdfFdoAddStaticChild not called by bus driver for child device
    ... Please do not send e-mail directly to this alias. ... This posting is provided "AS IS" with no warranties, ... the bus driver must call WdfFdoAddStaticChild to add ... As a bus driver, in WDM model, the bus driver needs to call ...
    (microsoft.public.development.device.drivers)
  • Re: IRP_MN_REMOVE not getting called
    ... the handle can be opened on a child device below usbstor. ... Please do not send e-mail directly to this alias. ... With my driver there's only one call, made from my virtual bus driver ... ChildEBP RetAddr Args to Child ...
    (microsoft.public.development.device.drivers)
  • Re: IRP_MJ_SCSI
    ... Please do not send e-mail directly to this alias. ... I need to write a bus driver for a customer storage controller chip. ... KMDF framework for writing this driver. ...
    (microsoft.public.development.device.drivers)
  • Re: Device Instace ID
    ... a bus driver supplies the device's device ID. ... INFs match ... Please do not send e-mail directly to this alias. ... directly from the device hardware itself. ...
    (microsoft.public.development.device.drivers)