mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
[USB-BRINGUP]
- Fix creating instance id - Print debug message - Sync msmouse with head and add hid installation - Needs input.inf written - HID stack starts to initializes and then fails the to enable the device interface (/drivers/hid/hidclass/pdo.c:511), Logs show that IoGetDeviceObjectPointer() fails with STATUS_UNSUCCESSFUL svn path=/branches/usb-bringup/; revision=54837
This commit is contained in:
@@ -501,15 +501,16 @@ HidClassPDO_PnP(
|
||||
// now register the device interface
|
||||
//
|
||||
Status = IoRegisterDeviceInterface(PDODeviceExtension->Common.HidDeviceExtension.PhysicalDeviceObject, &GUID_DEVINTERFACE_HID, NULL, &PDODeviceExtension->DeviceInterface);
|
||||
DPRINT1("[HIDCLASS] IoRegisterDeviceInterfaceState Status %x\n", Status);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
//
|
||||
// enable device interface
|
||||
//
|
||||
Status = IoSetDeviceInterfaceState(&PDODeviceExtension->DeviceInterface, TRUE);
|
||||
DPRINT1("[HIDCLASS] IoSetDeviceInterFaceState %x\n", Status);
|
||||
}
|
||||
ASSERT(Status == STATUS_SUCCESS);
|
||||
|
||||
//
|
||||
// break
|
||||
//
|
||||
|
||||
@@ -803,6 +803,7 @@ CreateDeviceIds(
|
||||
NTSTATUS Status;
|
||||
ULONG Index;
|
||||
PWCHAR BufferPtr;
|
||||
WCHAR Buffer[100];
|
||||
PHUB_CHILDDEVICE_EXTENSION UsbChildExtension;
|
||||
|
||||
UsbChildExtension = (PHUB_CHILDDEVICE_EXTENSION)UsbChildDeviceObject->DeviceExtension;
|
||||
@@ -959,7 +960,7 @@ CreateDeviceIds(
|
||||
//
|
||||
// the device did not provide a serial number, lets create a pseudo instance id
|
||||
//
|
||||
Index = swprintf(BufferPtr, L"USB\\Vid_%04x&Pid_%04x&1A0700BC\0", UsbChildExtension->DeviceDesc.idVendor, UsbChildExtension->DeviceDesc.idProduct) + 1;
|
||||
Index = swprintf(Buffer, L"0&%04d", UsbChildExtension->PortNumber) + 1;
|
||||
UsbChildExtension->usInstanceId.Buffer = (LPWSTR)ExAllocatePool(NonPagedPool, Index * sizeof(WCHAR));
|
||||
if (UsbChildExtension->usInstanceId.Buffer == NULL)
|
||||
{
|
||||
@@ -970,7 +971,7 @@ CreateDeviceIds(
|
||||
//
|
||||
// copy instance id
|
||||
//
|
||||
RtlCopyMemory(UsbChildExtension->usInstanceId.Buffer, BufferPtr, wcslen(BufferPtr) * sizeof(WCHAR));
|
||||
RtlCopyMemory(UsbChildExtension->usInstanceId.Buffer, Buffer, wcslen(Buffer) * sizeof(WCHAR));
|
||||
UsbChildExtension->usInstanceId.Length = UsbChildExtension->usDeviceId.MaximumLength = Index * sizeof(WCHAR);
|
||||
|
||||
DPRINT1("usDeviceId %wZ\n", &UsbChildExtension->usInstanceId);
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user