PnP child device upbringing

Hi there :
I have the following problem : a PnP bus driver I wrote is working ok . I
try to add a child device driver (pseudo device ) by
creating a PDO for the child and calling IoInvalidateDeviceRelations() .
I supply HwId and CmpatibleId .
It works fine on some win2000 machines and does not on others . When I look
at the PnP Irps flow I see that the citical point is after the DriverEntry
of the
child device is called . At the Bus driver I then get the following Irps
( sent with the child PDO) :

  1. IRP_MN_FILTER_RESOURCE_REQUIREMENTS which I complete intact as in the
    DDK toaster example (see there buspdo.c). I notice
    though that the Irp->Iostatus.Status is 0 (success) but
    IoStatus.Information is not NULL ! (should I modify it ? the calling
    PnP manager might think that a meaningful info is returned )

  2. IRP_MN_QUERY_INTERFACE - comes to the Bus driver with the child PDO .
    I complete it there with STATUS_NOT_IMPLEMENTED
    (or
    should it be STATUS_NOT_SUPPORTED) . The toaster Buspdo.c example either
    handles it
    or declares it unsupported . I do not use
    GUID for the child for now so I unsupport .

  3. IRP_MN_QUERY_INTERFACE comes to the Busdriver with the bus driver FDO
    !!! ( from the PnP manager . not from the Child which is
    above on the stack ) . I pass it down to the NextLowerDriver (bus
    driver PDO) and it comes back (after completion ) with
    STATUS_NOT_IMPLEMENTED and I return . I get another such Irp to the
    Busdriver FDO with same results (unreasonable !)

  4. IRP_MN_START_DEVICE - comes to the BusDriver with the child PDO . This
    is ok , but appears only on some computers and in these cases the
    child is finally up and works ok . On other win2000 computers I get
    instead IRP_MN_QUERY_STOP_DEVICE with the BusDriver FDO
    which is passed to the Next lower driver and finally the bringup fails
    . The device Manager syas the child fialed to install because lack of
    resources .

Note : similar Irps (in that order ) are received when I run the toaster
DDK example (maybe with one IRP_MN_QUERY_INTERFACE to the Busdriver FDO)
.
Any explanation what is wrong

thanks

Zvi

Okay, this is probably a stupid question, but you aren’t doing this with
DriverVerifier and low resource simulation turned on are you?

Next, try to determine, using a kernel debugger, where exactly in your start
handler you are failing to get resources. This will probably lead you to a
cure.


Bill McKenzie
Windows DDK MVP
OSR - Windows System Software Development, Training, and Consulting

“Zvi Dubitzky” wrote in message news:xxxxx@ntdev…
>
> Hi there :
> I have the following problem : a PnP bus driver I wrote is working ok . I
> try to add a child device driver (pseudo device ) by
> creating a PDO for the child and calling IoInvalidateDeviceRelations() .
> I supply HwId and CmpatibleId .
> It works fine on some win2000 machines and does not on others . When I
look
> at the PnP Irps flow I see that the citical point is after the
DriverEntry
> of the
> child device is called . At the Bus driver I then get the following Irps
> ( sent with the child PDO) :
>
> 1. IRP_MN_FILTER_RESOURCE_REQUIREMENTS which I complete intact as in the
> DDK toaster example (see there buspdo.c). I notice
> though that the Irp->Iostatus.Status is 0 (success) but
> IoStatus.Information is not NULL ! (should I modify it ? the calling
> PnP manager might think that a meaningful info is returned )
>
> 2. IRP_MN_QUERY_INTERFACE - comes to the Bus driver with the child PDO .
> I complete it there with STATUS_NOT_IMPLEMENTED
>
(or
> should it be STATUS_NOT_SUPPORTED) . The toaster Buspdo.c example either
> handles it
> or declares it unsupported . I do not use
> GUID for the child for now so I unsupport .
>
> 3. IRP_MN_QUERY_INTERFACE comes to the Busdriver with the bus driver
FDO
> !!! ( from the PnP manager . not from the Child which is
> above on the stack ) . I pass it down to the NextLowerDriver (bus
> driver PDO) and it comes back (after completion ) with
> STATUS_NOT_IMPLEMENTED and I return . I get another such Irp to the
> Busdriver FDO with same results (unreasonable !)
>
> 4. IRP_MN_START_DEVICE - comes to the BusDriver with the child PDO .
This
> is ok , but appears only on some computers and in these cases the
> child is finally up and works ok . On other win2000 computers I get
> instead IRP_MN_QUERY_STOP_DEVICE with the BusDriver FDO
> which is passed to the Next lower driver and finally the bringup fails
> . The device Manager syas the child fialed to install because lack of
> resources .
>
> Note : similar Irps (in that order ) are received when I run the toaster
> DDK example (maybe with one IRP_MN_QUERY_INTERFACE to the Busdriver FDO)
> .
> Any explanation what is wrong
>
> thanks
>
> Zvi
>
>
>
>
>
>