Added: trunk/reactos/drivers/usb/
Added: trunk/reactos/drivers/usb/Makefile
Added: trunk/reactos/drivers/usb/miniport/
Added: trunk/reactos/drivers/usb/miniport/usbehci/
Added: trunk/reactos/drivers/usb/miniport/usbehci/makefile
Added: trunk/reactos/drivers/usb/miniport/usbehci/usbehci.c
Added: trunk/reactos/drivers/usb/miniport/usbehci/usbehci.h
Added: trunk/reactos/drivers/usb/miniport/usbehci/usbehci.rc
Added: trunk/reactos/drivers/usb/miniport/usbohci/
Added: trunk/reactos/drivers/usb/miniport/usbohci/makefile
Added: trunk/reactos/drivers/usb/miniport/usbohci/usbohci.c
Added: trunk/reactos/drivers/usb/miniport/usbohci/usbohci.h
Added: trunk/reactos/drivers/usb/miniport/usbohci/usbohci.rc
Added: trunk/reactos/drivers/usb/miniport/usbuhci/
Added: trunk/reactos/drivers/usb/miniport/usbuhci/makefile
Added: trunk/reactos/drivers/usb/miniport/usbuhci/usbuhci.c
Added: trunk/reactos/drivers/usb/miniport/usbuhci/usbuhci.h
Added: trunk/reactos/drivers/usb/miniport/usbuhci/usbuhci.rc
Added: trunk/reactos/drivers/usb/usbhub/
Added: trunk/reactos/drivers/usb/usbhub/makefile
Added: trunk/reactos/drivers/usb/usbhub/usbhub.c
Added: trunk/reactos/drivers/usb/usbhub/usbhub.def
Added: trunk/reactos/drivers/usb/usbhub/usbhub.h
Added: trunk/reactos/drivers/usb/usbhub/usbhub.rc
Added: trunk/reactos/drivers/usb/usbport/
Added: trunk/reactos/drivers/usb/usbport/makefile
Added: trunk/reactos/drivers/usb/usbport/usbport.c
Added: trunk/reactos/drivers/usb/usbport/usbport.def
Added: trunk/reactos/drivers/usb/usbport/usbport.h
Added: trunk/reactos/drivers/usb/usbport/usbport.rc
--- trunk/reactos/drivers/usb/Makefile 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/Makefile 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,50 @@
+#
+# ReactOS USB Drivers
+#
+
+PATH_TO_TOP = ../..
+
+include $(PATH_TO_TOP)/rules.mak
+
+DRIVERS = usbport miniport/usbuhci miniport/usbehci miniport/usbohci usbhub
+
+all: $(DRIVERS)
+
+depends:
+
+implib: $(DRIVERS:%=%_implib)
+
+clean: $(DRIVERS:%=%_clean)
+
+install: $(DRIVERS:%=%_install)
+
+bootcd: $(DRIVERS:%=%_bootcd)
+
+.PHONY: all depends implib clean install bootcd
+
+
+#
+# USB DRIVERS
+#
+$(DRIVERS): %:
+ $(MAKE) -C $*
+
+$(DRIVERS:%=%_implib): %_implib:
+ $(MAKE) -C $* implib
+
+$(DRIVERS:%=%_clean): %_clean:
+ $(MAKE) -C $* clean
+
+$(DRIVERS:%=%_install): %_install:
+ $(MAKE) -C $* install
+
+$(DRIVERS:%=%_bootcd): %_bootcd:
+ $(MAKE) -C $* bootcd
+
+.PHONY: $(DRIVERS) $(DRIVERS:%=%_implib) $(DRIVERS:%=%_clean) $(DRIVERS:%=%_install) $(DRIVERS:%=%_bootcd)
+
+
+etags:
+ find . -name "*.[ch]" -print | etags --language=c -
+
+# EOF
--- trunk/reactos/drivers/usb/miniport/usbehci/makefile 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/miniport/usbehci/makefile 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,16 @@
+PATH_TO_TOP = ../../../..
+
+TARGET_TYPE = driver
+
+TARGET_NAME = usbehci
+
+TARGET_DDKLIBS = ntoskrnl.a usbport.a
+
+TARGET_CFLAGS = -Werror -Wall -I$(PATH_TO_TOP)/ntoskrnl/include -D__USE_W32API
+
+TARGET_OBJECTS = \
+ usbehci.o
+
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
--- trunk/reactos/drivers/usb/miniport/usbehci/usbehci.c 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/miniport/usbehci/usbehci.c 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,41 @@
+/*
+ * ReactOS USB EHCI miniport driver
+ * Copyright (C) 2004 Mark Tempel
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+/* INCLUDES *******************************************************************/
+
+#include "usbehci.h"
+#include "../../usbport/usbport.h"
+
+/* PUBLIC AND PRIVATE FUNCTIONS ***********************************************/
+
+NTSTATUS STDCALL
+DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
+{
+ PUSB_CONTROLLER_INTERFACE ControllerInterface;
+
+ USBPORT_AllocateUsbControllerInterface(&ControllerInterface);
+
+ /*
+ * Set up the list of callbacks here.
+ * TODO TODO TODO
+ */
+
+ return USBPORT_RegisterUSBPortDriver(DriverObject, 0, ControllerInterface);
+}
--- trunk/reactos/drivers/usb/miniport/usbehci/usbehci.h 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/miniport/usbehci/usbehci.h 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,45 @@
+/*
+ * ReactOS USB EHCI miniport driver
+ *
+ * Copyright (C) 2004 Mark Tempel
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef USBEHCI_H
+#define USBEHCI_H
+
+/* INCLUDES *******************************************************************/
+
+#include "stddef.h"
+#include "windef.h"
+//#include <ddk/miniport.h>
+#include <ddk/ntapi.h>
+
+#ifdef DBG
+#define DPRINT(arg) DbgPrint arg;
+#else
+#define DPRINT(arg)
+#endif
+
+// Export funcs here
+/*
+BOOL FASTCALL
+VBESetColorRegisters(
+ PVBE_DEVICE_EXTENSION DeviceExtension,
+ PVIDEO_CLUT ColorLookUpTable,
+ PSTATUS_BLOCK StatusBlock);
+*/
+#endif /* USBEHCI_H */
--- trunk/reactos/drivers/usb/miniport/usbehci/usbehci.rc 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/miniport/usbehci/usbehci.rc 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,5 @@
+#define REACTOS_VERSION_DLL
+#define REACTOS_STR_FILE_DESCRIPTION "USB EHCI miniport Device Driver\0"
+#define REACTOS_STR_INTERNAL_NAME "usbehci\0"
+#define REACTOS_STR_ORIGINAL_FILENAME "usbehci.sys\0"
+#include <reactos/version.rc>
--- trunk/reactos/drivers/usb/miniport/usbohci/makefile 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/miniport/usbohci/makefile 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,16 @@
+PATH_TO_TOP = ../../../..
+
+TARGET_TYPE = driver
+
+TARGET_NAME = usbohci
+
+TARGET_DDKLIBS = ntoskrnl.a usbport.a
+
+TARGET_CFLAGS = -Werror -Wall -I$(PATH_TO_TOP)/ntoskrnl/include -D__USE_W32API
+
+TARGET_OBJECTS = \
+ usbohci.o
+
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
--- trunk/reactos/drivers/usb/miniport/usbohci/usbohci.c 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/miniport/usbohci/usbohci.c 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,41 @@
+/*
+ * ReactOS USB OpenHCI miniport driver
+ * Copyright (C) 2004 Mark Tempel
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+/* INCLUDES *******************************************************************/
+
+#include "usbohci.h"
+#include "../../usbport/usbport.h"
+
+/* PUBLIC AND PRIVATE FUNCTIONS ***********************************************/
+
+NTSTATUS STDCALL
+DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
+{
+ PUSB_CONTROLLER_INTERFACE ControllerInterface;
+
+ USBPORT_AllocateUsbControllerInterface(&ControllerInterface);
+
+ /*
+ * Set up the list of callbacks here.
+ * TODO TODO TODO
+ */
+
+ return USBPORT_RegisterUSBPortDriver(DriverObject, 0, ControllerInterface);
+}
--- trunk/reactos/drivers/usb/miniport/usbohci/usbohci.h 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/miniport/usbohci/usbohci.h 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,45 @@
+/*
+ * ReactOS USB OpenHCI miniport driver
+ *
+ * Copyright (C) 2004 Mark Tempel
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef USBOHCI_H
+#define USBOHCI_H
+
+/* INCLUDES *******************************************************************/
+
+#include "stddef.h"
+#include "windef.h"
+//#include <ddk/miniport.h>
+#include <ddk/ntapi.h>
+
+#ifdef DBG
+#define DPRINT(arg) DbgPrint arg;
+#else
+#define DPRINT(arg)
+#endif
+
+// Export funcs here
+/*
+BOOL FASTCALL
+VBESetColorRegisters(
+ PVBE_DEVICE_EXTENSION DeviceExtension,
+ PVIDEO_CLUT ColorLookUpTable,
+ PSTATUS_BLOCK StatusBlock);
+*/
+#endif /* USBOHCI_H */
--- trunk/reactos/drivers/usb/miniport/usbohci/usbohci.rc 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/miniport/usbohci/usbohci.rc 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,5 @@
+#define REACTOS_VERSION_DLL
+#define REACTOS_STR_FILE_DESCRIPTION "USB OpenHCI miniport Device Driver\0"
+#define REACTOS_STR_INTERNAL_NAME "usbohci\0"
+#define REACTOS_STR_ORIGINAL_FILENAME "usbohci.sys\0"
+#include <reactos/version.rc>
--- trunk/reactos/drivers/usb/miniport/usbuhci/makefile 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/miniport/usbuhci/makefile 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,16 @@
+PATH_TO_TOP = ../../../..
+
+TARGET_TYPE = driver
+
+TARGET_NAME = usbuhci
+
+TARGET_DDKLIBS = ntoskrnl.a usbport.a
+
+TARGET_CFLAGS = -Werror -Wall -I$(PATH_TO_TOP)/ntoskrnl/include -D__USE_W32API
+
+TARGET_OBJECTS = \
+ usbuhci.o
+
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
--- trunk/reactos/drivers/usb/miniport/usbuhci/usbuhci.c 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/miniport/usbuhci/usbuhci.c 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,41 @@
+/*
+ * ReactOS USB UHCI miniport driver
+ * Copyright (C) 2004 Mark Tempel
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+/* INCLUDES *******************************************************************/
+
+#include "usbuhci.h"
+#include "../../usbport/usbport.h"
+
+/* PUBLIC AND PRIVATE FUNCTIONS ***********************************************/
+
+NTSTATUS STDCALL
+DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
+{
+ PUSB_CONTROLLER_INTERFACE ControllerInterface;
+
+ USBPORT_AllocateUsbControllerInterface(&ControllerInterface);
+
+ /*
+ * Set up the list of callbacks here.
+ * TODO TODO TODO
+ */
+
+ return USBPORT_RegisterUSBPortDriver(DriverObject, 0, ControllerInterface);
+}
--- trunk/reactos/drivers/usb/miniport/usbuhci/usbuhci.h 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/miniport/usbuhci/usbuhci.h 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,45 @@
+/*
+ * ReactOS USB UHCI miniport driver
+ *
+ * Copyright (C) 2004 Mark Tempel
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef USBUHCI_H
+#define USBUHCI_H
+
+/* INCLUDES *******************************************************************/
+
+#include "stddef.h"
+#include "windef.h"
+//#include <ddk/miniport.h>
+#include <ddk/ntapi.h>
+
+#ifdef DBG
+#define DPRINT(arg) DbgPrint arg;
+#else
+#define DPRINT(arg)
+#endif
+
+// Export funcs here
+/*
+BOOL FASTCALL
+VBESetColorRegisters(
+ PVBE_DEVICE_EXTENSION DeviceExtension,
+ PVIDEO_CLUT ColorLookUpTable,
+ PSTATUS_BLOCK StatusBlock);
+*/
+#endif /* USBUHCI_H */
--- trunk/reactos/drivers/usb/miniport/usbuhci/usbuhci.rc 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/miniport/usbuhci/usbuhci.rc 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,5 @@
+#define REACTOS_VERSION_DLL
+#define REACTOS_STR_FILE_DESCRIPTION "USB UHCI miniport Device Driver\0"
+#define REACTOS_STR_INTERNAL_NAME "usbuhci\0"
+#define REACTOS_STR_ORIGINAL_FILENAME "usbuhci.sys\0"
+#include <reactos/version.rc>
--- trunk/reactos/drivers/usb/usbhub/makefile 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/usbhub/makefile 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,16 @@
+PATH_TO_TOP = ../../..
+
+TARGET_TYPE = driver
+
+TARGET_NAME = usbhub
+
+TARGET_DDKLIBS = ntoskrnl.a
+
+TARGET_CFLAGS = -Werror -Wall -I$(PATH_TO_TOP)/ntoskrnl/include -D__USE_W32API
+
+TARGET_OBJECTS = \
+ usbhub.o
+
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
--- trunk/reactos/drivers/usb/usbhub/usbhub.c 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/usbhub/usbhub.c 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,38 @@
+/*
+ * ReactOS USB hub driver
+ * Copyright (C) 2004 Aleksey Bragin
+ * (C) 2005 Mark Tempel
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+/* INCLUDES *******************************************************************/
+#include <stddef.h>
+#include <windef.h>
+#include <ddk/ntddk.h>
+#include "..\usbport\usbport.h"
+
+/* PUBLIC AND PRIVATE FUNCTIONS ***********************************************/
+
+/*
+ * Standard DriverEntry method.
+ */
+NTSTATUS STDCALL
+DriverEntry(IN PVOID Context1, IN PVOID Context2)
+{
+ return STATUS_SUCCESS;
+}
+
--- trunk/reactos/drivers/usb/usbhub/usbhub.def 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/usbhub/usbhub.def 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,4 @@
+;
+; Exports definition file for usbhub.sys
+;
+EXPORTS
--- trunk/reactos/drivers/usb/usbhub/usbhub.h 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/usbhub/usbhub.h 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,10 @@
+/*
+ * Declarations for undocumented usbport.sys calls
+ *
+ * Written by Mark Tempel
+ */
+
+#ifndef _USBHUB_H
+#define _USBHUB_H
+
+#endif /* _USBHUB_H */
--- trunk/reactos/drivers/usb/usbhub/usbhub.rc 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/usbhub/usbhub.rc 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,5 @@
+#define REACTOS_VERSION_DLL
+#define REACTOS_STR_FILE_DESCRIPTION "USB Hub Driver\0"
+#define REACTOS_STR_INTERNAL_NAME "usbhub\0"
+#define REACTOS_STR_ORIGINAL_FILENAME "usbhub.sys\0"
+#include <reactos/version.rc>
--- trunk/reactos/drivers/usb/usbport/makefile 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/usbport/makefile 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,16 @@
+PATH_TO_TOP = ../../..
+
+TARGET_TYPE = export_driver
+
+TARGET_NAME = usbport
+
+TARGET_DDKLIBS = ntoskrnl.a
+
+TARGET_CFLAGS = -Werror -Wall -I$(PATH_TO_TOP)/ntoskrnl/include -D__USE_W32API
+
+TARGET_OBJECTS = \
+ usbport.o
+
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
--- trunk/reactos/drivers/usb/usbport/usbport.c 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/usbport/usbport.c 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,81 @@
+/*
+ * ReactOS USB Port driver
+ * Copyright (C) 2004 Aleksey Bragin
+ * (C) 2005 Mark Tempel
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * STATUS:
+ * 19-Dec-2004 - just a stub for now, but with useful info by Filip
+ */
+
+/* INCLUDES *******************************************************************/
+#include <stddef.h>
+#include <windef.h>
+#include <ddk/ntddk.h>
+#include "usbport.h"
+
+/* PUBLIC AND PRIVATE FUNCTIONS ***********************************************/
+
+/*
+** Standard DriverEntry method.
+** We do nothing here. All real work is done in USBPRORT_RegisterUSBPortDriver.
+*/
+NTSTATUS STDCALL
+DriverEntry(IN PVOID Context1, IN PVOID Context2)
+{
+ return STATUS_SUCCESS;
+}
+/*
+ * This method is used by miniports to connect set up
+ */
+NTSTATUS STDCALL
+USBPORT_RegisterUSBPortDriver(PDRIVER_OBJECT DriverObject, DWORD Unknown1,
+ PUSB_CONTROLLER_INTERFACE Interface)
+{
+ ASSERT(KeGetCurrentIRQL() < DISPATCH_LEVEL);
+
+ return STATUS_SUCCESS;
+}
+
+NTSTATUS STDCALL
+USBPORT_GetHciMn(VOID)
+{
+ return 0x10000001;
+}
+/*
+ * This method is to allow miniports to create
+ */
+NTSTATUS STDCALL
+USBPORT_AllocateUsbControllerInterface(OUT PUSB_CONTROLLER_INTERFACE *pControllerInterface)
+{
+ ASSERT(KeGetCurrentIRQL() < DISPATCH_LEVEL);
+ ASSERT(0 != ControllerObject);
+
+ *pControllerInterface = (PUSB_CONTROLLER_INTERFACE)ExAllocatePoolWithTag(PagedPool, sizeof(USB_CONTROLLER_INTERFACE),USB_CONTROLLER_INTERFACE_TAG);
+ RtlZeroMemory(*pControllerInterface, sizeof(USB_CONTROLLER_INTERFACE));
+
+ return STATUS_SUCCESS;
+}
+
+NTSTATUS STDCALL
+USBPORT_FreeUsbControllerInterface(IN PUSB_CONTROLLER_INTERFACE ControllerInterface)
+{
+ ASSERT(KeGetCurrentIRQL() < DISPATCH_LEVEL);
+
+ ExFreePool(ControllerInterface);
+
+ return STATUS_SUCCESS;
+}
--- trunk/reactos/drivers/usb/usbport/usbport.def 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/usbport/usbport.def 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,8 @@
+;
+; Exports definition file for usbport.sys
+;
+EXPORTS
+USBPORT_RegisterUSBPortDriver@12
+USBPORT_GetHciMn@0
+USBPORT_AllocateUsbControllerInterface@4
+USBPORT_FreeUsbControllerInterface@4
\ No newline at end of file
--- trunk/reactos/drivers/usb/usbport/usbport.h 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/usbport/usbport.h 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,130 @@
+/*
+ * Declarations for undocumented usbport.sys calls
+ *
+ * Written by Filip Navara <xnavara@volny.cz>
+ * Updates by Mark Tempel
+ */
+
+#ifndef _USBPORT_H
+#define _USBPORT_H
+
+#define USB_CONTROLLER_INTERFACE_TAG 0x001E1E10
+
+/**** B E G I N M S I N T E R N A L P R O T O C O L ****/
+typedef DWORD (*POPEN_ENDPOINT)(
+ DWORD Unknown1,
+ DWORD Unknown2,
+ DWORD Unknown3
+);
+
+typedef NTSTATUS (*PPOKE_ENDPOINT)(
+ DWORD Unknown1,
+ DWORD Unknown2,
+ DWORD Unknown3
+);
+
+typedef DWORD (*PQUERY_ENDPOINT_REQUIREMENTS)(
+ DWORD Unknown1,
+ DWORD Unknown2,
+ DWORD Unknown3
+);
+
+typedef VOID (*PCLOSE_ENDPOINT)(
+ DWORD Unknown1,
+ DWORD Unknown2
+);
+
+
+
+typedef struct {
+ DWORD Unknown1; /* 2 (UHCI), 3 (EHCI) */
+ DWORD Unknown2; /* 2C3 (UHCI), 95 (EHCI) */
+ DWORD Unknown3; /* 2EE0 (UHCI), 61A80 (EHCI) */
+ DWORD Unknown4; /* - */
+ DWORD Unknown5; /* 164 (UHCI), 178 (EHCI) */
+ DWORD Unknown6; /* 8C (UHCI), A0 (EHCI) */
+ DWORD Unknown7; /* 1C (UHCI), 30 (EHCI) */ /* Offset: 118 */
+ DWORD Unknown8; /* - */
+ DWORD Unknown9; /* - */
+ DWORD Unknown10; /* 2280 (UHCI), 2C800 (EHCI) */ /* Offset: 124 */
+ POPEN_ENDPOINT OpenEndpoint;
+ PPOKE_ENDPOINT PokeEndpoint;
+ PQUERY_ENDPOINT_REQUIREMENTS QueryEndpointRequirements;
+ PCLOSE_ENDPOINT CloseEndpoint;
+ PVOID StartController; /* P00010A1C (2) */ /* Offset: 138 */
+ PVOID StopController; /* P00010952 */ /* Offset: 13C */
+ PVOID SuspendController; /* P00011584 */ /* Offset: 140 */
+ PVOID ResumeController; /* P0001164C */ /* Offset: 144 */
+ PVOID InterruptService; /* P00013C72 */ /* Offset: 148 */
+ PVOID InterruptDpc; /* P00013D8E */ /* Offset: 14C */
+ PVOID SubmitTransfer; /* P00011010 */ /* Offset: 150 */
+ PVOID IsochTransfer; /* P000136E8 */ /* Offset: 154 */
+ PVOID AbortTransfer; /* P00011092 */ /* Offset: 158 */
+ PVOID GetEndpointState; /* P00010F48 */ /* Offset: 15C */
+ PVOID SetEndpointState; /* P00010EFA */ /* Offset: 160 */
+ PVOID PollEndpoint; /* P00010D32 */ /* Offset: 164 */
+ PVOID CheckController; /* P00011794 */ /* Offset: 168 */
+ PVOID Get32BitFrameNumber; /* P00010F86 */ /* Offset: 16C */
+ PVOID InterruptNextSOF; /* P00013F56 */ /* Offset: 170 */
+ PVOID EnableInterrupts; /* P00013ED0 */ /* Offset: 174 */
+ PVOID DisableInterrupts; /* P00013E18 */ /* Offset: 178 */
+ PVOID PollController; /* P00010FF2 */ /* Offset: 17C */
+ PVOID SetEndpointDataToggle; /* P000110E6 */ /* Offset: 180 */
+ PVOID GetEndpointStatus; /* P00010ECE */ /* Offset: 184 */
+ PVOID SetEndpointStatus; /* P00010E52 */ /* Offset: 188 */
+ DWORD Unknown36; /* - */
+ PVOID RHGetRootHubData; /* P00011AC6 */ /* Offset: 190 */
+ PVOID RHGetStatus; /* P00011B1A */ /* Offset: 194 */
+ PVOID RHGetPortStatus; /* P00011BBA */ /* Offset: 198 */
+ PVOID RHGetHubStatus; /* P00011B28 */ /* Offset: 19C */
+ PVOID RHSetFeaturePortReset; /* P00011F84 */ /* Offset: 1A0 */
+ PVOID RHSetFeaturePortPower; /* P00011BB4 */ /* Offset: 1A4 */
+ PVOID RHSetFeaturePortEnable; /* P00011BA2 */ /* Offset: 1A8 */
+ PVOID RHSetFeaturePortSuspend; /* P00011FF8 */ /* Offset: 1AC */
+ PVOID RHClearFeaturePortEnable; /* P00011B90 */ /* Offset: 1B0 */
+ PVOID RHClearFeaturePortPower; /* P00011BB4 */ /* Offset: 1B4 */
+ PVOID RHClearFeaturePortSuspend; /* P0001210E */ /* Offset: 1B8 */
+ PVOID RHClearFeaturePortEnableChange; /* P00012236 */ /* Offset: 1BC */
+ PVOID RHClearFeaturePortConnectChange; /* P000121DE */ /* Offset: 1C0 */
+ PVOID RHClearFeaturePortResetChange; /* P00012284 */ /* Offset: 1C4 */
+ PVOID RHClearFeaturePortSuspendChange; /* P0001229C */ /* Offset: 1C8 */
+ PVOID RHClearFeaturePortOvercurrentChange; /* P000122B4 */ /* Offset: 1CC */
+ PVOID RHDisableIrq; /* P00013F52 */ /* Offset: 1D0 */
+ PVOID RHDisableIrq2; /* P00013F52 */ /* Offset: 1D4 */
+ PVOID StartSendOnePacket; /* P00011144 */ /* Offset: 1D8 */
+ PVOID EndSendOnePacket; /* P000119B6 */ /* Offset: 1DC */
+ PVOID PassThru; /* P000110E0 */ /* Offset: 1E0 */
+ DWORD Unknown58[17]; /* - */
+ PVOID FlushInterrupts; /* P00013EA0 */ /* Offset: 228 */
+ /* ... */
+} USB_CONTROLLER_INTERFACE, *PUSB_CONTROLLER_INTERFACE;
+/**** E N D M S I N T E R N A L P R O T O C O L ****/
+
+/*
+ * With this call USB miniport driver registers itself with usbport.sys
+ *
+ * Unknown1 - Could be 0x64 or 0xC8. (0x9A also ?)
+ * Unknown2 - Pointer to structure which contains function entry points
+ */
+NTSTATUS STDCALL
+USBPORT_RegisterUSBPortDriver(PDRIVER_OBJECT DriverObject, DWORD Unknown1,
+ PUSB_CONTROLLER_INTERFACE Interface);
+
+/*
+ * This function always returns 0x10000001 in Windows XP SP1
+ */
+NTSTATUS STDCALL
+USBPORT_GetHciMn(VOID);
+
+/*
+ * This method is provided for miniports to use to allocate their USB_CONTROLLER_INTERFACEs.
+ */
+NTSTATUS STDCALL
+USBPORT_AllocateUsbControllerInterface(OUT PUSB_CONTROLLER_INTERFACE *pControllerInterface);
+
+/*
+ * We can't have an allocate without a free.
+ */
+NTSTATUS STDCALL
+USBPORT_FreeUsbControllerInterface(IN PUSB_CONTROLLER_INTERFACE ControllerInterface);
+#endif /* _USBPORT_H */
--- trunk/reactos/drivers/usb/usbport/usbport.rc 2005-01-14 16:10:07 UTC (rev 13043)
+++ trunk/reactos/drivers/usb/usbport/usbport.rc 2005-01-14 16:12:34 UTC (rev 13044)
@@ -0,0 +1,5 @@
+#define REACTOS_VERSION_DLL
+#define REACTOS_STR_FILE_DESCRIPTION "USB Port Driver\0"
+#define REACTOS_STR_INTERNAL_NAME "usbport\0"
+#define REACTOS_STR_ORIGINAL_FILENAME "usbport.sys\0"
+#include <reactos/version.rc>