ReactOS 0.4.17-dev-1281-g065abb3
hubreq.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  HubControlRequest
 
struct  HubInterruptRequest
 

Macros

#define HUB_SETUP_REQUEST_TIMEOUT_MS   5000
 
#define HUB_FEATURE_NONE   1000
 
#define HUB_REQUEST_GET_STATUS   0
 
#define HUB_REQUEST_CLEAR_FEATURE   1
 
#define HUB_REQUEST_SET_FEATURE   3
 
#define HUB_REQUEST_GET_DESCRIPTOR   6
 
#define HUB_REQUEST_CLEAR_TT_BUFFER   8
 
#define HUB_REQUEST_RESET_TT   9
 
#define HUB_REQUEST_SET_HUB_DEPTH   12
 
#define HUB_C_LOCAL_POWER   0
 
#define HUB_C_OVER_CURRENT   1
 
#define PORT_F_ENABLE   1
 
#define PORT_F_SUSPEND   2
 
#define PORT_F_RESET   4
 
#define PORT_F_LINK_STATE   5
 
#define PORT_F_POWER   8
 
#define PORT_C_CONNECTION   16
 
#define PORT_C_ENABLE   17
 
#define PORT_C_SUSPEND   18
 
#define PORT_C_OVER_CURRENT   19
 
#define PORT_C_RESET   20
 
#define PORT_F_U1_TIMEOUT   23
 
#define PORT_F_U2_TIMEOUT   24
 
#define PORT_C_LINK_STATE   25
 
#define PORT_C_CONFIG_ERROR   26
 
#define PORT_F_REMOTE_WAKE_MASK   27
 
#define PORT_F_BH_RESET   28
 
#define PORT_C_BH_RESET   29
 
#define LINK_U0   0
 
#define LINK_U3   3
 
#define LINK_SS_DISABLED   4
 
#define LINK_RX_DETECT   5
 
#define LINK_SS_INACTIVE   6
 
#define LINK_POLLING   7
 
#define LINK_RECOVERY   8
 
#define LINK_COMPLIANCE   10
 
#define LINK_LOOPBACK   11
 
#define PS_CONNECTED   0x0001
 
#define PS_ENABLED   0x0002
 
#define PS_SUSPENDED   0x0004
 
#define PS_OVER_CURRENT   0x0008
 
#define PS_RESET   0x0010
 
#define PS_LINK_SHIFT   5
 
#define PS_LINK_MASK   0x01E0
 
#define PS_POWER_20   0x0100
 
#define PS_POWER_30   0x0200
 
#define PC_CONNECT   0x0001
 
#define PC_ENABLE   0x0002
 
#define PC_SUSPEND   0x0004
 
#define PC_OVER_CURRENT   0x0008
 
#define PC_RESET   0x0010
 
#define PC_BH_RESET   0x0020
 
#define PC_LINK_STATE   0x0040
 
#define PC_CONFIG_ERROR   0x0080
 
#define HS_LOCAL_POWER_LOST   0x0001
 
#define HS_OVER_CURRENT   0x0002
 
#define HUB_MSG_INVALID_PORT_STATUS   0x40020000
 
#define HUB_MSG_CONTROL_TRANSFER_FAILED   0x40020001
 
#define HUB_MSG_INTERRUPT_FAILED   0x40020002
 

Functions

