mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
[HIDCLASS]
- Fix double irp completion bug in hidclass - Hidclass now properly initializes and works in WinServer2003 - Tested excessively by Vic (Blame him ;)) svn path=/trunk/; revision=59049
This commit is contained in:
parent
d0b02e62c0
commit
1b78db23f2
1 changed files with 55 additions and 10 deletions
|
@ -182,9 +182,13 @@ HidClassFDO_DispatchRequestSynchronous(
|
||||||
IoStack->DeviceObject = DeviceObject;
|
IoStack->DeviceObject = DeviceObject;
|
||||||
|
|
||||||
//
|
//
|
||||||
// call driver
|
// sanity check
|
||||||
|
//
|
||||||
|
ASSERT(CommonDeviceExtension->DriverExtension->MajorFunction[IoStack->MajorFunction] != NULL);
|
||||||
|
|
||||||
|
//
|
||||||
|
// call minidriver (hidusb)
|
||||||
//
|
//
|
||||||
DPRINT("IoStack MajorFunction %x MinorFunction %x\n", IoStack->MajorFunction, IoStack->MinorFunction);
|
|
||||||
Status = CommonDeviceExtension->DriverExtension->MajorFunction[IoStack->MajorFunction](DeviceObject, Irp);
|
Status = CommonDeviceExtension->DriverExtension->MajorFunction[IoStack->MajorFunction](DeviceObject, Irp);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -206,6 +210,53 @@ HidClassFDO_DispatchRequestSynchronous(
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
HidClassFDO_DispatchRequest(
|
||||||
|
IN PDEVICE_OBJECT DeviceObject,
|
||||||
|
IN PIRP Irp)
|
||||||
|
{
|
||||||
|
PHIDCLASS_COMMON_DEVICE_EXTENSION CommonDeviceExtension;
|
||||||
|
NTSTATUS Status;
|
||||||
|
PIO_STACK_LOCATION IoStack;
|
||||||
|
|
||||||
|
//
|
||||||
|
// get device extension
|
||||||
|
//
|
||||||
|
CommonDeviceExtension = DeviceObject->DeviceExtension;
|
||||||
|
|
||||||
|
ASSERT(Irp->CurrentLocation > 0);
|
||||||
|
|
||||||
|
//
|
||||||
|
// create stack location
|
||||||
|
//
|
||||||
|
IoSetNextIrpStackLocation(Irp);
|
||||||
|
|
||||||
|
//
|
||||||
|
// get next stack location
|
||||||
|
//
|
||||||
|
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||||
|
|
||||||
|
//
|
||||||
|
// store device object
|
||||||
|
//
|
||||||
|
IoStack->DeviceObject = DeviceObject;
|
||||||
|
|
||||||
|
//
|
||||||
|
// sanity check
|
||||||
|
//
|
||||||
|
ASSERT(CommonDeviceExtension->DriverExtension->MajorFunction[IoStack->MajorFunction] != NULL);
|
||||||
|
|
||||||
|
//
|
||||||
|
// call driver
|
||||||
|
//
|
||||||
|
Status = CommonDeviceExtension->DriverExtension->MajorFunction[IoStack->MajorFunction](DeviceObject, Irp);
|
||||||
|
|
||||||
|
//
|
||||||
|
// done
|
||||||
|
//
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
HidClassFDO_GetDescriptors(
|
HidClassFDO_GetDescriptors(
|
||||||
IN PDEVICE_OBJECT DeviceObject)
|
IN PDEVICE_OBJECT DeviceObject)
|
||||||
|
@ -620,14 +671,8 @@ HidClassFDO_PnP(
|
||||||
//
|
//
|
||||||
// dispatch to mini driver
|
// dispatch to mini driver
|
||||||
//
|
//
|
||||||
IoSkipCurrentIrpStackLocation(Irp);
|
IoCopyCurrentIrpStackLocationToNext(Irp);
|
||||||
Status = HidClassFDO_DispatchRequestSynchronous(DeviceObject, Irp);
|
Status = HidClassFDO_DispatchRequest(DeviceObject, Irp);
|
||||||
|
|
||||||
//
|
|
||||||
// complete request
|
|
||||||
//
|
|
||||||
Irp->IoStatus.Status = Status;
|
|
||||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue