2 * PROJECT: ReactOS Universal Serial Bus Bulk Enhanced Host Controller Interface
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: drivers/usb/usbehci/usbiffn.c
5 * PURPOSE: Direct Call Interface Functions.
10 /* usbbusif.h and hubbusif.h need to be imported */
18 InterfaceReference(PVOID BusContext
)
20 DPRINT1("InterfaceReference called\n");
25 InterfaceDereference(PVOID BusContext
)
27 DPRINT1("InterfaceDereference called\n");
30 /* Bus Interface Hub V5 Functions */
34 CreateUsbDevice(PVOID BusContext
,
35 PUSB_DEVICE_HANDLE
*NewDevice
,
36 PUSB_DEVICE_HANDLE HubDeviceHandle
,
37 USHORT PortStatus
, USHORT PortNumber
)
39 DPRINT1("CreateUsbDevice called\n");
40 return STATUS_SUCCESS
;
45 InitializeUsbDevice(PVOID BusContext
, PUSB_DEVICE_HANDLE DeviceHandle
)
47 DPRINT1("InitializeUsbDevice called\n");
48 return STATUS_SUCCESS
;
53 GetUsbDescriptors(PVOID BusContext
,
54 PUSB_DEVICE_HANDLE DeviceHandle
,
55 PUCHAR DeviceDescriptorBuffer
,
56 PULONG DeviceDescriptorBufferLength
,
57 PUCHAR ConfigurationBuffer
,
58 PULONG ConfigDescriptorBufferLength
)
60 DPRINT1("GetUsbDescriptor called\n");
61 return STATUS_SUCCESS
;
66 RemoveUsbDevice(PVOID BusContext
, PUSB_DEVICE_HANDLE DeviceHandle
, ULONG Flags
)
68 DPRINT1("RemoveUsbDevice called\n");
69 return STATUS_SUCCESS
;
74 RestoreUsbDevice(PVOID BusContext
, PUSB_DEVICE_HANDLE OldDeviceHandle
, PUSB_DEVICE_HANDLE NewDeviceHandle
)
76 DPRINT1("RestoreUsbDevice called\n");
77 return STATUS_SUCCESS
;
82 GetPortHackFlags(PVOID BusContext
, PULONG Flags
)
84 DPRINT1("GetPortHackFlags called\n");
85 return STATUS_SUCCESS
;
90 QueryDeviceInformation(PVOID BusContext
,
91 PUSB_DEVICE_HANDLE DeviceHandle
,
92 PVOID DeviceInformationBuffer
,
93 ULONG DeviceInformationBufferLength
,
94 PULONG LengthReturned
)
96 DPRINT1("QueryDeviceInformation called\n");
97 return STATUS_SUCCESS
;
102 GetControllerInformation(PVOID BusContext
,
103 PVOID ControllerInformationBuffer
,
104 ULONG ControllerInformationBufferLength
,
105 PULONG LengthReturned
)
107 DPRINT1("GetControllerInformation called\n");
108 return STATUS_SUCCESS
;
113 ControllerSelectiveSuspend(PVOID BusContext
, BOOLEAN Enable
)
115 DPRINT1("ControllerSelectiveSuspend called\n");
116 return STATUS_SUCCESS
;
121 GetExtendedHubInformation(PVOID BusContext
,
122 PDEVICE_OBJECT HubPhysicalDeviceObject
,
123 PVOID HubInformationBuffer
,
124 ULONG HubInformationBufferLength
,
125 PULONG LengthReturned
)
128 PUSB_EXTHUB_INFORMATION_0 UsbExtHubInfo
= HubInformationBuffer
;
129 PPDO_DEVICE_EXTENSION PdoDeviceExtension
= (PPDO_DEVICE_EXTENSION
)((PDEVICE_OBJECT
)BusContext
)->DeviceExtension
;
130 PFDO_DEVICE_EXTENSION FdoDeviceExntension
= (PFDO_DEVICE_EXTENSION
)PdoDeviceExtension
->ControllerFdo
->DeviceExtension
;
133 /* Set the default return value */
135 /* Caller must have set InformationLevel to 0 */
136 if (UsbExtHubInfo
->InformationLevel
!= 0)
138 return STATUS_NOT_SUPPORTED
;
141 UsbExtHubInfo
->NumberOfPorts
= 8;
143 for (i
=0; i
< UsbExtHubInfo
->NumberOfPorts
; i
++)
145 UsbExtHubInfo
->Port
[i
].PhysicalPortNumber
= i
+ 1;
146 UsbExtHubInfo
->Port
[i
].PortLabelNumber
= FdoDeviceExntension
->ECHICaps
.HCSParams
.PortCount
;
147 UsbExtHubInfo
->Port
[i
].VidOverride
= 0;
148 UsbExtHubInfo
->Port
[i
].PidOverride
= 0;
149 UsbExtHubInfo
->Port
[i
].PortAttributes
= USB_PORTATTR_SHARED_USB2
;
152 *LengthReturned
= FIELD_OFFSET(USB_EXTHUB_INFORMATION_0
, Port
[8]);
154 return STATUS_SUCCESS
;
159 GetRootHubSymbolicName(PVOID BusContext
,
160 PVOID HubSymNameBuffer
,
161 ULONG HubSymNameBufferLength
,
162 PULONG HubSymNameActualLength
)
164 DPRINT1("GetRootHubSymbolicName called\n");
165 return STATUS_SUCCESS
;
170 GetDeviceBusContext(PVOID HubBusContext
, PVOID DeviceHandle
)
172 DPRINT1("GetDeviceBusContext called\n");
178 Initialize20Hub(PVOID BusContext
, PUSB_DEVICE_HANDLE HubDeviceHandle
, ULONG TtCount
)
180 DPRINT1("Initialize20Hub called\n");
181 return STATUS_SUCCESS
;
186 RootHubInitNotification(PVOID BusContext
, PVOID CallbackContext
, PRH_INIT_CALLBACK CallbackRoutine
)
188 PPDO_DEVICE_EXTENSION PdoDeviceExtension
;
189 DPRINT1("RootHubInitNotification %x, %x, %x\n", BusContext
, CallbackContext
, CallbackRoutine
);
191 PdoDeviceExtension
= (PPDO_DEVICE_EXTENSION
)((PDEVICE_OBJECT
)BusContext
)->DeviceExtension
;
192 PdoDeviceExtension
->CallbackContext
= CallbackContext
;
193 PdoDeviceExtension
->CallbackRoutine
= CallbackRoutine
;
194 return STATUS_SUCCESS
;
199 FlushTransfers(PVOID BusContext
, PVOID DeviceHandle
)
201 DPRINT1("FlushTransfers\n");
206 SetDeviceHandleData(PVOID BusContext
, PVOID DeviceHandle
, PDEVICE_OBJECT UsbDevicePdo
)
208 DPRINT1("SetDeviceHandleData called\n");
212 /* USB_BUS_INTERFACE_USBDI_V2 Functions */
216 GetUSBDIVersion(PVOID BusContext
, PUSBD_VERSION_INFORMATION VersionInformation
, PULONG HcdCapabilites
)
218 DPRINT1("GetUSBDIVersion called\n");
219 return STATUS_SUCCESS
;
224 QueryBusTime(PVOID BusContext
, PULONG CurrentFrame
)
226 DPRINT1("QueryBusTime called\n");
227 return STATUS_SUCCESS
;
232 SubmitIsoOutUrb(PVOID BusContext
, PURB Urb
)
234 DPRINT1("SubmitIsoOutUrb called\n");
235 return STATUS_SUCCESS
;
240 QueryBusInformation(PVOID BusContext
,
242 PVOID BusInformationBuffer
,
243 PULONG BusInformationBufferLength
,
244 PULONG BusInformationActualLength
)
246 DPRINT1("QueryBusInformation called\n");
247 return STATUS_SUCCESS
;
252 IsDeviceHighSpeed(PVOID BusContext
)
254 DPRINT1("IsDeviceHighSpeed called\n");
260 EnumLogEntry(PVOID BusContext
, ULONG DriverTag
, ULONG EnumTag
, ULONG P1
, ULONG P2
)
262 DPRINT1("EnumLogEntry called\n");
263 return STATUS_SUCCESS
;