HID miniport - only child pdo is visible after reboot

I have writen a driver similar to vhidmini, but using kmdf. After installing
it using devcon (as root device) I can see it in Device Manager and also its
child pdo. HID report is a multitouch device and Windows 7 is correctly
recognizes it and enables multitouch functions.
The problem starts after reboot. In Device Manager only child pdo is
visible. In “view devices by connection” pdo has no parent device, it is
direct child of root (computer). And it is no more recognized as a
multitouch device.
Someone know solution?

Are you sure it is your child PDO that is there on reboot? The much more likely conclusion I would jump to is that it is the original miniport stack (e.g. the FDO) that is present but no child is enumerated from it. when in device manager after a reboot, open up the properties of this device and look at the Details tab. Under the hardware ID and compatible ID properties does it list your hardware ID for the hid miniport or a HID\Xxxxx ID that hidclass enumerates for a child?

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Daniel Danilin
Sent: Thursday, February 12, 2009 12:09 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] HID miniport - only child pdo is visible after reboot

I have writen a driver similar to vhidmini, but using kmdf. After installing
it using devcon (as root device) I can see it in Device Manager and also its
child pdo. HID report is a multitouch device and Windows 7 is correctly
recognizes it and enables multitouch functions.
The problem starts after reboot. In Device Manager only child pdo is
visible. In “view devices by connection” pdo has no parent device, it is
direct child of root (computer). And it is no more recognized as a
multitouch device.
Someone know solution?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Hardware ID is HID\UniSoftHID, this is the name I return on
BusQueryHardwareIDs/BusQueryDeviceID.

FDO has this id - HID\VID_BEEF&PID_FEED before reboot. After reboot it’s not
there.

“Doron Holan” wrote in message
news:xxxxx@ntdev…
> Are you sure it is your child PDO that is there on reboot? The much more
> likely conclusion I would jump to is that it is the original miniport
> stack (e.g. the FDO) that is present but no child is enumerated from it.
> when in device manager after a reboot, open up the properties of this
> device and look at the Details tab. Under the hardware ID and compatible
> ID properties does it list your hardware ID for the hid miniport or a
> HID\Xxxxx ID that hidclass enumerates for a child?
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Daniel Danilin
> Sent: Thursday, February 12, 2009 12:09 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] HID miniport - only child pdo is visible after reboot
>
> I have writen a driver similar to vhidmini, but using kmdf. After
> installing
> it using devcon (as root device) I can see it in Device Manager and also
> its
> child pdo. HID report is a multitouch device and Windows 7 is correctly
> recognizes it and enables multitouch functions.
> The problem starts after reboot. In Device Manager only child pdo is
> visible. In “view devices by connection” pdo has no parent device, it is
> direct child of root (computer). And it is no more recognized as a
> multitouch device.
> Someone know solution?
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>

There is no way the child PDO can exist without the parent stack, but I am confused by what you are saying

Hardware ID is HID\UniSoftHID, this is the name I return on BusQueryHardwareIDs/BusQueryDeviceID.

A HID miniport does not answer query hw IDs or query device ID, hidclass does that.

FDO has this id - HID\VID_BEEF&PID_FEED before reboot. After reboot it’s not there.

Typically the FDO does not have a hw ID that starts with HID.…it has a hw id that is for the connectivity bus on which it is found (USB\ Bluetooth\ PCI\ etc etc).

Does the orphaned child on reboot have a compat ID or hw ID that contains the usage and other IDs generated by hidclass?

d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Daniel Danilin
Sent: Thursday, February 12, 2009 1:09 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] HID miniport - only child pdo is visible after reboot

Hardware ID is HID\UniSoftHID, this is the name I return on
BusQueryHardwareIDs/BusQueryDeviceID.

FDO has this id - HID\VID_BEEF&PID_FEED before reboot. After reboot it’s not
there.

“Doron Holan” wrote in message
news:xxxxx@ntdev…
> Are you sure it is your child PDO that is there on reboot? The much more
> likely conclusion I would jump to is that it is the original miniport
> stack (e.g. the FDO) that is present but no child is enumerated from it.
> when in device manager after a reboot, open up the properties of this
> device and look at the Details tab. Under the hardware ID and compatible
> ID properties does it list your hardware ID for the hid miniport or a
> HID\Xxxxx ID that hidclass enumerates for a child?
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Daniel Danilin
> Sent: Thursday, February 12, 2009 12:09 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] HID miniport - only child pdo is visible after reboot
>
> I have writen a driver similar to vhidmini, but using kmdf. After
> installing
> it using devcon (as root device) I can see it in Device Manager and also
> its
> child pdo. HID report is a multitouch device and Windows 7 is correctly
> recognizes it and enables multitouch functions.
> The problem starts after reboot. In Device Manager only child pdo is
> visible. In “view devices by connection” pdo has no parent device, it is
> direct child of root (computer). And it is no more recognized as a
> multitouch device.
> Someone know solution?
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Sample driver has code to filter out pnp query id for parent device (and
process it only for the child device). Not doing so would result in a
situation similar to yours. Could you confirm your code filters the parent
query id?

