Susppend and Wakeup for Usb

Following is my flow for suspend and Wait/Wakeup action.

  1. On device idle detection

  2. Send “IOCTL_INTERNAL_USB_SUBMIT_IDLE_NOTIFICATION” to Bus driver
    Set SS_CallBack and SS_CompletionRoutine.

  3. In CallBack, Set for IRP_MN_WAIT_WAKE with WW_callback and WW_completionRoutine,

  4. IRP_MN_WAIT_WAKE is returned by the Bus driver with STATUS_NOT_SUPPORTED (My device attributes does say it doesn’t support it), even then I want to suspend my device so, in WW_callback, set the device power to D2 or D3 using IRP_MN_SET_POWER.

Now the device is in IDEL/SUSPEND mode.

Can anyone give me some comments or points to take care for Suspend and Wait/wakeup operation?

If I check the device capabilities for current device power it still says D0.
Does CallBack routines will be invoked before Completion Routines all the time?

Thanks,