X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fdrivers%2Fbus%2Fpcix%2Fdebug.c;h=1f119c274db958b134c823c69b1c81a87fb14f9e;hp=f3a9930a880349968de2e0410ee22a00bf158c87;hb=af01479fbfc43d41eb62ef48643a4451d861f240;hpb=912704ceb87cec9705e6ff8901749e87086aad7a diff --git a/reactos/drivers/bus/pcix/debug.c b/reactos/drivers/bus/pcix/debug.c index f3a9930a880..1f119c274db 100644 --- a/reactos/drivers/bus/pcix/debug.c +++ b/reactos/drivers/bus/pcix/debug.c @@ -49,6 +49,26 @@ PCHAR PoCodes[] = "QUERY_POWER", }; +PCHAR SystemPowerStates[] = +{ + "Unspecified", + "Working", + "Sleeping1", + "Sleeping2", + "Sleeping3", + "Hibernate", + "Shutdown" +}; + +PCHAR DevicePowerStates[] = +{ + "Unspecified", + "D0", + "D1", + "D2", + "D3" +}; + ULONG PciBreakOnPdoPowerIrp, PciBreakOnFdoPowerIrp; ULONG PciBreakOnPdoPnpIrp, PciBreakOnFdoPnpIrp; @@ -194,4 +214,41 @@ PciDebugDumpCommonConfig(IN PPCI_COMMON_HEADER PciData) } } +VOID +NTAPI +PciDebugDumpQueryCapabilities(IN PDEVICE_CAPABILITIES DeviceCaps) +{ + ULONG i; + + /* Dump the capabilities */ + DPRINT1("Capabilities\n Lock:%d, Eject:%d, Remove:%d, Dock:%d, UniqueId:%d\n", + DeviceCaps->LockSupported, + DeviceCaps->EjectSupported, + DeviceCaps->Removable, + DeviceCaps->DockDevice, + DeviceCaps->UniqueID); + DbgPrint(" SilentInstall:%d, RawOk:%d, SurpriseOk:%d\n", + DeviceCaps->SilentInstall, + DeviceCaps->RawDeviceOK, + DeviceCaps->SurpriseRemovalOK); + DbgPrint(" Address %08x, UINumber %08x, Latencies D1 %d, D2 %d, D3 %d\n", + DeviceCaps->Address, + DeviceCaps->UINumber, + DeviceCaps->D1Latency, + DeviceCaps->D2Latency, + DeviceCaps->D3Latency); + + /* Dump and convert the wake levels */ + DbgPrint(" System Wake: %s, Device Wake: %s\n DeviceState[PowerState] [", + SystemPowerStates[min(DeviceCaps->SystemWake, PowerSystemMaximum)], + DevicePowerStates[min(DeviceCaps->DeviceWake, PowerDeviceMaximum)]); + + /* Dump and convert the power state mappings */ + for (i = PowerSystemWorking; i < PowerSystemMaximum; i++) + DbgPrint(" %s", DevicePowerStates[DeviceCaps->DeviceState[i]]); + + /* Finish the dump */ + DbgPrint(" ]\n"); +} + /* EOF */