mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
[HIDCLASS]
- Silence traces - Signal event when last pending transfer is done - Reject new transfers when stop is in progress svn path=/trunk/; revision=55823
This commit is contained in:
parent
e8ad1a668c
commit
488d2d353b
1 changed files with 29 additions and 7 deletions
|
@ -402,13 +402,13 @@ HidClass_ReadCompleteIrp(
|
|||
//
|
||||
IrpContext = (PHIDCLASS_IRP_CONTEXT)Ctx;
|
||||
|
||||
DPRINT1("HidClass_ReadCompleteIrp Irql %lu\n", KeGetCurrentIrql());
|
||||
DPRINT1("HidClass_ReadCompleteIrp Status %lx\n", Irp->IoStatus.Status);
|
||||
DPRINT1("HidClass_ReadCompleteIrp Length %lu\n", Irp->IoStatus.Information);
|
||||
DPRINT1("HidClass_ReadCompleteIrp Irp %p\n", Irp);
|
||||
DPRINT1("HidClass_ReadCompleteIrp InputReportBuffer %p\n", IrpContext->InputReportBuffer);
|
||||
DPRINT1("HidClass_ReadCompleteIrp InputReportBufferLength %li\n", IrpContext->InputReportBufferLength);
|
||||
DPRINT1("HidClass_ReadCompleteIrp OriginalIrp %p\n", IrpContext->OriginalIrp);
|
||||
DPRINT("HidClass_ReadCompleteIrp Irql %lu\n", KeGetCurrentIrql());
|
||||
DPRINT("HidClass_ReadCompleteIrp Status %lx\n", Irp->IoStatus.Status);
|
||||
DPRINT("HidClass_ReadCompleteIrp Length %lu\n", Irp->IoStatus.Information);
|
||||
DPRINT("HidClass_ReadCompleteIrp Irp %p\n", Irp);
|
||||
DPRINT("HidClass_ReadCompleteIrp InputReportBuffer %p\n", IrpContext->InputReportBuffer);
|
||||
DPRINT("HidClass_ReadCompleteIrp InputReportBufferLength %li\n", IrpContext->InputReportBufferLength);
|
||||
DPRINT("HidClass_ReadCompleteIrp OriginalIrp %p\n", IrpContext->OriginalIrp);
|
||||
|
||||
//
|
||||
// copy result
|
||||
|
@ -506,6 +506,15 @@ HidClass_ReadCompleteIrp(
|
|||
KeSetEvent(&IrpContext->FileOp->IrpReadComplete, 0, FALSE);
|
||||
}
|
||||
|
||||
if (IrpContext->FileOp->StopInProgress && IsEmpty)
|
||||
{
|
||||
//
|
||||
// last pending irp
|
||||
//
|
||||
DPRINT1("[HIDCLASS] LastPendingTransfer Signalling\n");
|
||||
KeSetEvent(&IrpContext->FileOp->IrpReadComplete, 0, FALSE);
|
||||
}
|
||||
|
||||
//
|
||||
// free irp context
|
||||
//
|
||||
|
@ -643,6 +652,19 @@ HidClass_BuildIrp(
|
|||
//
|
||||
ASSERT(CollectionDescription->InputLength >= ReportDescription->InputLength);
|
||||
|
||||
if (Context->StopInProgress)
|
||||
{
|
||||
//
|
||||
// stop in progress
|
||||
//
|
||||
DPRINT1("[HIDCLASS] Stop In Progress\n");
|
||||
Irp->IoStatus.Status = STATUS_CANCELLED;
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
return STATUS_CANCELLED;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// store report length
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue