Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV

Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


Wake from D3Cold Support in USB Driver Windows 10/11

prasad_bmprasad_bm Member Posts: 8

Hi All,

I'm working on supporting D3Cold and wake from D3Cold for the USB H/W we are developing.
From the USB Descriptor the HW/FW is supporting the D3 cold. The USB Bridge Driver for the device is supporting upto D2 State.
When the System is put into Sleep we See the D0Exit() entry point is called with the D2 State not D3.
This Puts the USB into selective suspend state.
ACPI changes indicate that the device supports D3Cold State. which will invoke the _PR3 _OFF function to turn off power to the device, Causing USB to be disconnected.

Question is For supporting D3Cold in USB the PPO driver in this case USB Bridge driver should also be supporting the D3 Cold State?

1]0004.0010::10/26/2023-22:11:04.482 [usbxhci]2.0 Port 5, Feature Selector 16, Feature Specific Value 0
[1]0004.0010::10/26/2023-22:11:04.482 [usbxhci]C_PORT_CONNECTION: Before portSC 0x000202a0
[1]0004.0010::10/26/2023-22:11:04.482 [usbxhci]C_PORT_CONNECTION: Writing portSC 0x00020200
[1]0004.0010::10/26/2023-22:11:04.482 [usbxhci]C_PORT_CONNECTION: After portSC 0x000002a0
[1]0004.0010::10/26/2023-22:11:04.482 [usbhub3]Transition for 0xFFFFA80A1554B7A0: Psm20StateAckingPortChangeInSuspended --PsmEventTransferSuccess--> Psm20StateCheckIfThereIsAPortChangeOnSuspended
[1]0004.0010::10/26/2023-22:11:04.482 [usbhub3]Transition for 0xFFFFA80A1554B7A0: Psm20StateCheckIfThereIsAPortChangeOnSuspended --PsmEventNo--> Psm20StateGettingPortStatusInSuspended
[1]0004.0010::10/26/2023-22:11:04.482 [usbhub3]Get Port 5 Status
[1]0004.0010::10/26/2023-22:11:04.482 [usbxhci]2.0 Port 5, portSC 0x000002a0
[1]0004.0010::10/26/2023-22:11:04.482 [usbxhci]PortStatus 0x0100 PortChange 0x0000
[1]0004.0010::10/26/2023-22:11:04.482 [usbhub3]PortStatus: Connect=0 HighSpeed=0 LowSpeed=0 Enable=0 Reset=0 Suspend=0 Power=1 OverCurrent=0
[1]0004.0010::10/26/2023-22:11:04.482 [usbhub3]PortStatusChange: Connect=0 Enable=0 Reset=0 Suspend=0 OverCurrent=0
[1]0004.0010::10/26/2023-22:11:04.482 [usbhub3]Transition for 0xFFFFA80A1554B7A0: Psm20StateGettingPortStatusInSuspended --PsmEventTransferSuccess--> Psm20StateCheckIfThereIsAPortChangeAfterInitialGetPortStatusOnSuspended
[1]0004.0010::10/26/2023-22:11:04.482 [usbhub3]Transition for 0xFFFFA80A1554B7A0: Psm20StateCheckIfThereIsAPortChangeAfterInitialGetPortStatusOnSuspended --PsmEventNo--> Psm20StateGettingPortChangeEventInSuspended
[1]0004.0010::10/26/2023-22:11:04.482 [usbhub3]HUBHTX_Get20PortChangeEvent: PORT_STATUS_ERROR / HubHwVerifierPortDeviceDisconnected event: PortConnectChange & CCS=0; portNum 5, prevPS 0x0107, curPS 0x0100, curPC 0x0001
[1]0004.0010::10/26/2023-22:11:04.482 [usbhub3]HUBHTX_Get20PortChangeEvent: Called HubHwVerifierPortDeviceDisconnected
[1]0004.0010::10/26/2023-22:11:04.482 [usbhub3]Transition for 0xFFFFA80A1554B7A0: Psm20StateGettingPortChangeEventInSuspended --PsmEventPortConnectChange--> Psm20StateReEnablingInterruptsOnConnectChangeInSuspended
[1]0004.0010::10/26/2023-22:11:04.482 [usbhub3]Transition for 0xFFFFA80A1554B7A0: Psm20StateReEnablingInterruptsOnConnectChangeInSuspended --PsmEventOperationSuccess--> Psm20StateCheckingIsD3ColdIsEnabled
[1]0004.0010::10/26/2023-22:11:04.482 [usbhub3]****D3ColdSupportedInAcpi 1, D3ColdEnabled 0, Removable 0, LastDxState 3********
[1]0004.0010::10/26/2023-22:11:04.482 [usbhub3]Transition for 0xFFFFA80A1554B7A0: Psm20StateCheckingIsD3ColdIsEnabled --PsmEventNo--> Psm20StateReturningPortConnectChangeFromSuspended
[1]0004.0010::10/26/2023-22:11:04.482 [usbhub3]Transition for 0xFFFFA80A1554B7A0: Psm20StateReturningPortConnectChangeFromSuspended --PsmEventNull--> Psm20StateSuspended
[1]0004.0010::10/26/2023-22:11:04.482 [usbhub3]Transition for 0xFFFFA80A1554B7A0: Psm20StateSuspended --PsmEventPortConnectChange--> Psm20StateDetachingDeviceFromPortOnDisconnect
[1]0004.0010::10/26/2023-22:11:04.482 [usbhub3]Transition for 0xFFFFA80A1741A0D0: DsmStateSuspended --DsmEventNull--> DsmStateConfiguredSuspended
[1]0004.0010::10/26/2023-22:11:04.482 [usbhub3]Transition for 0xFFFFA80A1741A0D0: DsmStateConfiguredSuspended --DsmEventPortDetachDevice--> DsmStateNotifyingDeviceDisconnectedOnDetach
[10]0004.0010::10/26/2023-22:11:04.482 [usbhub3]Transition for 0xFFFFA80A1741A0D0: DsmStateNotifyingDeviceDisconnectedOnDetach --DsmEventOperationSuccess--> DsmStateWaitingForReportedMissingOnDetachInConfigured
[10]0004.0010::10/26/2023-22:11:04.482 [usbhub3]Transition for 0xFFFFA80A1741A0D0: DsmStateWaitingForReportedMissingOnDetachInConfigured --DsmEventNull--> DsmStateWaitingForDevicePortEventsExceptStop
[10]0004.0010::10/26/2023-22:11:04.482 [usbhub3]Transition for 0xFFFFA80A1554B7A0: Psm20StateDetachingDeviceFromPortOnDisconnect --PsmEventOperationSuccess--> Psm20StateCheckingIfConnectBitOne
[10]0004.0010::10/26/2023-22:11:04.482 [usbhub3]Transition for 0xFFFFA80A1554B7A0: Psm20StateCheckingIfConnectBitOne --PsmEventNo--> Psm20StateDisconnected
[10]0004.0010::10/26/2023-22:11:04.482 [usbhub3]Transition for 0xFFFFA80A1554B7A0: Psm20StateDisconnected --PsmEventNull--> Psm20StateWaitingForPortChangeEvent
[10]0004.0010::10/26/2023-22:11:04.482 [usbhub3]Transition for 0xFFFFA80A1679A620: Psm20StateWaitingForPortChangeEvent --PsmEventHubStatusChange--> Psm20StateInitializingCumulativePortChangeBits
[10]0004.0010::10/26/2023-22:11:04.482 [usbhub3]Transition for 0xFFFFA80A1679A620: Psm20StateInitializingCumulativePortChangeBits --PsmEventOperationSuccess--> Psm20StateGettingPortStatus

Thanks,
Prasad

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 13-17 May 2024 Live, Online
Developing Minifilters 1-5 Apr 2024 Live, Online
Internals & Software Drivers 11-15 Mar 2024 Live, Online
Writing WDF Drivers 20-24 May 2024 Live, Online