ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
September 2005
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
22 participants
582 discussions
Start a n
N
ew thread
[hpoussin] 17791: xHCI:
by hpoussin@svn.reactos.com
xHCI: * Fix value returned by IRP_MN_QUERY_CAPABILITIES and IOCTL_INTERNAL_USB_GET_ROOT_USB_DEVICE * Remove debug output USBHUB: * Don't enumerate too much children. Display informations about them Modified: trunk/reactos/drivers/usb/miniport/common/misc.c Modified: trunk/reactos/drivers/usb/miniport/common/pdo.c Modified: trunk/reactos/drivers/usb/usbhub/fdo.c _____ Modified: trunk/reactos/drivers/usb/miniport/common/misc.c --- trunk/reactos/drivers/usb/miniport/common/misc.c 2005-09-10 23:01:56 UTC (rev 17790) +++ trunk/reactos/drivers/usb/miniport/common/misc.c 2005-09-10 23:50:28 UTC (rev 17791) @@ -87,13 +87,9 @@ Source = va_arg(args, PCSZ); while (Source != NULL) { - DPRINT1("Source = %s\n", Source); RtlInitAnsiString(&AnsiString, Source); - DPRINT1("AnsiString = %Z\n", &AnsiString); - DPRINT1("NLS_MB_CODE_PAGE_TAG = %lu\n", (ULONG)NLS_MB_CODE_PAGE_TAG); DestinationSize += RtlAnsiStringToUnicodeSize(&AnsiString) + sizeof(WCHAR) /* final NULL */; - DPRINT1("DestinationSize = %lu\n", DestinationSize); Source = va_arg(args, PCSZ); } va_end(args); _____ Modified: trunk/reactos/drivers/usb/miniport/common/pdo.c --- trunk/reactos/drivers/usb/miniport/common/pdo.c 2005-09-10 23:01:56 UTC (rev 17790) +++ trunk/reactos/drivers/usb/miniport/common/pdo.c 2005-09-10 23:50:28 UTC (rev 17791) @@ -50,7 +50,7 @@ DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceExtension->FunctionalDeviceObject->Device Extension; pRootHubPointer = (PVOID*)Irp->AssociatedIrp.SystemBuffer; - *pRootHubPointer = (PVOID)DeviceExtension->pdev->bus; /* struct usb_device* */ + *pRootHubPointer = ((struct usb_hcd*)DeviceExtension->pdev->data)->self.root_hub; Information = sizeof(PVOID); Status = STATUS_SUCCESS; } @@ -80,7 +80,7 @@ ULONG IdType; UNICODE_STRING SourceString; UNICODE_STRING String; - NTSTATUS Status; + NTSTATUS Status = STATUS_SUCCESS; IdType = IoGetCurrentIrpStackLocation(Irp)->Parameters.QueryId.IdType; DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension; @@ -96,13 +96,20 @@ } case BusQueryHardwareIDs: { + //CHAR Buffer[2][40]; DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryHardwareIDs\n"); - /* FIXME: Should return - USB\ROOT_HUB&VID????&PID????&REV???? - USB\ROOT_HUB&VID????&PID???? - USB\ROOT_HUB - */ - UsbMpInitMultiSzString(&SourceString, "USB\\ROOT_HUB", NULL); + + /*FIXME: sprintf(Buffer[0], "USB\\VID%04X&PID%04X&REV%04X", + VENDOR, + PRODUCT, + REV); + sprintf(Buffer[1], "USB\\VID%04X&PID%04X", + VENDOR, + PRODUCT); + Status = UsbMpInitMultiSzString( + &SourceString, + Buffer[0], Buffer[1], "USB\\ROOT_HUB", NULL);*/ + Status = UsbMpInitMultiSzString(&SourceString, "USB\\ROOT_HUB", NULL); break; } case BusQueryCompatibleIDs: @@ -121,11 +128,14 @@ return STATUS_NOT_SUPPORTED; } - Status = UsbMpDuplicateUnicodeString( - &String, - &SourceString, - PagedPool); - *Information = (ULONG_PTR)String.Buffer; + if (NT_SUCCESS(Status)) + { + Status = UsbMpDuplicateUnicodeString( + &String, + &SourceString, + PagedPool); + *Information = (ULONG_PTR)String.Buffer; + } return Status; } @@ -184,12 +194,12 @@ /* FIXME: capabilities can change with connected device */ DeviceCapabilities->LockSupported = FALSE; DeviceCapabilities->EjectSupported = FALSE; - DeviceCapabilities->Removable = TRUE; + DeviceCapabilities->Removable = FALSE; DeviceCapabilities->DockDevice = FALSE; DeviceCapabilities->UniqueID = FALSE; - DeviceCapabilities->SilentInstall = FALSE; - DeviceCapabilities->RawDeviceOK = TRUE; - DeviceCapabilities->SurpriseRemovalOK = TRUE; + DeviceCapabilities->SilentInstall = TRUE; + DeviceCapabilities->RawDeviceOK = FALSE; + DeviceCapabilities->SurpriseRemovalOK = FALSE; DeviceCapabilities->HardwareDisabled = FALSE; /* FIXME */ //DeviceCapabilities->NoDisplayInUI = FALSE; /* FIXME */ DeviceCapabilities->DeviceState[0] = PowerDeviceD0; /* FIXME */ _____ Modified: trunk/reactos/drivers/usb/usbhub/fdo.c --- trunk/reactos/drivers/usb/usbhub/fdo.c 2005-09-10 23:01:56 UTC (rev 17790) +++ trunk/reactos/drivers/usb/usbhub/fdo.c 2005-09-10 23:50:28 UTC (rev 17791) @@ -66,7 +66,7 @@ dev = DeviceExtension->dev; /* Create PDOs that are missing */ - for (i = 0; i < USB_MAXCHILDREN; i++) + for (i = 0; i < dev->maxchild; i++) { if (dev->children[i] == NULL) { @@ -110,7 +110,13 @@ if (!NT_SUCCESS(Status)) goto ByeBye; - + DPRINT1("child #%lu: USB\\Vid_%04x&Pid_%04x&Rev_%04x (class %x:%x)\n", + i, + PdoExtension->dev->descriptor.idVendor, + PdoExtension->dev->descriptor.idProduct, + PdoExtension->dev->descriptor.bcdDevice, + PdoExtension->dev->descriptor.bDeviceClass, + PdoExtension->dev->descriptor.bDeviceSubClass); sprintf(Buffer[0], "USB\\Vid_%04x&Pid_%04x&Rev_%04x", PdoExtension->dev->descriptor.idVendor, PdoExtension->dev->descriptor.idProduct,
19 years, 3 months
1
0
0
0
[gvg] 17790: Fix some object/handle victims. Fixes bug 765.
by gvg@svn.reactos.com
Fix some object/handle victims. Fixes bug 765. Modified: trunk/reactos/subsys/win32k/ntuser/window.c _____ Modified: trunk/reactos/subsys/win32k/ntuser/window.c --- trunk/reactos/subsys/win32k/ntuser/window.c 2005-09-10 22:35:08 UTC (rev 17789) +++ trunk/reactos/subsys/win32k/ntuser/window.c 2005-09-10 23:01:56 UTC (rev 17790) @@ -728,7 +728,7 @@ else { hSysMenu = UserCreateMenu(FALSE); - if (NULL == SysMenu) + if (NULL == hSysMenu) { return NULL; } @@ -741,7 +741,7 @@ SysMenu->MenuInfo.Flags |= MF_SYSMENU; SysMenu->MenuInfo.Wnd = Window->hSelf; hNewMenu = co_IntLoadSysMenuTemplate(); - if(!NewMenu) + if(!hNewMenu) { IntReleaseMenuObject(SysMenu); UserDestroyMenu(hSysMenu);
19 years, 3 months
1
0
0
0
[hbirr] 17789: - Acquire the temporary buffer from non paged pool in NtQueryDirectoryObject, because the buffer is accessed at DPC_LEVEL.
by hbirr@svn.reactos.com
- Acquire the temporary buffer from non paged pool in NtQueryDirectoryObject, because the buffer is accessed at DPC_LEVEL. - Do always add an empty entry at the end of the buffer Modified: trunk/reactos/ntoskrnl/ob/dirobj.c _____ Modified: trunk/reactos/ntoskrnl/ob/dirobj.c --- trunk/reactos/ntoskrnl/ob/dirobj.c 2005-09-10 20:19:23 UTC (rev 17788) +++ trunk/reactos/ntoskrnl/ob/dirobj.c 2005-09-10 22:35:08 UTC (rev 17789) @@ -219,14 +219,14 @@ NULL); if(NT_SUCCESS(Status)) { - PVOID TemporaryBuffer = ExAllocatePool(PagedPool, + PVOID TemporaryBuffer = ExAllocatePool(NonPagedPool, BufferLength); if(TemporaryBuffer != NULL) { POBJECT_HEADER EntryHeader; PLIST_ENTRY ListEntry; KIRQL OldLevel; - ULONG RequiredSize = 0; + ULONG RequiredSize = sizeof(OBJECT_DIRECTORY_INFORMATION); ULONG nDirectories = 0; POBJECT_DIRECTORY_INFORMATION DirInfo = (POBJECT_DIRECTORY_INFORMATION)TemporaryBuffer; @@ -315,10 +315,11 @@ if(NT_SUCCESS(Status) && nDirectories > 0) { - PWSTR strbuf = (PWSTR)((POBJECT_DIRECTORY_INFORMATION)TemporaryBuffer + nDirectories); - PWSTR deststrbuf = (PWSTR)((POBJECT_DIRECTORY_INFORMATION)Buffer + nDirectories); + PWSTR strbuf = (PWSTR)((POBJECT_DIRECTORY_INFORMATION)TemporaryBuffer + nDirectories + 1); + PWSTR deststrbuf = (PWSTR)((POBJECT_DIRECTORY_INFORMATION)Buffer + nDirectories + 1); + memset((POBJECT_DIRECTORY_INFORMATION)TemporaryBuffer + nDirectories, 0, sizeof(OBJECT_DIRECTORY_INFORMATION)); - CopyBytes = nDirectories * sizeof(OBJECT_DIRECTORY_INFORMATION); + CopyBytes = (nDirectories + 1) * sizeof(OBJECT_DIRECTORY_INFORMATION); /* copy the names from the objects and append them to the list of the objects. copy to the temporary buffer only because the directory
19 years, 3 months
1
0
0
0
[gvg] 17788: Handle .msi files
by gvg@svn.reactos.com
Handle .msi files Modified: trunk/reactos/bootdata/hivecls.inf _____ Modified: trunk/reactos/bootdata/hivecls.inf --- trunk/reactos/bootdata/hivecls.inf 2005-09-10 19:37:20 UTC (rev 17787) +++ trunk/reactos/bootdata/hivecls.inf 2005-09-10 20:19:23 UTC (rev 17788) @@ -47,6 +47,13 @@ HKCR,".txt","Content Type",0x00000000,"text/plain" HKCR,"txtfile\shell\open\command","",0x00020000,"%SystemRoot%\System32\n otepad.exe %1" +; MSI files +HKCR,".msi","",0x00000000,"MSI.Package" +HKCR,"Msi.Package\DefaultIcon","",0x00000000,"msiexec.exe" +HKCR,"Msi.Package\shell\Open\command","",0x00020000,"%SystemRoot%\Syste m32\msiexec /i %1" +HKCR,"Msi.Package\shell\Repair\command","",0x00020000,"%SystemRoot%\Sys tem32\msiexec /f %1" +HKCR,"Msi.Package\shell\Uninstall\command","",0x00020000,"%SystemRoot%\ System32\msiexec /x %1" + HKCR,"CLSID",,0x00000012 ; For Shell32.dll
19 years, 3 months
1
0
0
0
[gvg] 17787: Also add registry entries when driver files are already present
by gvg@svn.reactos.com
Also add registry entries when driver files are already present Modified: trunk/reactos/subsys/system/vmwinst/vmwinst.c _____ Modified: trunk/reactos/subsys/system/vmwinst/vmwinst.c --- trunk/reactos/subsys/system/vmwinst/vmwinst.c 2005-09-10 19:21:49 UTC (rev 17786) +++ trunk/reactos/subsys/system/vmwinst/vmwinst.c 2005-09-10 19:37:20 UTC (rev 17787) @@ -124,7 +124,8 @@ if(FileHandle == INVALID_HANDLE_VALUE) { - return FALSE; + /* If it was a sharing violation the file must already exist */ + return GetLastError() == ERROR_SHARING_VIOLATION; } if(GetFileSize(FileHandle, NULL) <= 0) @@ -503,7 +504,14 @@ { if(DriverFilesFound) { - /* FIXME - check for existing registry entries! */ + if(!AddVmwareRegistryEntries()) + { + WCHAR Msg[1024]; + LoadString(hAppInstance, IDS_FAILEDTOADDREGENTRIES, Msg, sizeof(Msg) / sizeof(WCHAR)); + MessageBox(GetParent(hwndDlg), Msg, NULL, MB_ICONWARNING); + SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_WELCOMEPAGE); + return TRUE; + } if(!EnableVmwareDriver(TRUE, TRUE, TRUE)) {
19 years, 3 months
1
0
0
0
[gvg] 17786: Auto-determine base of DWORD registry entries.
by gvg@svn.reactos.com
Auto-determine base of DWORD registry entries. Fixes bug 764. Modified: trunk/reactos/lib/setupapi/install.c _____ Modified: trunk/reactos/lib/setupapi/install.c --- trunk/reactos/lib/setupapi/install.c 2005-09-10 19:01:44 UTC (rev 17785) +++ trunk/reactos/lib/setupapi/install.c 2005-09-10 19:21:49 UTC (rev 17786) @@ -334,7 +334,7 @@ if (type == REG_DWORD) { - DWORD dw = str ? strtoulW( str, NULL, 16 ) : 0; + DWORD dw = str ? strtoulW( str, NULL, 0 ) : 0; TRACE( "setting dword %s to %lx\n", debugstr_w(value), dw ); RegSetValueExW( hkey, value, 0, type, (BYTE *)&dw, sizeof(dw) ); }
19 years, 3 months
1
0
0
0
[ekohl] 17785: - Implement CM_Enumerate_Enumerators[_Ex]A/W
by ekohl@svn.reactos.com
- Implement CM_Enumerate_Enumerators[_Ex]A/W - Fix PNP_EnumerateSubKeys Modified: trunk/reactos/include/idl/pnp.idl Modified: trunk/reactos/include/wine/cfgmgr32.h Modified: trunk/reactos/lib/setupapi/cfgmgr.c Modified: trunk/reactos/lib/setupapi/setupapi.spec Modified: trunk/reactos/services/umpnpmgr/umpnpmgr.c _____ Modified: trunk/reactos/include/idl/pnp.idl --- trunk/reactos/include/idl/pnp.idl 2005-09-10 18:45:34 UTC (rev 17784) +++ trunk/reactos/include/idl/pnp.idl 2005-09-10 19:01:44 UTC (rev 17785) @@ -39,6 +39,8 @@ [in] DWORD Length, [in] DWORD Flags); + cpp_quote("#define PNP_BRANCH_ENUM 1") + cpp_quote("#define PNP_BRANCH_CLASS 2") CONFIGRET PNP_EnumerateSubKeys(handle_t BindingHandle, [in] unsigned long Branch, [in] unsigned long Index, _____ Modified: trunk/reactos/include/wine/cfgmgr32.h --- trunk/reactos/include/wine/cfgmgr32.h 2005-09-10 18:45:34 UTC (rev 17784) +++ trunk/reactos/include/wine/cfgmgr32.h 2005-09-10 19:01:44 UTC (rev 17785) @@ -137,6 +137,12 @@ CONFIGRET WINAPI CM_Disconnect_Machine( HMACHINE ); CONFIGRET WINAPI CM_Enumerate_Classes( ULONG, LPGUID, ULONG ); CONFIGRET WINAPI CM_Enumerate_Classes_Ex( ULONG, LPGUID, ULONG, HMACHINE ); +CONFIGRET WINAPI CM_Enumerate_EnumeratorsA( ULONG, PCHAR, PULONG, ULONG ); +CONFIGRET WINAPI CM_Enumerate_EnumeratorsW( ULONG, PWCHAR, PULONG, ULONG ); +#define CM_Enumerate_Enumerators WINELIB_NAME_AW(CM_Enumerate_Enumerators) +CONFIGRET WINAPI CM_Enumerate_Enumerators_ExA( ULONG, PCHAR, PULONG, ULONG, HMACHINE ); +CONFIGRET WINAPI CM_Enumerate_Enumerators_ExW( ULONG, PWCHAR, PULONG, ULONG, HMACHINE ); +#define CM_Enumerate_Enumerators_Ex WINELIB_NAME_AW(CM_Enumerate_Enumerators_Ex) CONFIGRET WINAPI CM_Get_Child( PDEVINST, DEVINST, ULONG ); CONFIGRET WINAPI CM_Get_Child_Ex( PDEVINST, DEVINST, ULONG, HMACHINE ); CONFIGRET WINAPI CM_Get_Class_Key_NameA( LPGUID, LPSTR, PULONG, ULONG ); _____ Modified: trunk/reactos/lib/setupapi/cfgmgr.c --- trunk/reactos/lib/setupapi/cfgmgr.c 2005-09-10 18:45:34 UTC (rev 17784) +++ trunk/reactos/lib/setupapi/cfgmgr.c 2005-09-10 19:01:44 UTC (rev 17785) @@ -314,6 +314,85 @@ /*********************************************************************** + * CM_Enumerate_EnumeratorsA [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Enumerate_EnumeratorsA( + ULONG ulEnumIndex, PCHAR Buffer, PULONG pulLength, ULONG ulFlags) +{ + TRACE("%lu %p %p %lx\n", ulEnumIndex, Buffer, pulLength, ulFlags); + return CM_Enumerate_Enumerators_ExA(ulEnumIndex, Buffer, pulLength, + ulFlags, NULL); +} + + +/********************************************************************** * + * CM_Enumerate_EnumeratorsW [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Enumerate_EnumeratorsW( + ULONG ulEnumIndex, PWCHAR Buffer, PULONG pulLength, ULONG ulFlags) +{ + TRACE("%lu %p %p %lx\n", ulEnumIndex, Buffer, pulLength, ulFlags); + return CM_Enumerate_Enumerators_ExW(ulEnumIndex, Buffer, pulLength, + ulFlags, NULL); +} + + +/********************************************************************** * + * CM_Enumerate_Enumerators_ExA [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Enumerate_Enumerators_ExA( + ULONG ulEnumIndex, PCHAR Buffer, PULONG pulLength, ULONG ulFlags, + HMACHINE hMachine) +{ + FIXME("%lu %p %p %lx %lx\n", ulEnumIndex, Buffer, pulLength, ulFlags, + hMachine); + return CR_CALL_NOT_IMPLEMENTED; +} + + +/********************************************************************** * + * CM_Enumerate_Enumerators_ExW [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Enumerate_Enumerators_ExW( + ULONG ulEnumIndex, PWCHAR Buffer, PULONG pulLength, ULONG ulFlags, + HMACHINE hMachine) +{ + RPC_BINDING_HANDLE BindingHandle = NULL; + + FIXME("%lu %p %p %lx %lx\n", ulEnumIndex, Buffer, pulLength, ulFlags, + hMachine); + + if (Buffer == NULL || pulLength == NULL) + return CR_INVALID_POINTER; + + if (ulFlags != 0) + return CR_INVALID_FLAG; + + Buffer[0] = (WCHAR)0; + + if (hMachine != NULL) + { + BindingHandle = ((PMACHINE_INFO)hMachine)->BindingHandle; + if (BindingHandle == NULL) + return CR_FAILURE; + } + else + { + if (!PnpGetLocalHandles(&BindingHandle, NULL)) + return CR_FAILURE; + } + + return PNP_EnumerateSubKeys(BindingHandle, + PNP_BRANCH_ENUM, + ulEnumIndex, + Buffer, + *pulLength, + pulLength, + ulFlags); +} + + +/********************************************************************** * * CM_Get_Child [SETUPAPI.@] */ CONFIGRET WINAPI CM_Get_Child( _____ Modified: trunk/reactos/lib/setupapi/setupapi.spec --- trunk/reactos/lib/setupapi/setupapi.spec 2005-09-10 18:45:34 UTC (rev 17784) +++ trunk/reactos/lib/setupapi/setupapi.spec 2005-09-10 19:01:44 UTC (rev 17785) @@ -40,10 +40,10 @@ @ stub CM_Enable_DevNode_Ex @ stdcall CM_Enumerate_Classes(long ptr long) @ stdcall CM_Enumerate_Classes_Ex(long ptr long ptr) -@ stub CM_Enumerate_EnumeratorsA -@ stub CM_Enumerate_EnumeratorsW -@ stub CM_Enumerate_Enumerators_ExA -@ stub CM_Enumerate_Enumerators_ExW +@ stdcall CM_Enumerate_EnumeratorsA(long str ptr long) +@ stdcall CM_Enumerate_EnumeratorsW(long wstr ptr long) +@ stdcall CM_Enumerate_Enumerators_ExA(long str ptr long long) +@ stdcall CM_Enumerate_Enumerators_ExW(long wstr ptr long long) @ stub CM_Find_Range @ stub CM_First_Range @ stub CM_Free_Log_Conf _____ Modified: trunk/reactos/services/umpnpmgr/umpnpmgr.c --- trunk/reactos/services/umpnpmgr/umpnpmgr.c 2005-09-10 18:45:34 UTC (rev 17784) +++ trunk/reactos/services/umpnpmgr/umpnpmgr.c 2005-09-10 19:01:44 UTC (rev 17785) @@ -262,15 +262,15 @@ HKEY hKey; DWORD dwError; - DPRINT1("PNP_EnumerateSubKeys() called\n"); + DPRINT("PNP_EnumerateSubKeys() called\n"); switch (Branch) { - case 1: + case PNP_BRANCH_ENUM: hKey = hEnumKey; break; - case 2: + case PNP_BRANCH_CLASS: hKey = hClassKey; break; @@ -289,15 +289,15 @@ NULL); if (dwError != ERROR_SUCCESS) { - ret = CR_FAILURE; + ret = (dwError == ERROR_NO_MORE_ITEMS) ? CR_NO_SUCH_VALUE : CR_FAILURE; } - - DPRINT1("PNP_EnumerateSubKeys() done (returns %lx)\n", ret); - if (ret == CR_SUCCESS) + else { - DPRINT1("Sub key: %S\n", Buffer); + *RequiredLength++; } + DPRINT("PNP_EnumerateSubKeys() done (returns %lx)\n", ret); + return ret; }
19 years, 3 months
1
0
0
0
[hpoussin] 17784: Remove unneeded pointer indirection
by hpoussin@svn.reactos.com
Remove unneeded pointer indirection Modified: trunk/reactos/drivers/usb/miniport/common/fdo.c Modified: trunk/reactos/drivers/usb/miniport/common/usbcommon.h Modified: trunk/reactos/drivers/usb/miniport/usbuhci/uhci.c _____ Modified: trunk/reactos/drivers/usb/miniport/common/fdo.c --- trunk/reactos/drivers/usb/miniport/common/fdo.c 2005-09-10 18:39:34 UTC (rev 17783) +++ trunk/reactos/drivers/usb/miniport/common/fdo.c 2005-09-10 18:45:34 UTC (rev 17784) @@ -118,7 +118,7 @@ DeviceExtension->BaseAddrLength = Descriptor->u.Port.Length; DeviceExtension->Flags = Descriptor->Flags; - ((struct hc_driver *)(*pci_ids)->driver_data)->flags &= ~HCD_MEMORY; + ((struct hc_driver *)pci_ids->driver_data)->flags &= ~HCD_MEMORY; } else if (Descriptor->Type == CmResourceTypeMemory) { @@ -126,7 +126,7 @@ DeviceExtension->BaseAddrLength = Descriptor->u.Memory.Length; DeviceExtension->Flags = Descriptor->Flags; - ((struct hc_driver *)(*pci_ids)->driver_data)->flags |= HCD_MEMORY; + ((struct hc_driver *)pci_ids->driver_data)->flags |= HCD_MEMORY; } } } @@ -135,7 +135,7 @@ /* Print assigned resources */ DPRINT("USBMP: Interrupt Vector 0x%lx, %S base 0x%lx, Length 0x%lx\n", DeviceExtension->InterruptVector, - ((struct hc_driver *)(*pci_ids)->driver_data)->flags & HCD_MEMORY ? L"Memory" : L"I/O", + ((struct hc_driver *)pci_ids->driver_data)->flags & HCD_MEMORY ? L"Memory" : L"I/O", DeviceExtension->BaseAddress, DeviceExtension->BaseAddrLength); _____ Modified: trunk/reactos/drivers/usb/miniport/common/usbcommon.h --- trunk/reactos/drivers/usb/miniport/common/usbcommon.h 2005-09-10 18:39:34 UTC (rev 17783) +++ trunk/reactos/drivers/usb/miniport/common/usbcommon.h 2005-09-10 18:45:34 UTC (rev 17784) @@ -83,6 +83,6 @@ NTSTATUS InitLinuxWrapper(PDEVICE_OBJECT DeviceObject); -extern struct pci_device_id** pci_ids; +extern struct pci_device_id* pci_ids; #endif _____ Modified: trunk/reactos/drivers/usb/miniport/usbuhci/uhci.c --- trunk/reactos/drivers/usb/miniport/usbuhci/uhci.c 2005-09-10 18:39:34 UTC (rev 17783) +++ trunk/reactos/drivers/usb/miniport/usbuhci/uhci.c 2005-09-10 18:45:34 UTC (rev 17784) @@ -8,8 +8,8 @@ #include "uhci.h" extern struct pci_driver uhci_pci_driver; -extern struct pci_device_id* uhci_pci_ids; -struct pci_device_id** pci_ids = &uhci_pci_ids; +extern struct pci_device_id uhci_pci_ids[]; +struct pci_device_id* pci_ids = &uhci_pci_ids[0]; NTSTATUS InitLinuxWrapper(PDEVICE_OBJECT DeviceObject)
19 years, 3 months
1
0
0
0
[royce] 17783: change rest of warnings to allowwarnings - sorry I didn't get to this the other day.
by royce@svn.reactos.com
change rest of warnings to allowwarnings - sorry I didn't get to this the other day. Modified: trunk/rosapps/sysutils/chkdsk/chkdsk.xml Modified: trunk/rosapps/sysutils/chklib/chklib.xml Modified: trunk/rosapps/templates/mdi/mdi.xml _____ Modified: trunk/rosapps/sysutils/chkdsk/chkdsk.xml --- trunk/rosapps/sysutils/chkdsk/chkdsk.xml 2005-09-10 18:04:42 UTC (rev 17782) +++ trunk/rosapps/sysutils/chkdsk/chkdsk.xml 2005-09-10 18:39:34 UTC (rev 17783) @@ -1,4 +1,4 @@ -<module name="chkdsk" type="win32cui" installbase="system32" installname="chkdsk.exe" warnings="true"> +<module name="chkdsk" type="win32cui" installbase="system32" installname="chkdsk.exe" allowwarnings="true"> <define name="__USE_W32API" /> <define name="UNICODE" /> <define name="_UNICODE" /> _____ Modified: trunk/rosapps/sysutils/chklib/chklib.xml --- trunk/rosapps/sysutils/chklib/chklib.xml 2005-09-10 18:04:42 UTC (rev 17782) +++ trunk/rosapps/sysutils/chklib/chklib.xml 2005-09-10 18:39:34 UTC (rev 17783) @@ -1,4 +1,4 @@ -<module name="chklib" type="win32cui" installbase="system32" installname="chklib.exe" warnings="true"> +<module name="chklib" type="win32cui" installbase="system32" installname="chklib.exe" allowwarnings="true"> <linkerflag>--numeric-sort</linkerflag> <define name="__USE_W32API" /> <define name="_WIN32_IE">0x0501</define> _____ Modified: trunk/rosapps/templates/mdi/mdi.xml --- trunk/rosapps/templates/mdi/mdi.xml 2005-09-10 18:04:42 UTC (rev 17782) +++ trunk/rosapps/templates/mdi/mdi.xml 2005-09-10 18:39:34 UTC (rev 17783) @@ -1,4 +1,4 @@ -<module name="template_mdi" type="win32cui" installname="mdi.exe" warnings="true"> +<module name="template_mdi" type="win32cui" installname="mdi.exe" allowwarnings="true"> <include base="template_mdi">.</include> <define name="__USE_W32API" /> <define name="_WIN32_IE">0x0501</define>
19 years, 3 months
1
0
0
0
[hpoussin] 17782: Move shareable part of USB miniport drivers to a new directory. UHCI uses it.
by hpoussin@svn.reactos.com
Move shareable part of USB miniport drivers to a new directory. UHCI uses it. Modified: trunk/reactos/drivers/usb/miniport/common/cleanup.c Modified: trunk/reactos/drivers/usb/miniport/common/close.c Modified: trunk/reactos/drivers/usb/miniport/common/common.xml Modified: trunk/reactos/drivers/usb/miniport/common/create.c Modified: trunk/reactos/drivers/usb/miniport/common/fdo.c Added: trunk/reactos/drivers/usb/miniport/common/main.c Modified: trunk/reactos/drivers/usb/miniport/common/misc.c Modified: trunk/reactos/drivers/usb/miniport/common/pdo.c Deleted: trunk/reactos/drivers/usb/miniport/common/uhci.c Deleted: trunk/reactos/drivers/usb/miniport/common/uhci.h Added: trunk/reactos/drivers/usb/miniport/common/usbcommon.h Added: trunk/reactos/drivers/usb/miniport/common/usbcommon_types.h Modified: trunk/reactos/drivers/usb/miniport/linux/pci_hal.c Modified: trunk/reactos/drivers/usb/miniport/sys/linuxwrapper.c Modified: trunk/reactos/drivers/usb/miniport/usbuhci/uhci-hcd.c Modified: trunk/reactos/drivers/usb/miniport/usbuhci/uhci.c Added: trunk/reactos/drivers/usb/miniport/usbuhci/uhci.h Modified: trunk/reactos/drivers/usb/miniport/usbuhci/usbuhci.xml _____ Modified: trunk/reactos/drivers/usb/miniport/common/cleanup.c --- trunk/reactos/drivers/usb/miniport/common/cleanup.c 2005-09-10 15:36:35 UTC (rev 17781) +++ trunk/reactos/drivers/usb/miniport/common/cleanup.c 2005-09-10 18:04:42 UTC (rev 17782) @@ -1,21 +1,23 @@ /* * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS UHCI controller driver (Cromwell type) - * FILE: drivers/usb/cromwell/uhci/cleanup.c + * PROJECT: ReactOS USB miniport driver (Cromwell type) + * FILE: drivers/usb/miniport/common/cleanup.c * PURPOSE: IRP_MJ_CLEANUP operations * - * PROGRAMMERS: HervÚ Poussineau (hpoussin(a)reactos.com) + * PROGRAMMERS: HervÚ Poussineau (hpoussin(a)reactos.org) */ #define NDEBUG -#include "uhci.h" +#include <debug.h> +#include "usbcommon.h" + NTSTATUS STDCALL -UhciCleanup( +UsbMpCleanup( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { - DPRINT("UHCI: IRP_MJ_CLEANUP\n"); + DPRINT("USBMP: IRP_MJ_CLEANUP\n"); Irp->IoStatus.Information = 0; Irp->IoStatus.Status = STATUS_SUCCESS; _____ Modified: trunk/reactos/drivers/usb/miniport/common/close.c --- trunk/reactos/drivers/usb/miniport/common/close.c 2005-09-10 15:36:35 UTC (rev 17781) +++ trunk/reactos/drivers/usb/miniport/common/close.c 2005-09-10 18:04:42 UTC (rev 17782) @@ -1,24 +1,26 @@ /* * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS UHCI controller driver (Cromwell type) - * FILE: drivers/usb/cromwell/uhci/close.c + * PROJECT: ReactOS USB miniport driver (Cromwell type) + * FILE: drivers/usb/miniport/common/close.c * PURPOSE: IRP_MJ_CLOSE operations * - * PROGRAMMERS: HervÚ Poussineau (hpoussin(a)reactos.com) + * PROGRAMMERS: HervÚ Poussineau (hpoussin(a)reactos.org) */ #define NDEBUG -#include "uhci.h" +#include <debug.h> +#include "usbcommon.h" + NTSTATUS STDCALL -UhciClose( +UsbMpClose( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { - POHCI_DEVICE_EXTENSION pDeviceExtension; + PUSBMP_DEVICE_EXTENSION pDeviceExtension; - DPRINT("UHCI: IRP_MJ_CLOSE\n"); - pDeviceExtension = (POHCI_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + DPRINT("USBMP: IRP_MJ_CLOSE\n"); + pDeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension; InterlockedDecrement((PLONG)&pDeviceExtension->DeviceOpened); Irp->IoStatus.Information = 0; _____ Modified: trunk/reactos/drivers/usb/miniport/common/common.xml --- trunk/reactos/drivers/usb/miniport/common/common.xml 2005-09-10 15:36:35 UTC (rev 17781) +++ trunk/reactos/drivers/usb/miniport/common/common.xml 2005-09-10 18:04:42 UTC (rev 17782) @@ -2,12 +2,12 @@ <define name="__USE_W32API" /> <define name="DEBUG_MODE" /> <include>../linux</include> - <include base="usbport"></include> + <include base="usbport">.</include> <file>cleanup.c</file> <file>close.c</file> <file>create.c</file> <file>fdo.c</file> + <file>main.c</file> <file>misc.c</file> <file>pdo.c</file> - <file>uhci.c</file> </module> _____ Modified: trunk/reactos/drivers/usb/miniport/common/create.c --- trunk/reactos/drivers/usb/miniport/common/create.c 2005-09-10 15:36:35 UTC (rev 17781) +++ trunk/reactos/drivers/usb/miniport/common/create.c 2005-09-10 18:04:42 UTC (rev 17782) @@ -1,27 +1,29 @@ /* * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS UHCI controller driver (Cromwell type) - * FILE: drivers/usb/cromwell/uhci/create.c + * PROJECT: ReactOS USB miniport driver (Cromwell type) + * FILE: drivers/usb/miniport/common/create.c * PURPOSE: IRP_MJ_CREATE operations * - * PROGRAMMERS: HervÚ Poussineau (hpoussin(a)reactos.com) + * PROGRAMMERS: HervÚ Poussineau (hpoussin(a)reactos.org) */ #define NDEBUG -#include "uhci.h" +#include <debug.h> +#include "usbcommon.h" + NTSTATUS STDCALL -UhciCreate( +UsbMpCreate( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { PIO_STACK_LOCATION Stack; - POHCI_DEVICE_EXTENSION DeviceExtension; + PUSBMP_DEVICE_EXTENSION DeviceExtension; NTSTATUS Status; - DPRINT("UHCI: IRP_MJ_CREATE\n"); + DPRINT("USBMP: IRP_MJ_CREATE\n"); Stack = IoGetCurrentIrpStackLocation(Irp); - DeviceExtension = (POHCI_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension; if (Stack->Parameters.Create.Options & FILE_DIRECTORY_FILE) { _____ Modified: trunk/reactos/drivers/usb/miniport/common/fdo.c --- trunk/reactos/drivers/usb/miniport/common/fdo.c 2005-09-10 15:36:35 UTC (rev 17781) +++ trunk/reactos/drivers/usb/miniport/common/fdo.c 2005-09-10 18:04:42 UTC (rev 17782) @@ -1,20 +1,22 @@ /* * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS UHCI controller driver (Cromwell type) - * FILE: drivers/usb/cromwell/uhci/fdo.c + * PROJECT: ReactOS USB miniport driver (Cromwell type) + * FILE: drivers/usb/miniport/common/fdo.c * PURPOSE: IRP_MJ_PNP/IRP_MJ_DEVICE_CONTROL operations for FDOs * - * PROGRAMMERS: HervÚ Poussineau (hpoussin(a)reactos.com), + * PROGRAMMERS: HervÚ Poussineau (hpoussin(a)reactos.org), * James Tabor (jimtabor(a)adsl-64-217-116-74.dsl.hstntx.swbell.net) */ #define NDEBUG -#include "uhci.h" +#include <debug.h> +#include "usbcommon.h" + #define IO_METHOD_FROM_CTL_CODE(ctlCode) (ctlCode&0x00000003) static VOID -UhciGetUserBuffers( +UsbMpGetUserBuffers( IN PIRP Irp, IN ULONG IoControlCode, OUT PVOID* BufferIn, @@ -47,14 +49,14 @@ } NTSTATUS STDCALL -UhciFdoStartDevice( +UsbMpFdoStartDevice( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation(Irp); PDRIVER_OBJECT DriverObject; - POHCI_DRIVER_EXTENSION DriverExtension; - POHCI_DEVICE_EXTENSION DeviceExtension; + PUSBMP_DRIVER_EXTENSION DriverExtension; + PUSBMP_DEVICE_EXTENSION DeviceExtension; PCM_RESOURCE_LIST AllocatedResources; /* @@ -62,7 +64,7 @@ */ DriverObject = DeviceObject->DriverObject; DriverExtension = IoGetDriverObjectExtension(DriverObject, DriverObject); - DeviceExtension = (POHCI_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension; /* * Store some resources in the DeviceExtension. @@ -131,7 +133,7 @@ } /* Print assigned resources */ - DPRINT("UHCI: Interrupt Vector 0x%lx, %S base 0x%lx, Length 0x%lx\n", + DPRINT("USBMP: Interrupt Vector 0x%lx, %S base 0x%lx, Length 0x%lx\n", DeviceExtension->InterruptVector, ((struct hc_driver *)(*pci_ids)->driver_data)->flags & HCD_MEMORY ? L"Memory" : L"I/O", DeviceExtension->BaseAddress, @@ -142,15 +144,15 @@ } static NTSTATUS -UhciFdoQueryBusRelations( +UsbMpFdoQueryBusRelations( IN PDEVICE_OBJECT DeviceObject, OUT PDEVICE_RELATIONS* pDeviceRelations) { - POHCI_DEVICE_EXTENSION DeviceExtension; + PUSBMP_DEVICE_EXTENSION DeviceExtension; PDEVICE_RELATIONS DeviceRelations; NTSTATUS Status = STATUS_SUCCESS; - DeviceExtension = (POHCI_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension; /* Handling this IRP is easy, as we only * have one child: the root hub @@ -171,7 +173,7 @@ } NTSTATUS STDCALL -UhciPnpFdo( +UsbMpPnpFdo( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { @@ -189,7 +191,7 @@ { Status = ForwardIrpAndWait(DeviceObject, Irp); if (NT_SUCCESS(Status) && NT_SUCCESS(Irp->IoStatus.Status)) - Status = UhciFdoStartDevice(DeviceObject, Irp); + Status = UsbMpFdoStartDevice(DeviceObject, Irp); break; } @@ -219,18 +221,18 @@ case BusRelations: { PDEVICE_RELATIONS DeviceRelations; - DPRINT("UHCI: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / BusRelations\n"); - Status = UhciFdoQueryBusRelations(DeviceObject, &DeviceRelations); + DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / BusRelations\n"); + Status = UsbMpFdoQueryBusRelations(DeviceObject, &DeviceRelations); Information = (ULONG_PTR)DeviceRelations; break; } case RemovalRelations: { - DPRINT1("UHCI: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / RemovalRelations\n"); + DPRINT1("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / RemovalRelations\n"); return ForwardIrpAndForget(DeviceObject, Irp); } default: - DPRINT1("UHCI: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / Unknown type 0x%lx\n", + DPRINT1("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / Unknown type 0x%lx\n", IrpSp->Parameters.QueryDeviceRelations.Type); return ForwardIrpAndForget(DeviceObject, Irp); } @@ -239,7 +241,7 @@ default: { - DPRINT1("UHCI: unknown minor function 0x%lx\n", MinorFunction); + DPRINT1("USBMP: unknown minor function 0x%lx\n", MinorFunction); return ForwardIrpAndForget(DeviceObject, Irp); } } @@ -250,32 +252,32 @@ } NTSTATUS -UhciDeviceControlFdo( +UsbMpDeviceControlFdo( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { PIO_STACK_LOCATION Stack; ULONG IoControlCode; - POHCI_DEVICE_EXTENSION DeviceExtension; + PUSBMP_DEVICE_EXTENSION DeviceExtension; ULONG LengthIn, LengthOut; ULONG_PTR Information = 0; PVOID BufferIn, BufferOut; NTSTATUS Status; - DPRINT("UHCI: UsbDeviceControlFdo() called\n"); + DPRINT("USBMP: UsbDeviceControlFdo() called\n"); Stack = IoGetCurrentIrpStackLocation(Irp); LengthIn = Stack->Parameters.DeviceIoControl.InputBufferLength; LengthOut = Stack->Parameters.DeviceIoControl.OutputBufferLength; - DeviceExtension = (POHCI_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension; IoControlCode = Stack->Parameters.DeviceIoControl.IoControlCode; - UhciGetUserBuffers(Irp, IoControlCode, &BufferIn, &BufferOut); + UsbMpGetUserBuffers(Irp, IoControlCode, &BufferIn, &BufferOut); switch (IoControlCode) { case IOCTL_GET_HCD_DRIVERKEY_NAME: { - DPRINT("UHCI: IOCTL_GET_HCD_DRIVERKEY_NAME\n"); + DPRINT("USBMP: IOCTL_GET_HCD_DRIVERKEY_NAME\n"); if (LengthOut < sizeof(USB_HCD_DRIVERKEY_NAME)) Status = STATUS_BUFFER_TOO_SMALL; else if (BufferOut == NULL) @@ -286,7 +288,7 @@ ULONG StringSize; StringDescriptor = (PUSB_HCD_DRIVERKEY_NAME)BufferOut; Status = IoGetDeviceProperty( - ((POHCI_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->PhysicalDeviceO bject, + ((PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->PhysicalDevice Object, DevicePropertyDriverKeyName, LengthOut - FIELD_OFFSET(USB_HCD_DRIVERKEY_NAME, DriverKeyName), StringDescriptor->DriverKeyName, @@ -302,7 +304,7 @@ } case IOCTL_USB_GET_ROOT_HUB_NAME: { - DPRINT("UHCI: IOCTL_USB_GET_ROOT_HUB_NAME\n"); + DPRINT("USBMP: IOCTL_USB_GET_ROOT_HUB_NAME\n"); if (LengthOut < sizeof(USB_ROOT_HUB_NAME)) Status = STATUS_BUFFER_TOO_SMALL; else if (BufferOut == NULL) @@ -312,8 +314,8 @@ PUSB_ROOT_HUB_NAME StringDescriptor; PUNICODE_STRING RootHubInterfaceName; StringDescriptor = (PUSB_ROOT_HUB_NAME)BufferOut; - DeviceObject = ((POHCI_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->RootHubPdo; - RootHubInterfaceName = &((POHCI_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->HcdInterfaceNa me; + DeviceObject = ((PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->RootHubPdo; + RootHubInterfaceName = &((PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->HcdInterfaceN ame; StringDescriptor->ActualLength = RootHubInterfaceName->Length + sizeof(WCHAR) + FIELD_OFFSET(USB_ROOT_HUB_NAME, RootHubName); if (StringDescriptor->ActualLength <= LengthOut) @@ -324,7 +326,7 @@ RootHubInterfaceName->Buffer, RootHubInterfaceName->Length); StringDescriptor->RootHubName[RootHubInterfaceName->Length / sizeof(WCHAR)] = UNICODE_NULL; - DPRINT("UHCI: IOCTL_USB_GET_ROOT_HUB_NAME returns '%S'\n", StringDescriptor->RootHubName); + DPRINT("USBMP: IOCTL_USB_GET_ROOT_HUB_NAME returns '%S'\n", StringDescriptor->RootHubName); Information = StringDescriptor->ActualLength; } else @@ -337,7 +339,7 @@ default: { /* Pass Irp to lower driver */ - DPRINT1("UHCI: Unknown IOCTL code 0x%lx\n", Stack->Parameters.DeviceIoControl.IoControlCode); + DPRINT1("USBMP: Unknown IOCTL code 0x%lx\n", Stack->Parameters.DeviceIoControl.IoControlCode); IoSkipCurrentIrpStackLocation(Irp); return IoCallDriver(DeviceExtension->NextDeviceObject, Irp); } _____ Copied: trunk/reactos/drivers/usb/miniport/common/main.c (from rev 17776, trunk/reactos/drivers/usb/miniport/common/uhci.c) --- trunk/reactos/drivers/usb/miniport/common/uhci.c 2005-09-10 15:17:07 UTC (rev 17776) +++ trunk/reactos/drivers/usb/miniport/common/main.c 2005-09-10 18:04:42 UTC (rev 17782) @@ -0,0 +1,282 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS USB miniport driver (Cromwell type) + * FILE: drivers/usb/miniport/common/main.c + * PURPOSE: Driver entry + * + * PROGRAMMERS: Aleksey Bragin (aleksey(a)reactos.com) + * HervÚ Poussineau (hpoussin(a)reactos.org), + * + * Some parts of code are inspired (or even just copied) from + * ReactOS Videoport driver (drivers/video/videoprt) + */ + +#define NDEBUG +#include <debug.h> + +#define INITGUID +#include "usbcommon.h" + +static ULONG DeviceNumber = 0; /* FIXME: what is that? */ + +static NTSTATUS +CreateRootHubPdo( + IN PDRIVER_OBJECT DriverObject, + IN PDEVICE_OBJECT Fdo, + OUT PDEVICE_OBJECT* pPdo) +{ + PDEVICE_OBJECT Pdo; + PUSBMP_DEVICE_EXTENSION DeviceExtension; + NTSTATUS Status; + + DPRINT("USBMP: CreateRootHubPdo()\n"); + + Status = IoCreateDevice( + DriverObject, + sizeof(USBMP_DEVICE_EXTENSION), + NULL, /* DeviceName */ + FILE_DEVICE_BUS_EXTENDER, + FILE_DEVICE_SECURE_OPEN | FILE_AUTOGENERATED_DEVICE_NAME, + FALSE, + &Pdo); + if (!NT_SUCCESS(Status)) + { + DPRINT("USBMP: IoCreateDevice() call failed with status 0x%08x\n", Status); + return Status; + } + + Pdo->Flags |= DO_BUS_ENUMERATED_DEVICE; + Pdo->Flags |= DO_POWER_PAGABLE; + + // zerofill device extension + DeviceExtension = (PUSBMP_DEVICE_EXTENSION)Pdo->DeviceExtension; + RtlZeroMemory(DeviceExtension, sizeof(USBMP_DEVICE_EXTENSION)); + + DeviceExtension->IsFDO = FALSE; + DeviceExtension->FunctionalDeviceObject = Fdo; + + Pdo->Flags &= ~DO_DEVICE_INITIALIZING; + + *pPdo = Pdo; + return STATUS_SUCCESS; +} + +NTSTATUS STDCALL +AddDevice( + IN PDRIVER_OBJECT DriverObject, + IN PDEVICE_OBJECT pdo) +{ + PDEVICE_OBJECT fdo; + NTSTATUS Status; + WCHAR DeviceBuffer[20]; + WCHAR LinkDeviceBuffer[20]; + UNICODE_STRING DeviceName; + UNICODE_STRING LinkDeviceName; + PUSBMP_DRIVER_EXTENSION DriverExtension; + PUSBMP_DEVICE_EXTENSION DeviceExtension; + + DPRINT("USBMP: AddDevice called\n"); + + // Allocate driver extension now + DriverExtension = IoGetDriverObjectExtension(DriverObject, DriverObject); + if (DriverExtension == NULL) + { + Status = IoAllocateDriverObjectExtension( + DriverObject, + DriverObject, + sizeof(USBMP_DRIVER_EXTENSION), + (PVOID *)&DriverExtension); + + if (!NT_SUCCESS(Status)) + { + DPRINT("USBMP: Allocating DriverObjectExtension failed.\n"); + return Status; + } + } + + // Create a unicode device name +// DeviceNumber = 0; //TODO: Allocate new device number every time + swprintf(DeviceBuffer, L"\\Device\\USBFDO-%lu", DeviceNumber); + RtlInitUnicodeString(&DeviceName, DeviceBuffer); + + Status = IoCreateDevice(DriverObject, + sizeof(USBMP_DEVICE_EXTENSION), + &DeviceName, + FILE_DEVICE_BUS_EXTENDER, + 0, + FALSE, + &fdo); + + if (!NT_SUCCESS(Status)) + { + DPRINT("USBMP: IoCreateDevice call failed with status 0x%08lx\n", Status); + return Status; + } + + // zerofill device extension + DeviceExtension = (PUSBMP_DEVICE_EXTENSION)fdo->DeviceExtension; + RtlZeroMemory(DeviceExtension, sizeof(USBMP_DEVICE_EXTENSION)); + + /* Create root hub Pdo */ + Status = CreateRootHubPdo(DriverObject, fdo, &DeviceExtension->RootHubPdo); + if (!NT_SUCCESS(Status)) + { + DPRINT("USBMP: CreateRootHubPdo() failed with status 0x%08lx\n", Status); + IoDeleteDevice(fdo); + return Status; + } + + /* Register device interface for controller */ + Status = IoRegisterDeviceInterface( + pdo, + &GUID_DEVINTERFACE_USB_HOST_CONTROLLER, + NULL, + &DeviceExtension->HcdInterfaceName); + if (!NT_SUCCESS(Status)) + { + DPRINT("USBMP: IoRegisterDeviceInterface() failed with status 0x%08lx\n", Status); + IoDeleteDevice(DeviceExtension->RootHubPdo); + IoDeleteDevice(fdo); + return Status; + } + + DeviceExtension->NextDeviceObject = IoAttachDeviceToDeviceStack(fdo, pdo); + + fdo->Flags &= ~DO_DEVICE_INITIALIZING; + + // Initialize device extension + DeviceExtension->IsFDO = TRUE; + DeviceExtension->DeviceNumber = DeviceNumber; + DeviceExtension->PhysicalDeviceObject = pdo; + DeviceExtension->FunctionalDeviceObject = fdo; + DeviceExtension->DriverExtension = DriverExtension; + + /* FIXME: do a loop to find an available number */ + swprintf(LinkDeviceBuffer, L"\\??\\HCD%lu", 0); + + RtlInitUnicodeString(&LinkDeviceName, LinkDeviceBuffer); + + Status = IoCreateSymbolicLink(&LinkDeviceName, &DeviceName); + + if (!NT_SUCCESS(Status)) + { + DPRINT("USBMP: IoCreateSymbolicLink call failed with status 0x%08x\n", Status); + IoDeleteDevice(DeviceExtension->RootHubPdo); + IoDeleteDevice(fdo); + return Status; + } + + return STATUS_SUCCESS; +} + +NTSTATUS STDCALL +IrpStub( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + NTSTATUS Status = STATUS_NOT_SUPPORTED; + + if (((PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) + { + DPRINT1("USBMP: FDO stub for major function 0x%lx\n", + IoGetCurrentIrpStackLocation(Irp)->MajorFunction); +#ifndef NDEBUG + DbgBreakPoint(); +#endif + return ForwardIrpAndForget(DeviceObject, Irp); + } + else + { + /* We can't forward request to the lower driver, because + * we are a Pdo, so we don't have lower driver... + */ + DPRINT1("USBMP: PDO stub for major function 0x%lx\n", + IoGetCurrentIrpStackLocation(Irp)->MajorFunction); +#ifndef NDEBUG + DbgBreakPoint(); +#endif + } + + Status = Irp->IoStatus.Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return Status; +} + +static NTSTATUS STDCALL +DispatchCreate(PDEVICE_OBJECT DeviceObject, PIRP Irp) +{ + if (((PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) + return UsbMpCreate(DeviceObject, Irp); + else + return IrpStub(DeviceObject, Irp); +} + +static NTSTATUS STDCALL +DispatchClose(PDEVICE_OBJECT DeviceObject, PIRP Irp) +{ + if (((PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) + return UsbMpClose(DeviceObject, Irp); + else + return IrpStub(DeviceObject, Irp); +} + +static NTSTATUS STDCALL +DispatchCleanup(PDEVICE_OBJECT DeviceObject, PIRP Irp) +{ + if (((PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) + return UsbMpCleanup(DeviceObject, Irp); + else + return IrpStub(DeviceObject, Irp); +} + +static NTSTATUS STDCALL +DispatchDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) +{ + if (((PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) + return UsbMpDeviceControlFdo(DeviceObject, Irp); + else + return UsbMpDeviceControlPdo(DeviceObject, Irp); +} + +static NTSTATUS STDCALL +DispatchPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) +{ + if (((PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) + return UsbMpPnpFdo(DeviceObject, Irp); + else + return UsbMpPnpPdo(DeviceObject, Irp); +} + +static NTSTATUS STDCALL +DispatchPower(PDEVICE_OBJECT fido, PIRP Irp) +{ + DPRINT1("USBMP: IRP_MJ_POWER unimplemented\n"); + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_SUCCESS; +} + +/* + * Standard DriverEntry method. + */ +NTSTATUS STDCALL +DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegPath) +{ + ULONG i; + + DriverObject->DriverUnload = DriverUnload; + DriverObject->DriverExtension->AddDevice = AddDevice; + + for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++) + DriverObject->MajorFunction[i] = IrpStub; + + DriverObject->MajorFunction[IRP_MJ_CREATE] = DispatchCreate; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = DispatchClose; + DriverObject->MajorFunction[IRP_MJ_CLEANUP] = DispatchCleanup; + DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = DispatchDeviceControl; + DriverObject->MajorFunction[IRP_MJ_PNP] = DispatchPnp; + DriverObject->MajorFunction[IRP_MJ_POWER] = DispatchPower; + + return STATUS_SUCCESS; +} _____ Modified: trunk/reactos/drivers/usb/miniport/common/misc.c --- trunk/reactos/drivers/usb/miniport/common/misc.c 2005-09-10 15:36:35 UTC (rev 17781) +++ trunk/reactos/drivers/usb/miniport/common/misc.c 2005-09-10 18:04:42 UTC (rev 17782) @@ -1,14 +1,16 @@ /* * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS UHCI controller driver (Cromwell type) - * FILE: drivers/usb/cromwell/uhci/misc.c + * PROJECT: ReactOS USB miniport driver (Cromwell type) + * FILE: drivers/usb/miniport/common/misc.c * PURPOSE: Misceallenous operations * - * PROGRAMMERS: HervÚ Poussineau (hpoussin(a)reactos.com), + * PROGRAMMERS: HervÚ Poussineau (hpoussin(a)reactos.org), */ #define NDEBUG -#include "uhci.h" +#include <debug.h> + +#include "usbcommon.h" #include <stdarg.h> NTSTATUS STDCALL @@ -27,7 +29,7 @@ IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { - PDEVICE_OBJECT LowerDevice = ((POHCI_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->NextDeviceObjec t; + PDEVICE_OBJECT LowerDevice = ((PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->NextDeviceObje ct; KEVENT Event; NTSTATUS Status; @@ -36,7 +38,7 @@ KeInitializeEvent(&Event, NotificationEvent, FALSE); IoCopyCurrentIrpStackLocationToNext(Irp); - DPRINT("UHCI: Calling lower device %p [%wZ]\n", LowerDevice, &LowerDevice->DriverObject->DriverName); + DPRINT("USBMP: Calling lower device %p [%wZ]\n", LowerDevice, &LowerDevice->DriverObject->DriverName); IoSetCompletionRoutine(Irp, ForwardIrpAndWaitCompletion, &Event, TRUE, TRUE, TRUE); Status = IoCallDriver(LowerDevice, Irp); @@ -55,7 +57,7 @@ IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { - PDEVICE_OBJECT LowerDevice = ((POHCI_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->NextDeviceObjec t; + PDEVICE_OBJECT LowerDevice = ((PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->NextDeviceObje ct; ASSERT(LowerDevice); @@ -67,7 +69,7 @@ * PnP ids are ANSI-encoded in PnP device string * identification */ NTSTATUS -UhciInitMultiSzString( +UsbMpInitMultiSzString( OUT PUNICODE_STRING Destination, ... /* list of PCSZ */) { @@ -103,7 +105,7 @@ /* Initialize destination string */ DestinationSize += sizeof(WCHAR); // final NULL - Destination->Buffer = (PWSTR)ExAllocatePoolWithTag(PagedPool, DestinationSize, USB_UHCI_TAG); + Destination->Buffer = (PWSTR)ExAllocatePoolWithTag(PagedPool, DestinationSize, USB_MINIPORT_TAG); if (!Destination->Buffer) return STATUS_INSUFFICIENT_RESOURCES; Destination->Length = 0; @@ -123,7 +125,7 @@ Status = RtlAnsiStringToUnicodeString(&UnicodeString, &AnsiString, FALSE); if (!NT_SUCCESS(Status)) { - ExFreePoolWithTag(Destination->Buffer, USB_UHCI_TAG); + ExFreePoolWithTag(Destination->Buffer, USB_MINIPORT_TAG); break; } Destination->Length += UnicodeString.Length + sizeof(WCHAR); @@ -143,7 +145,7 @@ } NTSTATUS -UhciDuplicateUnicodeString( +UsbMpDuplicateUnicodeString( OUT PUNICODE_STRING Destination, IN PUNICODE_STRING Source, IN POOL_TYPE PoolType) _____ Modified: trunk/reactos/drivers/usb/miniport/common/pdo.c --- trunk/reactos/drivers/usb/miniport/common/pdo.c 2005-09-10 15:36:35 UTC (rev 17781) +++ trunk/reactos/drivers/usb/miniport/common/pdo.c 2005-09-10 18:04:42 UTC (rev 17782) @@ -1,22 +1,24 @@ /* * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS UHCI controller driver (Cromwell type) - * FILE: drivers/usb/cromwell/uhci/pdo.c + * PROJECT: ReactOS USB miniport driver (Cromwell type) + * FILE: drivers/usb/miniport/common/pdo.c * PURPOSE: IRP_MJ_PNP/IRP_MJ_DEVICE_CONTROL operations for PDOs * - * PROGRAMMERS: HervÚ Poussineau (hpoussin(a)reactos.com), + * PROGRAMMERS: HervÚ Poussineau (hpoussin(a)reactos.org), * James Tabor (jimtabor(a)adsl-64-217-116-74.dsl.hstntx.swbell.net) */ #define NDEBUG -#include "uhci.h" +#include <debug.h> +#include "usbcommon.h" + extern struct usb_driver hub_driver; #define IO_METHOD_FROM_CTL_CODE(ctlCode) (ctlCode&0x00000003) NTSTATUS -UhciDeviceControlPdo( +UsbMpDeviceControlPdo( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { @@ -24,7 +26,7 @@ ULONG_PTR Information = 0; NTSTATUS Status; - DPRINT("UHCI: UhciDeviceControlPdo() called\n"); + DPRINT("USBMP: UsbMpDeviceControlPdo() called\n"); Stack = IoGetCurrentIrpStackLocation(Irp); Status = Irp->IoStatus.Status; @@ -33,9 +35,9 @@ { case IOCTL_INTERNAL_USB_GET_ROOT_USB_DEVICE: { - POHCI_DEVICE_EXTENSION DeviceExtension; + PUSBMP_DEVICE_EXTENSION DeviceExtension; - DPRINT("UHCI: IOCTL_INTERNAL_USB_GET_ROOT_USB_DEVICE\n"); + DPRINT("USBMP: IOCTL_INTERNAL_USB_GET_ROOT_USB_DEVICE\n"); if (Irp->AssociatedIrp.SystemBuffer == NULL || Stack->Parameters.DeviceIoControl.OutputBufferLength != sizeof(PVOID)) { @@ -44,8 +46,8 @@ else { PVOID* pRootHubPointer; - DeviceExtension = (POHCI_DEVICE_EXTENSION)DeviceObject->DeviceExtension; - DeviceExtension = (POHCI_DEVICE_EXTENSION)DeviceExtension->FunctionalDeviceObject->DeviceE xtension; + DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceExtension->FunctionalDeviceObject->Device Extension; pRootHubPointer = (PVOID*)Irp->AssociatedIrp.SystemBuffer; *pRootHubPointer = (PVOID)DeviceExtension->pdev->bus; /* struct usb_device* */ @@ -56,7 +58,7 @@ } default: { - DPRINT1("UHCI: Unknown IOCTL code 0x%lx\n", Stack->Parameters.DeviceIoControl.IoControlCode); + DPRINT1("USBMP: Unknown IOCTL code 0x%lx\n", Stack->Parameters.DeviceIoControl.IoControlCode); Information = Irp->IoStatus.Information; Status = Irp->IoStatus.Status; } @@ -69,57 +71,57 @@ } static NTSTATUS -UhciPdoQueryId( +UsbMpPdoQueryId( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, OUT ULONG_PTR* Information) { - POHCI_DEVICE_EXTENSION DeviceExtension; + PUSBMP_DEVICE_EXTENSION DeviceExtension; ULONG IdType; UNICODE_STRING SourceString; UNICODE_STRING String; NTSTATUS Status; IdType = IoGetCurrentIrpStackLocation(Irp)->Parameters.QueryId.IdType; - DeviceExtension = (POHCI_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension; RtlInitUnicodeString(&String, NULL); switch (IdType) { case BusQueryDeviceID: { - DPRINT("UHCI: IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryDeviceID\n"); + DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryDeviceID\n"); RtlInitUnicodeString(&SourceString, L"USB\\ROOT_HUB"); break; } case BusQueryHardwareIDs: { - DPRINT("UHCI: IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryHardwareIDs\n"); + DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryHardwareIDs\n"); /* FIXME: Should return USB\ROOT_HUB&VID????&PID????&REV???? USB\ROOT_HUB&VID????&PID???? USB\ROOT_HUB */ - UhciInitMultiSzString(&SourceString, "USB\\ROOT_HUB", NULL); + UsbMpInitMultiSzString(&SourceString, "USB\\ROOT_HUB", NULL); break; } case BusQueryCompatibleIDs: - DPRINT("UHCI: IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryCompatibleIDs\n"); + DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryCompatibleIDs\n"); /* No compatible ID */ *Information = 0; return STATUS_NOT_SUPPORTED; case BusQueryInstanceID: { - DPRINT("UHCI: IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryInstanceID\n"); + DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryInstanceID\n"); RtlInitUnicodeString(&SourceString, L"0000"); /* FIXME */ break; } default: - DPRINT1("UHCI: IRP_MJ_PNP / IRP_MN_QUERY_ID / unknown query id type 0x%lx\n", IdType); + DPRINT1("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_ID / unknown query id type 0x%lx\n", IdType); return STATUS_NOT_SUPPORTED; } - Status = UhciDuplicateUnicodeString( + Status = UsbMpDuplicateUnicodeString( &String, &SourceString, PagedPool); @@ -128,13 +130,13 @@ } static NTSTATUS -UhciPnpStartDevice( +UsbMpPnpStartDevice( IN PDEVICE_OBJECT DeviceObject) { - POHCI_DEVICE_EXTENSION DeviceExtension; + PUSBMP_DEVICE_EXTENSION DeviceExtension; NTSTATUS Status; - DeviceExtension = (POHCI_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension; /* Register device interface for root hub */ Status = IoRegisterDeviceInterface( @@ -144,7 +146,7 @@ &DeviceExtension->HcdInterfaceName); if (!NT_SUCCESS(Status)) { - DPRINT("UHCI: IoRegisterDeviceInterface() failed with status 0x%08lx\n", Status); + DPRINT("USBMP: IoRegisterDeviceInterface() failed with status 0x%08lx\n", Status); return Status; } @@ -152,7 +154,7 @@ } NTSTATUS STDCALL -UhciPnpPdo( +UsbMpPnpPdo( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { @@ -168,15 +170,15 @@ { case IRP_MN_START_DEVICE: /* 0x00 */ { - DPRINT("UHCI: IRP_MJ_PNP / IRP_MN_START_DEVICE\n"); - Status = UhciPnpStartDevice(DeviceObject); + DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_START_DEVICE\n"); + Status = UsbMpPnpStartDevice(DeviceObject); break; } case IRP_MN_QUERY_CAPABILITIES: /* 0x09 */ { PDEVICE_CAPABILITIES DeviceCapabilities; ULONG i; - DPRINT("UHCI: IRP_MJ_PNP / IRP_MN_QUERY_CAPABILITIES\n"); + DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_CAPABILITIES\n"); DeviceCapabilities = (PDEVICE_CAPABILITIES)Stack->Parameters.DeviceCapabilities.Capabilities; /* FIXME: capabilities can change with connected device */ @@ -202,7 +204,7 @@ } case IRP_MN_QUERY_RESOURCES: /* 0x0a */ { - DPRINT("UHCI: IRP_MJ_PNP / IRP_MN_QUERY_RESOURCES\n"); + DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_RESOURCES\n"); /* Root buses don't need resources, except the ones of * the usb controller. This PDO is the root bus PDO, so * report no resource by not changing Information and @@ -214,7 +216,7 @@ } case IRP_MN_QUERY_RESOURCE_REQUIREMENTS: /* 0x0b */ { - DPRINT("UHCI: IRP_MJ_PNP / IRP_MN_QUERY_RESOURCE_REQUIREMENTS\n"); + DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_RESOURCE_REQUIREMENTS\n"); /* Root buses don't need resources, except the ones of * the usb controller. This PDO is the root bus PDO, so * report no resource by not changing Information and @@ -233,7 +235,7 @@ { ULONG DescriptionSize; PWSTR Description; - DPRINT("UHCI: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_TEXT / DeviceTextDescription\n"); + DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_TEXT / DeviceTextDescription\n"); Status = IoGetDeviceProperty( DeviceObject, @@ -268,7 +270,7 @@ } default: { - DPRINT1("UHCI: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_TEXT / unknown type 0x%lx\n", + DPRINT1("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_TEXT / unknown type 0x%lx\n", Stack->Parameters.QueryDeviceText.DeviceTextType); Status = STATUS_NOT_SUPPORTED; } @@ -278,7 +280,7 @@ #endif case IRP_MN_QUERY_ID: /* 0x13 */ { - Status = UhciPdoQueryId(DeviceObject, Irp, &Information); + Status = UsbMpPdoQueryId(DeviceObject, Irp, &Information); break; } default: @@ -286,7 +288,7 @@ /* We can't forward request to the lower driver, because * we are a Pdo, so we don't have lower driver... */ - DPRINT1("UHCI: IRP_MJ_PNP / unknown minor function 0x%lx\n", MinorFunction); + DPRINT1("USBMP: IRP_MJ_PNP / unknown minor function 0x%lx\n", MinorFunction); Information = Irp->IoStatus.Information; Status = Irp->IoStatus.Status; } _____ Deleted: trunk/reactos/drivers/usb/miniport/common/uhci.c --- trunk/reactos/drivers/usb/miniport/common/uhci.c 2005-09-10 15:36:35 UTC (rev 17781) +++ trunk/reactos/drivers/usb/miniport/common/uhci.c 2005-09-10 18:04:42 UTC (rev 17782) @@ -1,274 +0,0 @@ -/* - ReactOS specific functions for UHCI module - by Aleksey Bragin (aleksey(a)reactos.com) - and HervÚ Poussineau (hpoussin(a)reactos.com) - Some parts of code are inspired (or even just copied) from ReactOS Videoport driver -*/ -#define NDEBUG -#define INITGUID -#include "uhci.h" - -static ULONG DeviceNumber = 0; /* FIXME: what is that? */ - [truncated at 1000 lines; 719 more skipped]
19 years, 3 months
1
0
0
0
← Newer
1
...
37
38
39
40
41
42
43
...
59
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Results per page:
10
25
50
100
200