#include <ntddk.h>
#include <windef.h>
#include <stdio.h>
#include <hubbusif.h>
#include <usbbusif.h>
#include <usbdlib.h>
#include <drivers/usbport/usbmport.h>
#include "hardware.h"
Go to the source code of this file.
|
| C_ASSERT (sizeof(UHCI_HCD_TD)==0x40) |
|
| C_ASSERT (sizeof(UHCI_HCD_QH)==0x40) |
|
VOID NTAPI | UhciRHGetRootHubData (IN PVOID uhciExtension, IN PVOID rootHubData) |
|
MPSTATUS NTAPI | UhciRHGetStatus (IN PVOID uhciExtension, IN PUSHORT Status) |
|
MPSTATUS NTAPI | UhciRHGetPortStatus (IN PVOID uhciExtension, IN USHORT Port, IN PUSB_PORT_STATUS_AND_CHANGE PortStatus) |
|
MPSTATUS NTAPI | UhciRHGetHubStatus (IN PVOID uhciExtension, IN PUSB_HUB_STATUS_AND_CHANGE HubStatus) |
|
MPSTATUS NTAPI | UhciRHSetFeaturePortReset (IN PVOID uhciExtension, IN USHORT Port) |
|
MPSTATUS NTAPI | UhciRHSetFeaturePortPower (IN PVOID uhciExtension, IN USHORT Port) |
|
MPSTATUS NTAPI | UhciRHSetFeaturePortEnable (IN PVOID uhciExtension, IN USHORT Port) |
|
MPSTATUS NTAPI | UhciRHSetFeaturePortSuspend (IN PVOID uhciExtension, IN USHORT Port) |
|
MPSTATUS NTAPI | UhciRHClearFeaturePortEnable (IN PVOID uhciExtension, IN USHORT Port) |
|
MPSTATUS NTAPI | UhciRHClearFeaturePortPower (IN PVOID uhciExtension, IN USHORT Port) |
|
MPSTATUS NTAPI | UhciRHClearFeaturePortSuspend (IN PVOID uhciExtension, IN USHORT Port) |
|
MPSTATUS NTAPI | UhciRHClearFeaturePortEnableChange (IN PVOID uhciExtension, IN USHORT Port) |
|
MPSTATUS NTAPI | UhciRHClearFeaturePortConnectChange (IN PVOID uhciExtension, IN USHORT Port) |
|
MPSTATUS NTAPI | UhciRHClearFeaturePortResetChange (IN PVOID uhciExtension, IN USHORT Port) |
|
MPSTATUS NTAPI | UhciRHClearFeaturePortSuspendChange (IN PVOID uhciExtension, IN USHORT Port) |
|
MPSTATUS NTAPI | UhciRHClearFeaturePortOvercurrentChange (IN PVOID uhciExtension, IN USHORT Port) |
|
VOID NTAPI | UhciRHDisableIrq (IN PVOID uhciExtension) |
|
VOID NTAPI | UhciRHEnableIrq (IN PVOID uhciExtension) |
|
VOID NTAPI | UhciDisableInterrupts (IN PVOID uhciExtension) |
|
ULONG NTAPI | UhciGet32BitFrameNumber (IN PVOID uhciExtension) |
|
BOOLEAN NTAPI | UhciHardwarePresent (IN PUHCI_EXTENSION UhciExtension) |
|
◆ UHCI_ENDPOINT_FLAG_CONTROL_OR_ISO
#define UHCI_ENDPOINT_FLAG_CONTROL_OR_ISO 4 |
◆ UHCI_ENDPOINT_FLAG_HALTED
#define UHCI_ENDPOINT_FLAG_HALTED 1 |
◆ UHCI_ENDPOINT_FLAG_RESERVED
#define UHCI_ENDPOINT_FLAG_RESERVED 2 |
◆ UHCI_EXTENSION_FLAG_SUSPENDED
#define UHCI_EXTENSION_FLAG_SUSPENDED 0x00000002 |
◆ UHCI_FRAME_LIST_INDEX_MASK
#define UHCI_FRAME_LIST_INDEX_MASK 0x3FF |
◆ UHCI_FRAME_LIST_POINTER_QH
#define UHCI_FRAME_LIST_POINTER_QH (1 << 1) |
◆ UHCI_FRAME_LIST_POINTER_TD
#define UHCI_FRAME_LIST_POINTER_TD (0 << 1) |
◆ UHCI_FRAME_LIST_POINTER_TERMINATE
#define UHCI_FRAME_LIST_POINTER_TERMINATE (1 << 0) |
◆ UHCI_FRAME_LIST_POINTER_VALID
#define UHCI_FRAME_LIST_POINTER_VALID (0 << 0) |
◆ UHCI_HCD_QH_FLAG_ACTIVE
#define UHCI_HCD_QH_FLAG_ACTIVE 0x00000001 |
◆ UHCI_HCD_QH_FLAG_REMOVE
#define UHCI_HCD_QH_FLAG_REMOVE 0x00000002 |
◆ UHCI_HCD_TD_FLAG_ALLOCATED
#define UHCI_HCD_TD_FLAG_ALLOCATED 0x00000001 |
◆ UHCI_HCD_TD_FLAG_CONTROLL
#define UHCI_HCD_TD_FLAG_CONTROLL 0x00000400 |
◆ UHCI_HCD_TD_FLAG_DATA_BUFFER
#define UHCI_HCD_TD_FLAG_DATA_BUFFER 0x00000020 |
◆ UHCI_HCD_TD_FLAG_DONE
#define UHCI_HCD_TD_FLAG_DONE 0x00000008 |
◆ UHCI_HCD_TD_FLAG_GOOD_FRAME
#define UHCI_HCD_TD_FLAG_GOOD_FRAME 0x00000040 |
◆ UHCI_HCD_TD_FLAG_NOT_ACCESSED
#define UHCI_HCD_TD_FLAG_NOT_ACCESSED 0x00000010 |
◆ UHCI_HCD_TD_FLAG_PROCESSED
#define UHCI_HCD_TD_FLAG_PROCESSED 0x00000002 |
◆ UHCI_HCD_TD_FLAG_STALLED_SETUP
#define UHCI_HCD_TD_FLAG_STALLED_SETUP 0x00000800 |
◆ UHCI_MAX_BULK_TRANSFER_SIZE
#define UHCI_MAX_BULK_TRANSFER_SIZE 0x1000 |
◆ UHCI_MAX_HC_SCHEDULE_ERRORS
#define UHCI_MAX_HC_SCHEDULE_ERRORS 16 |
◆ UHCI_MAX_INTERRUPT_TD_COUNT
#define UHCI_MAX_INTERRUPT_TD_COUNT 8 |
◆ UHCI_MAX_ISO_TD_COUNT
#define UHCI_MAX_ISO_TD_COUNT 256 |
◆ UHCI_MAX_ISO_TRANSFER_SIZE
#define UHCI_MAX_ISO_TRANSFER_SIZE 0x10000 |
◆ UHCI_MAX_STATIC_SOF_TDS
#define UHCI_MAX_STATIC_SOF_TDS 8 |
◆ PUHCI_ENDPOINT
◆ PUHCI_EXTENSION
◆ PUHCI_HC_RESOURCES
◆ PUHCI_HCD_QH
◆ PUHCI_HCD_TD
◆ PUHCI_TRANSFER
◆ UHCI_ENDPOINT
◆ UHCI_EXTENSION
◆ UHCI_HC_RESOURCES
◆ UHCI_HCD_QH
◆ UHCI_HCD_TD
◆ UHCI_TRANSFER
◆ C_ASSERT() [1/2]
◆ C_ASSERT() [2/2]
◆ UhciDisableInterrupts()
Definition at line 2553 of file usbuhci.c.
2554{
2559
2560 DPRINT(
"UhciDisableInterrupts: UhciExtension - %p\n", UhciExtension);
2561
2564
2565 HcFlavor = UhciExtension->
HcFlavor;
2566 DPRINT(
"UhciDisableInterrupts: FIXME HcFlavor - %lx\n", HcFlavor);
2567
2573
2575
2581}
VOID NTAPI WRITE_PORT_USHORT(IN PUSHORT Port, IN USHORT Value)
PUHCI_HW_REGISTERS BaseRegister
USB_CONTROLLER_FLAVOR HcFlavor
UHCI_INTERRUPT_ENABLE HcInterruptEnable
PUSBPORT_READ_WRITE_CONFIG_SPACE UsbPortReadWriteConfigSpace
enum _USB_CONTROLLER_FLAVOR USB_CONTROLLER_FLAVOR
USBPORT_REGISTRATION_PACKET RegPacket
Referenced by DriverEntry(), and UhciTakeControlHC().
◆ UhciGet32BitFrameNumber()
◆ UhciHardwarePresent()
◆ UhciRHClearFeaturePortConnectChange()
Definition at line 406 of file roothub.c.
408{
413
414 DPRINT(
"UhciRHClearFeaturePortConnectChange: Port - %04X\n",
Port);
415
417
421
423 {
424
428 }
429
431}
UHCI_PORT_STATUS_CONTROL PortControl[UHCI_NUM_ROOT_HUB_PORTS]
USHORT PortEnableDisableChange
USHORT ConnectStatusChange
#define MP_STATUS_SUCCESS
Referenced by DriverEntry().
◆ UhciRHClearFeaturePortEnable()
Definition at line 350 of file roothub.c.
352{
354 DPRINT(
"UhciRHClearFeaturePortEnable: ...\n");
357}
MPSTATUS NTAPI UhciRHPortEnable(IN PVOID uhciExtension, IN USHORT Port, IN BOOLEAN IsSet)
Referenced by DriverEntry().
◆ UhciRHClearFeaturePortEnableChange()
Definition at line 381 of file roothub.c.
383{
388
389 DPRINT(
"UhciRHClearFeaturePortEnableChange: ...\n");
390
392
396
400
402}
Referenced by DriverEntry().
◆ UhciRHClearFeaturePortOvercurrentChange()
Definition at line 457 of file roothub.c.
459{
460 DPRINT(
"UhciRHClearFeaturePortOvercurrentChange: UNIMPLEMENTED. FIXME\n");
463}
Referenced by DriverEntry().
◆ UhciRHClearFeaturePortPower()
◆ UhciRHClearFeaturePortResetChange()
Definition at line 435 of file roothub.c.
437{
439 DPRINT(
"UhciRHClearFeaturePortResetChange: ...\n");
443}
ULONG ResetChangePortMask
Referenced by DriverEntry().
◆ UhciRHClearFeaturePortSuspend()
◆ UhciRHClearFeaturePortSuspendChange()
Definition at line 447 of file roothub.c.
449{
450 DPRINT(
"UhciRHClearFeaturePortSuspendChange: UNIMPLEMENTED. FIXME\n");
453}
Referenced by DriverEntry().
◆ UhciRHDisableIrq()
◆ UhciRHEnableIrq()
◆ UhciRHGetHubStatus()
◆ UhciRHGetPortStatus()
Definition at line 50 of file roothub.c.
53{
61
62
63
65
69
72
75
78 {
80 }
81 else
82 {
84 }
85
86
88 {
90 portStatus.
PortPower = (~PortControl.Reserved2 & 1);
92 }
93 else
94 {
98 }
99
101
105
106 PortBit = 1 << (
Port - 1);
107
109 {
112 }
113 else
114 {
116 }
117
120
123
124 PortStatus->PortStatus.Usb20PortStatus = portStatus;
125 PortStatus->PortChange.Usb20PortChange = portChange;
126
127
128
129
130
131
133}
_Outptr_ PUSB_DEVICE_HANDLE _In_ PUSB_DEVICE_HANDLE _In_ USHORT PortStatus
ULONG SuspendChangePortMask
USHORT PortEnabledDisabled
USHORT CurrentConnectStatus
USHORT PortEnableDisableChange
USHORT OverCurrentIndicatorChange
USHORT ConnectStatusChange
USHORT LowSpeedDeviceAttached
USHORT CurrentConnectStatus
USHORT HighSpeedDeviceAttached
USHORT PortEnabledDisabled
Referenced by DriverEntry().
◆ UhciRHGetRootHubData()
Definition at line 15 of file roothub.c.
17{
21
22 DPRINT(
"UhciRHGetRootHubData: ...\n");
23
28
31
36}
#define UHCI_NUM_ROOT_HUB_PORTS
USBPORT_HUB_CHARACTERISTICS HubCharacteristics
USHORT OverCurrentProtectionMode
USHORT NoOverCurrentProtection
USBPORT_HUB_11_CHARACTERISTICS Usb11HubCharacteristics
Referenced by DriverEntry().
◆ UhciRHGetStatus()
◆ UhciRHSetFeaturePortEnable()
◆ UhciRHSetFeaturePortPower()
◆ UhciRHSetFeaturePortReset()
Definition at line 250 of file roothub.c.
252{
256
257 DPRINT(
"UhciRHSetFeaturePortReset: ...\n");
258
260
262 PortBit = 1 << (
Port - 1);
263
264 if (ResetPortMask & PortBit)
266
268
274 {
275 DPRINT1(
"UhciRHSetFeaturePortReset: Via chip. FIXME\n");
277 }
278
280
282}
#define MP_STATUS_FAILURE
VOID NTAPI UhciRHSetFeaturePortResetWorker(IN PUHCI_EXTENSION UhciExtension, IN PUSHORT pPort)
Referenced by DriverEntry().
◆ UhciRHSetFeaturePortSuspend()
◆ RegPacket
Definition at line 16 of file usbehci.c.
Referenced by DriverEntry(), EHCI_AbortAsyncTransfer(), EHCI_AllocTd(), EHCI_BulkTransfer(), EHCI_ControlTransfer(), EHCI_FlushAsyncCache(), EHCI_GetOffsetEECP(), EHCI_HardwarePresent(), EHCI_InterruptDpc(), EHCI_InterruptNextSOF(), EHCI_InterruptTransfer(), EHCI_PollActiveAsyncEndpoint(), EHCI_PollController(), EHCI_PollHaltedAsyncEndpoint(), EHCI_ProcessDoneAsyncTd(), EHCI_RH_ChirpRootPort(), EHCI_RH_ClearFeaturePortSuspend(), EHCI_RH_FinishReset(), EHCI_RH_PortResetComplete(), EHCI_RH_SetFeaturePortReset(), EHCI_SetEndpointState(), EHCI_StartController(), EHCI_SuspendController(), EHCI_TakeControlHC(), OHCI_AbortTransfer(), OHCI_CheckController(), OHCI_HardwarePresent(), OHCI_InterruptDpc(), OHCI_PollAsyncEndpoint(), OHCI_ProcessDoneTD(), UhciCheckController(), UhciDisableInterrupts(), UhciEnableInterrupts(), UhciInitializeHardware(), UhciInterruptDpc(), UhciPollController(), UhciPollNonIsoEndpoint(), UhciProcessDoneNonIsoTD(), UhciRHPortResetComplete(), UhciRHSetFeaturePortResetWorker(), UhciTakeControlHC(), and USBPORT_RegisterUSBPortDriver().