Hi,
I have a standalone device (musical equipment) which can be configured via USB2. It has two 64 byte bulk endpoints (IN and OUT) in its only configuration and single interface, and only supports power state D0 (well, and OFF of cause).
My host test application opens our KMDF driver, which selects the USB configuration, opens its two pipes and communicates with it.
This all works well (including (surprise) device arrival/removal, etc.).
Under W7 after sending the host to sleep (canceling all outstanding I/O if any) and keeping the pipes open, the drivers IRPs to the USB don?t get handled anymore in its EvtDeviceD0Entry. They don?t appear on the USB bus and are not finalised by the stack.
If a work item is scheduled from EvtDeviceD0Entry instead, its possible to send normal USB read/write requests. However an attempt to send either a URB_FUNCTION_SYNC_RESET_PIPE_AND_CLEAR_STALL or its KMDF equivalent WdfUsbTargetPipeResetSynchronously will hang without any activity seen on the USB bus. (I have also tried to send the requests from EvtDeviceSelfManagedIoInit/EvtDeviceSelfManagedIoRestart instead.)
Under W10 even read/write transaction requests are not send/finalized wether deferred or sent directly from EvtDeviceD0Entry.
From the bus log I assume the device itself reacts correctly to all configuration/device descriptor request after the host wakes up. There are no errors in the bus communication seen.
When the host goes to sleep without any open user mode handles to the kernel driver (no open pipes) the system can sleep/wake and the test application can be started again with successful USB communication.
Thats why I test-wise tried to “iterate” over the interface and create new pipes handles after the system waking up. I did not try to re-send a configuration request, yet. (But I do see the bus driver correctly does so.)
I am running out of ideas what else to check now, I am very thankful for any (even vage) hints what to look for.
Thanks and cheers,
Hagen.