WdfUsbTargetDeviceAllocAndQueryString returns STATUS_NO_SUCH_DEVICE?

Hi All,

I have encountered strange behavior on an HT Laptop with NVidia’s EHCI, Vista Home Premium OS.
After resuming from Hibernate, I can see the entrance of my EvtDeviceD0Entry func, so I can be sure that my device entered D0. However, when my driver calls for WdfUsbTargetDeviceAllocAndQueryString, I get an error STATUS_NO_SUCH_DEVICE.
This doesn’t occur on other laptops or PCs in our lab (The laptop model is HP Pavilion tx 2000, if it does make sense to any body).
It doesn’t have neither FireWire port, nor serial, so I cannot attach it to WinDbg. I can run IRP tracker on this machine, but in fact I’m not sure how to capt the right IRP.

Any suggestions how to check where the failure is?

Thanks,
S.

What does !wdfkd.wdflogdump say? Why are you querying a device string in d0entry()? That sounds more like a preparehardware() type of operation.

d

sent from a phpne with no keynoard

-----Original Message-----
From: xxxxx@gmail.com
Sent: May 18, 2010 11:35 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WdfUsbTargetDeviceAllocAndQueryString returns STATUS_NO_SUCH_DEVICE?

Hi All,

I have encountered strange behavior on an HT Laptop with NVidia’s EHCI, Vista Home Premium OS.
After resuming from Hibernate, I can see the entrance of my EvtDeviceD0Entry func, so I can be sure that my device entered D0. However, when my driver calls for WdfUsbTargetDeviceAllocAndQueryString, I get an error STATUS_NO_SUCH_DEVICE.
This doesn’t occur on other laptops or PCs in our lab (The laptop model is HP Pavilion tx 2000, if it does make sense to any body).
It doesn’t have neither FireWire port, nor serial, so I cannot attach it to WinDbg. I can run IRP tracker on this machine, but in fact I’m not sure how to capt the right IRP.

Any suggestions how to check where the failure is?

Thanks,
S.


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

Hi Doron,

Thanks for the reply. That laptop has neither serial nor firewire ports, so I couldn’t connect WinDbg.

Why are you querying a device string in d0entry()? That sounds more like a preparehardware() type
of operation.
PrepareHardware is not called after resuming from hibernate, only d0 entry does. I changed my code to store the value in the driver context, and then another WDF API returned with the same error.

Only I could do is to work-around it by resetting the USB port in case it occurs. From some reason, the error occurred on 2 specific laptops with specific version of Vista OS.

Thanks,
S.