- Sync with trunk up to r46941.
[reactos.git] / drivers / usb / usbehci / usbiffn.h
index e9c2de4..eff48f0 100644 (file)
@@ -1,77 +1,12 @@
 #pragma once
 
-#define USB_BUSIFFN __stdcall
 #include <ntifs.h>
 #include <ntddk.h>
 #include <usb.h>
+#include <usbbusif.h>
 
-/* usbbusif.h and hubbusif.h need to be imported */
-typedef PVOID PUSB_DEVICE_HANDLE;
-
-typedef
-VOID
-USB_BUSIFFN
-RH_INIT_CALLBACK (PVOID CallBackContext);
-
-typedef RH_INIT_CALLBACK *PRH_INIT_CALLBACK;
-
-typedef struct _USB_EXTPORT_INFORMATION_0
-{
-    ULONG PhysicalPortNumber;
-    ULONG PortLabelNumber;
-    USHORT VidOverride;
-    USHORT PidOverride;
-    ULONG PortAttributes;
-} USB_EXTPORT_INFORMATION_0, *PUSB_EXTPORT_INFORMATION;
-
-typedef struct _USB_EXTHUB_INFORMATION_0
-{
-    ULONG InformationLevel;
-    ULONG NumberOfPorts;
-    USB_EXTPORT_INFORMATION_0 Port[255];
-} USB_EXTHUB_INFORMATION_0, *PUSB_EXTHUB_INFORMATION_0;
-
-typedef struct _USB_BUS_INTERFACE_USBDI_V2
-{
-    USHORT Size;
-    USHORT Version;
-    PVOID BusContext;
-    PINTERFACE_REFERENCE InterfaceReference;
-    PINTERFACE_DEREFERENCE InterfaceDereference;
-
-    PVOID GetUSBDIVersion;
-    PVOID QueryBusTime;
-    PVOID SubmitIsoOutUrb;
-    PVOID QueryBusInformation;
-    PVOID IsDeviceHighSpeed;
-    PVOID EnumLogEntry;
-} USB_BUS_INTERFACE_USBDI_V2, *PUSB_BUS_INTERFACE_USBDI_V2;
-
-typedef struct _USB_BUS_INTERFACE_HUB_V5
-{
-    USHORT Size;
-    USHORT Version;
-    PVOID BusContext;
-    PINTERFACE_REFERENCE InterfaceReference;
-    PINTERFACE_DEREFERENCE InterfaceDereference;
-
-    PVOID CreateUsbDevice;
-    PVOID InitializeUsbDevice;
-    PVOID GetUsbDescriptors;
-    PVOID RemoveUsbDevice;
-    PVOID RestoreUsbDevice;
-    PVOID GetPortHackFlags;
-    PVOID QueryDeviceInformation;
-    PVOID GetControllerInformation;
-    PVOID ControllerSelectiveSuspend;
-    PVOID GetExtendedHubInformation;
-    PVOID GetRootHubSymbolicName;
-    PVOID GetDeviceBusContext;
-    PVOID Initialize20Hub;
-    PVOID RootHubInitNotification;
-    PVOID FlushTransfers;
-    PVOID SetDeviceHandleData;
-} USB_BUS_INTERFACE_HUB_V5, *PUSB_BUS_INTERFACE_HUB_V5;
+PVOID
+InternalCreateUsbDevice(UCHAR DeviceNumber, ULONG Port, PUSB_DEVICE Parent, BOOLEAN Hub);
 
 VOID
 USB_BUSIFFN
@@ -98,7 +33,7 @@ GetUsbDescriptors(PVOID BusContext,
     PUSB_DEVICE_HANDLE DeviceHandle,
     PUCHAR DeviceDescriptorBuffer,
     PULONG DeviceDescriptorBufferLength,
-    PUCHAR ConfigurationBuffer,
+    PUCHAR ConfigDescriptorBuffer,
     PULONG ConfigDescriptorBufferLength);
 
 NTSTATUS
@@ -167,7 +102,7 @@ VOID
 USB_BUSIFFN
 SetDeviceHandleData(PVOID BusContext, PVOID DeviceHandle, PDEVICE_OBJECT UsbDevicePdo);
 
-NTSTATUS
+VOID
 USB_BUSIFFN
 GetUSBDIVersion(PVOID BusContext, PUSBD_VERSION_INFORMATION VersionInformation, PULONG HcdCapabilites);