BTW, I sent you the KMDF version of vhidmini a little while ago.

kumar

“Daniel Danilin” wrote in message news:xxxxx@ntdev…
> Hardware ID is HID\UniSoftHID, this is the name I return on
> BusQueryHardwareIDs/BusQueryDeviceID.
>
> FDO has this id - HID\VID_BEEF&PID_FEED before reboot. After reboot it’s
> not there.
>
> “Doron Holan” wrote in message
> news:xxxxx@ntdev…
>> Are you sure it is your child PDO that is there on reboot? The much more
>> likely conclusion I would jump to is that it is the original miniport
>> stack (e.g. the FDO) that is present but no child is enumerated from it.
>> when in device manager after a reboot, open up the properties of this
>> device and look at the Details tab. Under the hardware ID and compatible
>> ID properties does it list your hardware ID for the hid miniport or a
>> HID\Xxxxx ID that hidclass enumerates for a child?
>>
>> d
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of Daniel Danilin
>> Sent: Thursday, February 12, 2009 12:09 PM
>> To: Windows System Software Devs Interest List
>> Subject: [ntdev] HID miniport - only child pdo is visible after reboot
>>
>> I have writen a driver similar to vhidmini, but using kmdf. After
>> installing
>> it using devcon (as root device) I can see it in Device Manager and also
>> its
>> child pdo. HID report is a multitouch device and Windows 7 is correctly
>> recognizes it and enables multitouch functions.
>> The problem starts after reboot. In Device Manager only child pdo is
>> visible. In “view devices by connection” pdo has no parent device, it is
>> direct child of root (computer). And it is no more recognized as a
>> multitouch device.
>> Someone know solution?
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>>
>

I have found my error, thanks to Kumar for providing KDMF version of
vhidmini.

The problem was in Preprocess method at this lines:

irpsp = IoGetCurrentIrpStackLocation(irp);
previousSp = ((PIO_STACK_LOCATION)((UCHAR*)(irpsp) +
sizeof(IO_STACK_LOCATION)));

if(previousSp->DeviceObject == WdfDeviceWdmGetDeviceObject(device))
{
status = irp->IoStatus.Status;
IoCompleteRequest(irp, IO_NO_INCREMENT);
return status;
}

but should look like this:

irpsp = IoGetCurrentIrpStackLocation(irp);
minidriverFilterSp = irpsp + 1;
hidclassSp = minidriverFilterSp + 1;

if(hidclassSp->DeviceObject == minidriverFilterSp->DeviceObject)
{
status = irp->IoStatus.Status;
IoCompleteRequest(irp, IO_NO_INCREMENT);
return status;
}

“Doron Holan” wrote in message
news:xxxxx@ntdev…
> There is no way the child PDO can exist without the parent stack, but I am
> confused by what you are saying
>
>> Hardware ID is HID\UniSoftHID, this is the name I return on
>> BusQueryHardwareIDs/BusQueryDeviceID.
>
> A HID miniport does not answer query hw IDs or query device ID, hidclass
> does that.
>
>> FDO has this id - HID\VID_BEEF&PID_FEED before reboot. After reboot it’s
>> not there.
>
> Typically the FDO does not have a hw ID that starts with HID.…it has a
> hw id that is for the connectivity bus on which it is found (USB\
> Bluetooth\ PCI\ etc etc).
>
> Does the orphaned child on reboot have a compat ID or hw ID that contains
> the usage and other IDs generated by hidclass?
>
> d
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Daniel Danilin
> Sent: Thursday, February 12, 2009 1:09 PM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] HID miniport - only child pdo is visible after reboot
>
> Hardware ID is HID\UniSoftHID, this is the name I return on
> BusQueryHardwareIDs/BusQueryDeviceID.
>
> FDO has this id - HID\VID_BEEF&PID_FEED before reboot. After reboot it’s
> not
> there.
>
> “Doron Holan” wrote in message
> news:xxxxx@ntdev…
>> Are you sure it is your child PDO that is there on reboot? The much more
>> likely conclusion I would jump to is that it is the original miniport
>> stack (e.g. the FDO) that is present but no child is enumerated from it.
>> when in device manager after a reboot, open up the properties of this
>> device and look at the Details tab. Under the hardware ID and compatible
>> ID properties does it list your hardware ID for the hid miniport or a
>> HID\Xxxxx ID that hidclass enumerates for a child?
>>
>> d
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of Daniel Danilin
>> Sent: Thursday, February 12, 2009 12:09 PM
>> To: Windows System Software Devs Interest List
>> Subject: [ntdev] HID miniport - only child pdo is visible after reboot
>>
>> I have writen a driver similar to vhidmini, but using kmdf. After
>> installing
>> it using devcon (as root device) I can see it in Device Manager and also
>> its
>> child pdo. HID report is a multitouch device and Windows 7 is correctly
>> recognizes it and enables multitouch functions.
>> The problem starts after reboot. In Device Manager only child pdo is
>> visible. In “view devices by connection” pdo has no parent device, it is
>> direct child of root (computer). And it is no more recognized as a
>> multitouch device.
>> Someone know solution?
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>