Start of big changes in layout of USB code. Fireball and I are agreeing on these changes.

Step 1: delete all useless stuff

svn path=/trunk/; revision=17745
This commit is contained in:
Hervé Poussineau 2005-09-08 19:58:55 +00:00
parent 21501cda53
commit 1d6a0c4579
23 changed files with 0 additions and 604 deletions

View file

@ -1,9 +0,0 @@
<directory name="usbehci">
<xi:include href="usbehci/usbehci.xml" />
</directory>
<directory name="usbohci">
<xi:include href="usbohci/usbohci.xml" />
</directory>
<directory name="usbuhci">
<xi:include href="usbuhci/usbuhci.xml" />
</directory>

View file

@ -1,41 +0,0 @@
/*
* 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);
}

View file

@ -1,44 +0,0 @@
/*
* 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>
#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 */

View file

@ -1,5 +0,0 @@
#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>

View file

@ -1,9 +0,0 @@
<module name="usbehci" type="kernelmodedriver" installbase="system32/drivers" installname="usbehci.sys">
<define name="__USE_W32API" />
<include base="ntoskrnl">include</include>
<library>ntoskrnl</library>
<library>hal</library>
<library>usbport</library>
<file>usbehci.c</file>
<file>usbehci.rc</file>
</module>

View file

@ -1,41 +0,0 @@
/*
* 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);
}

View file

@ -1,44 +0,0 @@
/*
* 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>
#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 */

View file

@ -1,5 +0,0 @@
#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>

View file

@ -1,9 +0,0 @@
<module name="usbohci" type="kernelmodedriver" installbase="system32/drivers" installname="usbohci.sys">
<define name="__USE_W32API" />
<include base="ntoskrnl">include</include>
<library>ntoskrnl</library>
<library>hal</library>
<library>usbport</library>
<file>usbohci.c</file>
<file>usbohci.rc</file>
</module>

View file

@ -1,43 +0,0 @@
/*
* 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"
#include <debug.h>
/* PUBLIC AND PRIVATE FUNCTIONS ***********************************************/
NTSTATUS STDCALL
DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
{
//return STATUS_SUCCESS;
//DPRINT1("USBUHCI.SYS DriverEntry\n");
PUSB_CONTROLLER_INTERFACE ControllerInterface;
USBPORT_AllocateUsbControllerInterface(&ControllerInterface);
/*
* Set up the list of callbacks here.
* TODO TODO TODO
*/
return USBPORT_RegisterUSBPortDriver(DriverObject, 0, ControllerInterface);
}

View file

@ -1,38 +0,0 @@
/*
* 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>
// Export funcs here
/*
BOOL FASTCALL
VBESetColorRegisters(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_CLUT ColorLookUpTable,
PSTATUS_BLOCK StatusBlock);
*/
#endif /* USBUHCI_H */

View file

@ -1,5 +0,0 @@
#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>

View file

@ -1,9 +0,0 @@
<module name="usbuhci" type="kernelmodedriver" installbase="system32/drivers" installname="usbuhci.sys">
<define name="__USE_W32API" />
<include base="ntoskrnl">include</include>
<library>ntoskrnl</library>
<library>hal</library>
<library>usbport</library>
<file>usbuhci.c</file>
<file>usbuhci.rc</file>
</module>

View file

@ -1,38 +0,0 @@
/*
* 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;
}

View file

@ -1,4 +0,0 @@
;
; Exports definition file for usbhub.sys
;
EXPORTS

View file

@ -1,10 +0,0 @@
/*
* Declarations for undocumented usbport.sys calls
*
* Written by Mark Tempel
*/
#ifndef _USBHUB_H
#define _USBHUB_H
#endif /* _USBHUB_H */

View file

@ -1,5 +0,0 @@
#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>

View file

@ -1,7 +0,0 @@
<module name="usbhub" type="kernelmodedriver" installbase="system32/drivers" installname="usbhub.sys">
<define name="__USE_W32API" />
<library>ntoskrnl</library>
<library>hal</library>
<file>usbhub.c</file>
<file>usbhub.rc</file>
</module>

View file

@ -1,86 +0,0 @@
/*
* 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"
#include <debug.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)
{
DPRINT1("USBPORT.SYS DriverEntry\n");
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)
{
DPRINT1("USBPORT_RegisterUSBPortDriver\n");
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)
{
DPRINT1("USBPORT_AllocateUsbControllerInterface\n");
ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL);
ASSERT(0 != pControllerInterface);
*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)
{
DPRINT1("USBPORT_FreeUsbControllerInterface\n");
ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL);
ExFreePool(ControllerInterface);
return STATUS_SUCCESS;
}

View file

@ -1,8 +0,0 @@
;
; Exports definition file for usbport.sys
;
EXPORTS
USBPORT_RegisterUSBPortDriver@12
USBPORT_GetHciMn@0
USBPORT_AllocateUsbControllerInterface@4
USBPORT_FreeUsbControllerInterface@4

View file

@ -1,130 +0,0 @@
/*
* 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 */

View file

@ -1,5 +0,0 @@
#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>

View file

@ -1,9 +0,0 @@
<module name="usbport" type="kernelmodedriver" installbase="system32/drivers" installname="usbport.sys">
<importlibrary definition="usbport.def" />
<define name="__USE_W32API" />
<include base="ntoskrnl">include</include>
<library>ntoskrnl</library>
<library>hal</library>
<file>usbport.c</file>
<file>usbport.rc</file>
</module>