ReactOS 0.4.17-dev-1281-g065abb3
HubPort Class Reference

#include <hubport.h>

Collaboration diagram for HubPort:

Public Member Functions

 _IRQL_requires_ (PASSIVE_LEVEL) static HubPort *Create(_In_ HubFdo *Hub
 
VOID Post (_In_ PortEvent Event)
 
BOOLEAN HasMuxFlag (_In_ PortMuxFlag Flag) const
 
VOID SetMuxFlag (_In_ PortMuxFlag Flag)
 
VOID ClearMuxFlag (_In_ PortMuxFlag Flag)
 
BOOLEAN HasFlag (_In_ PortFlag Flag) const
 
VOID SetFlag (_In_ PortFlag Flag)
 
VOID ClearFlag (_In_ PortFlag Flag)
 
BOOLEAN HasProperty (_In_ PortProperty Property) const
 
USHORT Number () const
 
BOOLEAN IsUsb30 () const
 

Static Public Member Functions

static HubPort * FromObject (_In_ WDFOBJECT Object)
 

Public Attributes

_In_ const HubPortInfo * Info
 
PortMachine m_Machine
 
WDFOBJECT m_Object
 
HubFdo * m_Hub
 
HubPortInfo m_Info
 
LIST_ENTRY m_HubLink
 
volatile LONG m_MuxFlags
 
volatile LONG m_Flags
 
HubChild * m_Child
 
HubTimer m_Timer
 
WDFTIMER m_ResetPollTimer
 
PUCXHUB_WORKITEM m_WorkItem
 
HubControlRequest m_Control
 
HubPortStatus m_Current
 
USHORT m_PreviousStatus
 
USHORT m_ChangeAccumulator
 
USHORT m_SelectedFeature
 
PortEvent m_LastChange
 
ULONG m_LinkErrorCount
 
UCHAR m_OverCurrentCount
 
LARGE_INTEGER m_LastOverCurrentTime
 
BOOLEAN m_InitialConnectPowerReference
 
USB_CONNECTION_STATUS m_ConnectionStatus
 
ULONG m_D3ColdReconnectTimeout
 
ULONG m_TotalResets
 
HubAcpiUpc m_AcpiUpc
 
HubAcpiPld m_AcpiPld
 
USHORT m_InterconnectType
 
HubConnectorId m_ConnectorId
 
USHORT m_InstancePortNumber
 
USHORT m_FirstCompanionPort
 
USHORT m_LastCompanionPort
 
WDFSTRING m_Usb4HostName
 

Static Private Member Functions

static VOID NTAPI TimerFired (_In_ PVOID Context)
 

Static Private Attributes

static EVT_WDF_TIMER ResetPollFired
 
static EVT_WDF_OBJECT_CONTEXT_CLEANUP EvtCleanup
 
static EVT_WDF_OBJECT_CONTEXT_DESTROY EvtDestroy
 
static UCXHUB_WORKITEM_ROUTINE MachineWorkItem
 

Friends

class PortMachine
 

Detailed Description

Definition at line 140 of file hubport.h.

Member Function Documentation

◆ _IRQL_requires_()

HubPort::_IRQL_requires_ ( PASSIVE_LEVEL  )

Creates the port object and its resources under the hub FDO.

◆ ClearFlag()

VOID HubPort::ClearFlag ( _In_ PortFlag  Flag)
inline

Definition at line 199 of file hubport.h.

201 {
203 }
volatile LONG m_Flags
Definition: hubport.h:233
#define InterlockedAnd
Definition: interlocked.h:77
long LONG
Definition: pedump.c:60
Definition: xml2sdb.h:103

Referenced by PortMachine::CancelUserOverCurrentReset(), PortMachine::ConnectDevice(), and PortMachine::ForgetDetachedDevice().

◆ ClearMuxFlag()

VOID HubPort::ClearMuxFlag ( _In_ PortMuxFlag  Flag)
inline

Definition at line 178 of file hubport.h.

180 {
182 }
volatile LONG m_MuxFlags
Definition: hubport.h:232

Referenced by PortMachine::HubPowerDrop().

◆ FromObject()

HubPort * HubPort::FromObject ( _In_ WDFOBJECT  Object)
static

Definition at line 30 of file hubport.cpp.

32{
33 return HubGetPortContext(Object);
34}
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object

Referenced by HubEvtBandwidthRetryTimer().

◆ HasFlag()

◆ HasMuxFlag()

BOOLEAN HubPort::HasMuxFlag ( _In_ PortMuxFlag  Flag) const
inline

Definition at line 164 of file hubport.h.

166 {
167 return (m_MuxFlags & (LONG)Flag) != 0;
168 }

Referenced by PortMachine::HubPowerDrop().

◆ HasProperty()

BOOLEAN HubPort::HasProperty ( _In_ PortProperty  Property) const
inline

Definition at line 206 of file hubport.h.

208 {
209 return (m_Info.Properties & (ULONG)Property) != 0;
210 }
HubPortInfo m_Info
Definition: hubport.h:229
ULONG Properties
Definition: hubport.h:65
uint32_t ULONG
Definition: typedefs.h:59

Referenced by PortMachine::D3ColdEnabled(), HubPdoEvtParentInterfaceQuery(), and PortMachine::SendGetStatus().

◆ IsUsb30()

BOOLEAN HubPort::IsUsb30 ( ) const
inline

Definition at line 219 of file hubport.h.

220 {
221 return m_Info.Protocol == 0x300;
222 }
USHORT Protocol
Definition: hubport.h:64

Referenced by PortMachine::SendResume(), and PortMachine::SendSuspend().

◆ Number()

◆ Post()

◆ SetFlag()

VOID HubPort::SetFlag ( _In_ PortFlag  Flag)
inline

◆ SetMuxFlag()

VOID HubPort::SetMuxFlag ( _In_ PortMuxFlag  Flag)
inline

Definition at line 171 of file hubport.h.

173 {
175 }

Referenced by PortMachine::HubPowerTake().

◆ TimerFired()

VOID NTAPI HubPort::TimerFired ( _In_ PVOID  Context)
staticprivate

Definition at line 146 of file hubport.cpp.

148{
149 ((HubPort*)Context)->Post(PortEvent::TimerExpired);
150}
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_ PVOID Context
Definition: kse.h:81

Friends And Related Function Documentation

◆ PortMachine

friend class PortMachine
friend

Definition at line 294 of file hubport.h.

Member Data Documentation

◆ EvtCleanup

VOID NTAPI HubPort::EvtCleanup
staticprivate

Definition at line 290 of file hubport.h.

Referenced by _IRQL_requires_().

◆ EvtDestroy

VOID NTAPI HubPort::EvtDestroy
staticprivate

Definition at line 291 of file hubport.h.

Referenced by _IRQL_requires_().

◆ Info

_In_ const HubPortInfo* HubPort::Info

Definition at line 149 of file hubport.h.

Referenced by _IRQL_requires_().

◆ m_AcpiPld

HubAcpiPld HubPort::m_AcpiPld

Definition at line 262 of file hubport.h.

◆ m_AcpiUpc

HubAcpiUpc HubPort::m_AcpiUpc

Definition at line 261 of file hubport.h.

◆ m_ChangeAccumulator

◆ m_Child

◆ m_ConnectionStatus

◆ m_ConnectorId

HubConnectorId HubPort::m_ConnectorId

Definition at line 268 of file hubport.h.

Referenced by HubPdoEvtParentInterfaceQuery().

◆ m_Control

HubControlRequest HubPort::m_Control

Definition at line 241 of file hubport.h.

◆ m_Current

◆ m_D3ColdReconnectTimeout

ULONG HubPort::m_D3ColdReconnectTimeout

Definition at line 255 of file hubport.h.

Referenced by PortMachine::StartTimer().

◆ m_FirstCompanionPort

USHORT HubPort::m_FirstCompanionPort

Definition at line 274 of file hubport.h.

Referenced by HubPdoEvtParentInterfaceQuery().

◆ m_Flags

volatile LONG HubPort::m_Flags

Definition at line 233 of file hubport.h.

Referenced by ClearFlag(), HasFlag(), HubWmiResetOverCurrent(), and SetFlag().

◆ m_Hub

◆ m_HubLink

LIST_ENTRY HubPort::m_HubLink

Definition at line 230 of file hubport.h.

◆ m_Info

HubPortInfo HubPort::m_Info

Definition at line 229 of file hubport.h.

Referenced by HasProperty(), IsUsb30(), and Number().

◆ m_InitialConnectPowerReference

BOOLEAN HubPort::m_InitialConnectPowerReference

Definition at line 252 of file hubport.h.

Referenced by PortMachine::LostChange().

◆ m_InstancePortNumber

USHORT HubPort::m_InstancePortNumber

Definition at line 271 of file hubport.h.

◆ m_InterconnectType

USHORT HubPort::m_InterconnectType

Definition at line 265 of file hubport.h.

◆ m_LastChange

◆ m_LastCompanionPort

USHORT HubPort::m_LastCompanionPort

Definition at line 275 of file hubport.h.

Referenced by HubPdoEvtParentInterfaceQuery().

◆ m_LastOverCurrentTime

LARGE_INTEGER HubPort::m_LastOverCurrentTime

Definition at line 251 of file hubport.h.

Referenced by PortMachine::OverCurrentPersists().

◆ m_LinkErrorCount

ULONG HubPort::m_LinkErrorCount

Definition at line 249 of file hubport.h.

Referenced by PortMachine::NextChange().

◆ m_Machine

PortMachine HubPort::m_Machine

Definition at line 225 of file hubport.h.

Referenced by Post().

◆ m_MuxFlags

volatile LONG HubPort::m_MuxFlags

Definition at line 232 of file hubport.h.

Referenced by ClearMuxFlag(), HasMuxFlag(), and SetMuxFlag().

◆ m_Object

◆ m_OverCurrentCount

UCHAR HubPort::m_OverCurrentCount

Definition at line 250 of file hubport.h.

Referenced by PortMachine::OverCurrentPersists().

◆ m_PreviousStatus

◆ m_ResetPollTimer

WDFTIMER HubPort::m_ResetPollTimer

Definition at line 239 of file hubport.h.

Referenced by PortMachine::StartTimer().

◆ m_SelectedFeature

USHORT HubPort::m_SelectedFeature

◆ m_Timer

HubTimer HubPort::m_Timer

Definition at line 238 of file hubport.h.

Referenced by PortMachine::StartTimer(), and PortMachine::StopTimer().

◆ m_TotalResets

ULONG HubPort::m_TotalResets

Definition at line 256 of file hubport.h.

◆ m_Usb4HostName

WDFSTRING HubPort::m_Usb4HostName

Definition at line 280 of file hubport.h.

◆ m_WorkItem

PUCXHUB_WORKITEM HubPort::m_WorkItem

Definition at line 240 of file hubport.h.

Referenced by PortMachine::QueuePassiveWork().

◆ MachineWorkItem

VOID NTAPI HubPort::MachineWorkItem
staticprivate

Definition at line 292 of file hubport.h.

Referenced by PortMachine::QueuePassiveWork().

◆ ResetPollFired

VOID NTAPI HubPort::ResetPollFired
staticprivate

Definition at line 289 of file hubport.h.

Referenced by _IRQL_requires_().


The documentation for this class was generated from the following files: