Hello
I'm writing usb function drivers. The usb device is a composite device
with 4 interfaces. The device supports remote wake-up. 1 driver
services 1 interface, another the 3 other interfaces. I'm running on
WinXP SP 2.
When the device is idle for 3 seconds, the drivers send down a idle
request on each interface. After that, the callback routine of the idle
request is called for each device. Each device sends down a wait wake
irp and transitions to device power state D2.
At this point, I can surprise-remove the device, I can disable the
composite driver (to imitate safe removal), I can go to standby, I can
hibernate, but I can't shut the system down. When the system goes to
S5, something hangs in the USBD.
I've tried to cancel the idle request in the power dispatch routine for
"Set S5", but the IoCancelIrp() never returns. I've tried not to
cancel, but then the usbd gets stuck when I abort a bulk out pipe.
When I shut down without the device in selective suspend mode,
everything is okay.
What am I doing wrong ?