To support selective suspend feature, the driver needs to submit an idle
request Irp with IOCTL_INTERNAL_USB_SUBMIT_IDLE_NOTIFICATION
device I/O control code. This idle request Irp will not be returned until
it's cancelled or some other conditions. Currently, I never see the status
is
success when the complete routine is called. What kind of condition will
cause the status is success?

The complete routine will power on the device if the status is not success.
If I try to suspend the system when the device has been in suspended mode ,
the idle request Irp is also cancelled. The complete routine try to power on
the
device since the status is not success. However, the system is currently
trying
to suspend. They will conflict!!

If the complete routine power on the device before system suspend, it will
be OK since the device will be power down again. However, if the complete
power on the device after the system suspend, the system suspend will fail.
I think the complete routine should not power on the device in this case.
However, how do I know the idle request Irp is cancelled is due to system
suspend?

What should be the correct sequence for this condition??

Best Regards

Jackal Huang

RE: How to handle system suspend when the device has been in selective suspend mode? by anonymous

anonymous
Mon Feb 09 04:26:14 CST 2004

It may be the case that any of the lower drivers in the driver stack for the device is not supporting/handling the idle request IRP or it might pend the IRP. On completion or cancellation of this IRP will return the status SUCCESS

You should not power on the device in the completion routine. Driver should post a WaitWake IRP with a callback. When the device is ready to wakeup, the USB HUB driver will completes the posted WaitWake IRP and the callback function is called. You should set the full power mode here

Refer this for further information. I hope this will be useful for you
www.intel.com/design/mobile/platform/downloads/ Power_Saving_USB_Selective_Suspend.pd

Raghavendra Kalluray


----- Jackal Huang wrote: ----

To support selective suspend feature, the driver needs to submit an idl
request Irp with IOCTL_INTERNAL_USB_SUBMIT_IDLE_NOTIFICATIO
device I/O control code. This idle request Irp will not be returned unti
it's cancelled or some other conditions. Currently, I never see the statu
i
success when the complete routine is called. What kind of condition wil
cause the status is success

The complete routine will power on the device if the status is not success
If I try to suspend the system when the device has been in suspended mode
the idle request Irp is also cancelled. The complete routine try to power o
th
device since the status is not success. However, the system is currentl
tryin
to suspend. They will conflict!

If the complete routine power on the device before system suspend, it wil
be OK since the device will be power down again. However, if the complet
power on the device after the system suspend, the system suspend will fail
I think the complete routine should not power on the device in this case
However, how do I know the idle request Irp is cancelled is due to syste
suspend

What should be the correct sequence for this condition?

Best Regard

Jackal Huan