[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:
Johannes Anderwald
2012-01-05 01:24:11 +00:00
parent 4dc6e068e2
commit 21fb64f0bf
3 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -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
//
+3 -2
View File
@@ -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.