/*++
Copyright (c) Microsoft Corporation
Module Name:
DSM_AutoGen.c
Abstract:
This header file contains State Machines for USBHUB.
This has been generated automatically from a visio file.
DO NOT MODIFY THIS FILE MANUALLY.
--*/
#include <pch.h>
DSM_EVENT
HUBDSM_AckingD0ForFaultyClientDrivers(
PSM_CONTEXT SmContext
)
/*++
Routine Description:
HUBDSM_AckingD0ForFaultyClientDrivers is called when the
state machine enters the AckingD0ForFaultyClientDrivers State
Arguments:
SmContext - State Machine Context
Return Value:
DSM_EVENT
--*/
{
PDEVICE_CONTEXT deviceContext;
DSM_EVENT syncEvent;
TRY {
deviceContext = SmContext->ParentContext;
HUBPDO_SignalPnpPowerEvent(deviceContext);
syncEvent = DsmEventOperationSuccess;
} FINALLY {
}
return syncEvent;
} // HUBDSM_AckingD0ForFaultyClientDrivers
DSM_EVENT
HUBDSM_AckingHubStopAfterSuspendFromStoppedState(
PSM_CONTEXT SmContext
)
/*++
Routine Description:
HUBDSM_AckingHubStopAfterSuspendFromStoppedState is called when the
state machine enters the AckingHubStopAfterSuspendFromStoppedState State
Arguments:
SmContext - State Machine Context
Return Value:
DSM_EVENT
--*/
{
PDEVICE_CONTEXT deviceContext;
DSM_EVENT syncEvent;
TRY {
deviceContext = SmContext->ParentContext;
HUBMUX_AckStopAfterSuspend(deviceContext);
syncEvent = DsmEventOperationSuccess;
} FINALLY {
}
return syncEvent;
} // HUBDSM_AckingHubStopAfterSuspendFromStoppedState
DSM_EVENT
HUBDSM_AckingPdoPreStart(
PSM_CONTEXT SmContext
)
/*++
Routine Description:
HUBDSM_AckingPdoPreStart is called when the
state machine enters the AckingPdoPreStart State
Arguments:
SmContext - State Machine Context
Return Value:
DSM_EVENT
--*/
{
PDEVICE_CONTEXT deviceContext;
DSM_EVENT syncEvent;
TRY {
deviceContext = SmContext->ParentContext;
HUBPDO_CompletePdoPreStart(deviceContext);
HUBPDO_ClearFailIo(deviceContext);
syncEvent = DsmEventOperationSuccess;
} FINALLY {
}
return syncEvent;
} // HUBDSM_AckingPdoPreStart
DSM_EVENT
HUBDSM_AckingPdoPreStartFromStoppedEnabled(
PSM_CONTEXT SmContext
)
/*++
Routine Description:
HUBDSM_AckingPdoPreStartFromStoppedEnabled is called when the
state machine enters the AckingPdoPreStartFromStoppedEnabled State
Arguments:
SmContext - State Machine Context
Return Value:
DSM_EVENT
--*/
{
PDEVICE_CONTEXT deviceContext;
DSM_EVENT syncEvent;
TRY {
deviceContext = SmContext->ParentContext;
HUBPDO_ClearFailIo(deviceContext);
HUBPDO_CompletePdoPreStart(deviceContext);
syncEvent = DsmEventOperationSuccess;
} FINALLY {
}
return syncEvent;
} // HUBDSM_AckingPdoPreStartFromStoppedEnabled
DSM_EVENT
HUBDSM_AckingQueryResourcesInConfiguredD0(
PSM_CONTEXT SmContext
)
/*++
Routine Description:
HUBDSM_AckingQueryResourcesInConfiguredD0 is called when the
state machine enters the AckingQueryResourcesInConfiguredD0 State
Arguments:
SmContext - State Machine Context
Return Value:
DSM_EVENT
--*/
{
PDEVICE_CONTEXT deviceContext;
DSM_EVENT syncEvent;
TRY {
deviceContext = SmContext->ParentContext;
HUBPDO_SignalPnpPowerEvent(deviceContext);
syncEvent = DsmEventOperationSuccess;
} FINALLY {
}
return syncEvent;
} // HUBDSM_AckingQueryResourcesInConfiguredD0
DSM_EVENT
HUBDSM_AckingStopAfterSuspendOnDetach(
PSM_CONTEXT SmContext
)
/*++
Routine Description:
HUBDSM_AckingStopAfterSuspendOnDetach is called when the
state machine enters the AckingStopAfterSuspendOnDetach State
Arguments:
SmContext - State Machine Context
Return Value:
DSM_EVENT
--*/
{
PDEVICE_CONTEXT deviceContext;
DSM_EVENT syncEvent;
TRY {
deviceContext = SmContext->ParentContext;
HUBMUX_AckStopAfterSuspend(deviceContext);
syncEvent = DsmEventOperationSuccess;
} FINALLY {
}
return syncEvent;
} // HUBDSM_AckingStopAfterSuspendOnDetach
DSM_EVENT
HUBDSM_AcquiringPowerReferenceOnHubOnAttach(
PSM_CONTEXT SmContext
)
/*++
Routine Description:
HUBDSM_AcquiringPowerReferenceOnHubOnAttach is called when the
state machine enters the AcquiringPowerReferenceOnHubOnAttach State
Arguments:
SmContext - State Machine Context
Return Value:
DSM_EVENT
--*/
{
PDEVICE_CONTEXT deviceContext;
DSM_EVENT syncEvent;
TRY {
deviceContext = SmContext->ParentContext;
syncEvent = HUBPDO_AcquireWdfPowerReferenceOnHub(deviceContext);
} FINALLY {
}
return syncEvent;
} // HUBDSM_AcquiringPowerReferenceOnHubOnAttach
DSM_EVENT
HUBDSM_AcquiringPowerReferenceOnHubStart(
PSM_CONTEXT SmContext
)
/*++
Routine Description:
HUBDSM_AcquiringPowerReferenceOnHubStart is called when the
state machine enters the AcquiringPowerReferenceOnHubStart State
Arguments:
SmContext - State Machine Context
Return Value:
DSM_EVENT
--*/
{
PDEVICE_CONTEXT deviceContext;
DSM_EVENT syncEvent;
TRY {
deviceContext = SmContext->ParentContext;
HUBMUX_AcquireDevicePowerReference(deviceContext);
syncEvent = DsmEventOperationSuccess;
} FINALLY {
}
return syncEvent;
} // HUBDSM_AcquiringPowerReferenceOnHubStart
DSM_EVENT
HUBDSM_BugcheckingSystemOnBootDeviceEnumerationFailure(
PSM_CONTEXT SmContext
)
/*++
Routine Description:
HUBDSM_BugcheckingSystemOnBootDeviceEnumerationFailure is called when the
state machine enters the BugcheckingSystemOnBootDeviceEnumerationFailure State
Arguments:
SmContext - State Machine Context
Return Value:
DSM_EVENT
--*/
//
// Temperorily disable the warning for unreachable code
// We need to return an event from this function because
// it is a state machine function
//
#pragma warning(push)
#pragma warning(disable:4702)
{
PDEVICE_CONTEXT deviceContext;
TRY {
deviceContext = SmContext->ParentContext;
HUBMISC_BugcheckSystemOnBootDeviceEnumerationFailure(deviceContext);
} FINALLY {
}
return DsmEventNull;
} // HUBDSM_BugcheckingSystemOnBootDeviceEnumerationFailure
#pragma warning(pop)
DSM_EVENT
HUBDSM_CheckIfDeviceCanBeDisabledOnDriverNotFound(
PSM_CONTEXT SmContext
)
/*++
Routine Description:
HUBDSM_CheckIfDeviceCanBeDisabledOnDriverNotFound is called when the
state machine enters the CheckIfDeviceCanBeDisabledOnDriverNotFound State
Arguments:
SmContext - State Machine Context
Return Value:
DSM_EVENT
--*/
{
PDEVICE_CONTEXT deviceContext;
DSM_EVENT syncEvent;
TRY {
deviceContext = SmContext->ParentContext;
syncEvent = HUBMISC_CheckIfDeviceShouldBeDisabledOnRemove(deviceContext);
} FINALLY {
}
return syncEvent;
} // HUBDSM_C