FORCEINLINE USHORT NTAPI HubLinkState (_In_ USHORT Status)
 
 _IRQL_requires_ (PASSIVE_LEVEL) NTSTATUS NTAPI HubReadPortStatusForBootDevice(_In_ HubChild *Child
 Sends a synchronous IOCTL to the specified device object.
 

Variables

_Out_ PULONG PortStatus
 

Macro Definition Documentation

◆ HS_LOCAL_POWER_LOST

#define HS_LOCAL_POWER_LOST   0x0001

Definition at line 146 of file hubreq.h.

◆ HS_OVER_CURRENT

#define HS_OVER_CURRENT   0x0002

Definition at line 147 of file hubreq.h.

◆ HUB_C_LOCAL_POWER

#define HUB_C_LOCAL_POWER   0

Definition at line 94 of file hubreq.h.

◆ HUB_C_OVER_CURRENT

#define HUB_C_OVER_CURRENT   1

Definition at line 95 of file hubreq.h.

◆ HUB_FEATURE_NONE

#define HUB_FEATURE_NONE   1000

Definition at line 14 of file hubreq.h.

◆ HUB_MSG_CONTROL_TRANSFER_FAILED

#define HUB_MSG_CONTROL_TRANSFER_FAILED   0x40020001

Definition at line 151 of file hubreq.h.

◆ HUB_MSG_INTERRUPT_FAILED

#define HUB_MSG_INTERRUPT_FAILED   0x40020002

Definition at line 152 of file hubreq.h.

◆ HUB_MSG_INVALID_PORT_STATUS

#define HUB_MSG_INVALID_PORT_STATUS   0x40020000

Definition at line 150 of file hubreq.h.

◆ HUB_REQUEST_CLEAR_FEATURE

#define HUB_REQUEST_CLEAR_FEATURE   1

Definition at line 86 of file hubreq.h.

◆ HUB_REQUEST_CLEAR_TT_BUFFER

#define HUB_REQUEST_CLEAR_TT_BUFFER   8

Definition at line 89 of file hubreq.h.

◆ HUB_REQUEST_GET_DESCRIPTOR

#define HUB_REQUEST_GET_DESCRIPTOR   6

Definition at line 88 of file hubreq.h.

◆ HUB_REQUEST_GET_STATUS

#define HUB_REQUEST_GET_STATUS   0

Definition at line 85 of file hubreq.h.

◆ HUB_REQUEST_RESET_TT

#define HUB_REQUEST_RESET_TT   9

Definition at line 90 of file hubreq.h.

◆ HUB_REQUEST_SET_FEATURE

#define HUB_REQUEST_SET_FEATURE   3

Definition at line 87 of file hubreq.h.

◆ HUB_REQUEST_SET_HUB_DEPTH

#define HUB_REQUEST_SET_HUB_DEPTH   12

Definition at line 91 of file hubreq.h.

◆ HUB_SETUP_REQUEST_TIMEOUT_MS

#define HUB_SETUP_REQUEST_TIMEOUT_MS   5000

Definition at line 11 of file hubreq.h.

◆ LINK_COMPLIANCE

#define LINK_COMPLIANCE   10

Definition at line 122 of file hubreq.h.

◆ LINK_LOOPBACK

#define LINK_LOOPBACK   11

Definition at line 123 of file hubreq.h.

◆ LINK_POLLING

#define LINK_POLLING   7

Definition at line 120 of file hubreq.h.

◆ LINK_RECOVERY

#define LINK_RECOVERY   8

Definition at line 121 of file hubreq.h.

◆ LINK_RX_DETECT

#define LINK_RX_DETECT   5

Definition at line 118 of file hubreq.h.

◆ LINK_SS_DISABLED

#define LINK_SS_DISABLED   4

Definition at line 117 of file hubreq.h.

◆ LINK_SS_INACTIVE

#define LINK_SS_INACTIVE   6

Definition at line 119 of file hubreq.h.

◆ LINK_U0

#define LINK_U0   0

Definition at line 115 of file hubreq.h.

◆ LINK_U3

#define LINK_U3   3

Definition at line 116 of file hubreq.h.

◆ PC_BH_RESET

#define PC_BH_RESET   0x0020

Definition at line 141 of file hubreq.h.

◆ PC_CONFIG_ERROR

#define PC_CONFIG_ERROR   0x0080

Definition at line 143 of file hubreq.h.

◆ PC_CONNECT

#define PC_CONNECT   0x0001

Definition at line 136 of file hubreq.h.

◆ PC_ENABLE

#define PC_ENABLE   0x0002

Definition at line 137 of file hubreq.h.

◆ PC_LINK_STATE

#define PC_LINK_STATE   0x0040

Definition at line 142 of file hubreq.h.

◆ PC_OVER_CURRENT

#define PC_OVER_CURRENT   0x0008

Definition at line 139 of file hubreq.h.

◆ PC_RESET

#define PC_RESET   0x0010

Definition at line 140 of file hubreq.h.

◆ PC_SUSPEND

#define PC_SUSPEND   0x0004

Definition at line 138 of file hubreq.h.

◆ PORT_C_BH_RESET

#define PORT_C_BH_RESET   29

Definition at line 112 of file hubreq.h.

◆ PORT_C_CONFIG_ERROR

#define PORT_C_CONFIG_ERROR   26

Definition at line 109 of file hubreq.h.

◆ PORT_C_CONNECTION

#define PORT_C_CONNECTION   16

Definition at line 101 of file hubreq.h.

◆ PORT_C_ENABLE

#define PORT_C_ENABLE   17

Definition at line 102 of file hubreq.h.

◆ PORT_C_LINK_STATE

#define PORT_C_LINK_STATE   25

Definition at line 108 of file hubreq.h.

◆ PORT_C_OVER_CURRENT

#define PORT_C_OVER_CURRENT   19

Definition at line 104 of file hubreq.h.

◆ PORT_C_RESET

#define PORT_C_RESET   20

Definition at line 105 of file hubreq.h.

◆ PORT_C_SUSPEND

#define PORT_C_SUSPEND   18

Definition at line 103 of file hubreq.h.

◆ PORT_F_BH_RESET

#define PORT_F_BH_RESET   28

Definition at line 111 of file hubreq.h.

◆ PORT_F_ENABLE

#define PORT_F_ENABLE   1

Definition at line 96 of file hubreq.h.

◆ PORT_F_LINK_STATE

#define PORT_F_LINK_STATE   5

Definition at line 99 of file hubreq.h.

◆ PORT_F_POWER

#define PORT_F_POWER   8

Definition at line 100 of file hubreq.h.

◆ PORT_F_REMOTE_WAKE_MASK

#define PORT_F_REMOTE_WAKE_MASK   27

Definition at line 110 of file hubreq.h.

◆ PORT_F_RESET

#define PORT_F_RESET   4

Definition at line 98 of file hubreq.h.

◆ PORT_F_SUSPEND

#define PORT_F_SUSPEND   2

Definition at line 97 of file hubreq.h.

◆ PORT_F_U1_TIMEOUT

#define PORT_F_U1_TIMEOUT   23

Definition at line 106 of file hubreq.h.

◆ PORT_F_U2_TIMEOUT

#define PORT_F_U2_TIMEOUT   24

Definition at line 107 of file hubreq.h.

◆ PS_CONNECTED

#define PS_CONNECTED   0x0001

Definition at line 126 of file hubreq.h.

◆ PS_ENABLED

#define PS_ENABLED   0x0002

Definition at line 127 of file hubreq.h.

◆ PS_LINK_MASK

#define PS_LINK_MASK   0x01E0

Definition at line 132 of file hubreq.h.

◆ PS_LINK_SHIFT

#define PS_LINK_SHIFT   5

Definition at line 131 of file hubreq.h.

◆ PS_OVER_CURRENT

#define PS_OVER_CURRENT   0x0008

Definition at line 129 of file hubreq.h.

◆ PS_POWER_20

#define PS_POWER_20   0x0100

Definition at line 133 of file hubreq.h.

◆ PS_POWER_30

#define PS_POWER_30   0x0200

Definition at line 134 of file hubreq.h.

◆ PS_RESET

#define PS_RESET   0x0010

Definition at line 130 of file hubreq.h.

◆ PS_SUSPENDED

#define PS_SUSPENDED   0x0004

Definition at line 128 of file hubreq.h.

Function Documentation

◆ _IRQL_requires_()

_IRQL_requires_ ( PASSIVE_LEVEL  )

Sends a synchronous IOCTL to the specified device object.

Parameters
[in]IoControlCodeThe IOCTL to send to the device.
[in]DeviceObjectPointer to the device object that will handle the IOCTL.
[in]InputBufferOptional pointer to a buffer containing input data for the IOCTL. When specified, the buffer should be at least of InputBufferLength size.
[in]InputBufferLengthSize in bytes, of the buffer pointed by InputBuffer.
[out]OutputBufferOptional pointer to a buffer that will receive output data from the IOCTL. When specified, the buffer should be at least of OutputBufferLength size.
[in]OutputBufferLengthSize in bytes, of the buffer pointed by OutputBuffer.
[in]FileObjectOptional pointer to a file object that may be necessary for the IOCTL.
Returns
An NTSTATUS code indicating success or failure of this function.
Note
Must be called at PASSIVE_LEVEL with all APCs enabled.

Nothing is found unless the PCI bus driver publishes the properties.

The root hub name without its prefix; NULL when the PDO has no name.

Grows a private buffer to what the helper asks for.

Lets KMDF handle the IRP, then hands it back here still uncompleted.

Waits for the device machine to answer a PnP or power event; returns the PnP status.

Deletes the UCX endpoints of the disabled pipes, then the interface record.

One 4 byte value; the registry type is not checked.

Reread whenever user experience settings change; the open status is returned.

Sends a synchronous IOCTL to the specified device object.

STATUS_SUCCESS when the caller's token is an administrator's.

Sends a synchronous IOCTL to the specified device object.

Reads one value of a walk. A missing value only clears Present; FALSE means stop.

Reads up to Size bytes of a value into a zeroed buffer; the type is not checked.

Writes a REG_BINARY value into the device's usbflags subkey.

Sets or clears ExtPropertiesInstalled from ExtPropDescSemaphore in the hardware key.

Definition at line 2121 of file class.c.

13175{
13177
13178 PAGED_CODE();
13179
13180 TracePrint((TRACE_LEVEL_VERBOSE,
13181 TRACE_FLAG_PNP,
13182 "ClassDetermineTokenOperationCommandSupport (%p): Entering function.\n",
13183 DeviceObject));
13184
13185 //
13186 // Send down Inquiry for VPD_THIRD_PARTY_COPY_PAGE and cache away the device parameters
13187 // from WINDOWS_BLOCK_DEVICE_TOKEN_LIMITS_DESCRIPTOR.
13188 //
13190
13191 if (NT_SUCCESS(status)) {
13192
13193 ULONG maxListIdentifier = MaxTokenOperationListIdentifier;
13194
13195 //
13196 // Query the maximum list identifier to use for TokenOperation commands.
13197 //
13198 if (NT_SUCCESS(ClasspGetMaximumTokenListIdentifier(DeviceObject, REG_DISK_CLASS_CONTROL, &maxListIdentifier))) {
13199 if (maxListIdentifier >= MIN_TOKEN_LIST_IDENTIFIERS) {
13200
13201 NT_ASSERT(maxListIdentifier <= MAX_TOKEN_LIST_IDENTIFIERS);
13202 MaxTokenOperationListIdentifier = maxListIdentifier;
13203 }
13204 }
13205
13206 }
13207
13208 TracePrint((TRACE_LEVEL_VERBOSE,
13209 TRACE_FLAG_PNP,
13210 "ClassDetermineTokenOperationCommandSupport (%p): Exiting function with status %x.\n",
13212 status));
13213
13214 return status;
13215}
#define PAGED_CODE()
LONG NTSTATUS
Definition: precomp.h:26
#define REG_DISK_CLASS_CONTROL
Definition: classp.h:218
#define MAX_TOKEN_LIST_IDENTIFIERS
Definition: classp.h:215
#define MIN_TOKEN_LIST_IDENTIFIERS
Definition: classp.h:214
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
ULONG MaxTokenOperationListIdentifier
Definition: class.c:107
_IRQL_requires_same_ NTSTATUS ClasspGetBlockDeviceTokenLimitsInfo(_Inout_ PDEVICE_OBJECT DeviceObject)
Definition: class.c:13220
#define STATUS_SUCCESS
Definition: shellext.h:65
#define TRACE_LEVEL_VERBOSE
Definition: storswtr.h:30
Definition: ps.c:97
uint32_t ULONG
Definition: typedefs.h:59
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2061
#define NT_ASSERT
Definition: rtlfuncs.h:3334

◆ HubLinkState()

FORCEINLINE USHORT NTAPI HubLinkState ( _In_ USHORT  Status)

Definition at line 159 of file hubreq.h.

161{
162 return (Status & PS_LINK_MASK) >> PS_LINK_SHIFT;
163}
Status
Definition: gdiplustypes.h:24
#define PS_LINK_SHIFT
Definition: hubreq.h:131
#define PS_LINK_MASK
Definition: hubreq.h:132

Referenced by PortMachine::DevicePresent(), PortMachine::LinkInU0(), PortMachine::LogLinkStateError(), and PortNextChange30().

Variable Documentation

◆ PortStatus

_Out_ PULONG PortStatus

Definition at line 172 of file hubreq.h.