none
USB device CANNOT resume from sleep and hibernation RRS feed

  • Question

  • To Support Team,

    I developing WDM USB device driver for PCSC smartcard reader. I encountered a problem of USB device cannot resume from sleep and hibernation.

    Here are the steps

    1. Running a stress test (for loop do ScardConnect, ScardTransmit and ScardDisconnect)

    2. Stress test still running, Sleep or hibernate PC.

    3. Wake up PC from Sleep or hibernate, Windows Hang need to restart it.

    But if we stop the stress test before Sleep or hibernate PC then it working well after wake up from sleep or hibernate.

    This problem only happen on windows 7,8 32 bit and 64 bits. XP and Visa working well

    Please advise.

    Thanks,


    Wednesday, March 19, 2014 9:44 AM

All replies

  • My guess is that it has something to do with IRP_MJ_POWER handling, such as incorrect status that is being returned by DispatchPower routine. If I was in your place I would add as many debug prints as I can to the power events handling code and connect with WinDbg via serial cable to see the debug messages on a remote machine.

    One more thing that I would check is that all the USB requests are properly canceled when a power event arrives. Not canceling USB requests before sleep/hibernate can cause such behavior.


    Ian Bakshan, Sr. Software Engineer at Jungo Connectivity LTD
    WinDriver – Driver Development Tool
    DriverCore – PC USB Drivers



    • Edited by Ian Bakshan Wednesday, March 19, 2014 2:31 PM
    Wednesday, March 19, 2014 2:11 PM
  • you need to attach a debugger and analyze the problem. I would suggest you stop using WDM and create a KMDF based smart card driver instead. this will probably eliminate another set of issues in your WDM driver which you have yet to uncover.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, March 19, 2014 7:12 PM