mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:03:00 +00:00
[USBPORT]
- Avoid unnecessary duplicate variables in USBPORT_FlushPendingTransfers svn path=/trunk/; revision=75737
This commit is contained in:
parent
161bcc1aa2
commit
f8b28727ba
1 changed files with 9 additions and 13 deletions
|
@ -759,10 +759,8 @@ USBPORT_FlushPendingTransfers(IN PUSBPORT_ENDPOINT Endpoint)
|
||||||
BOOLEAN IsEnd = FALSE;
|
BOOLEAN IsEnd = FALSE;
|
||||||
PLIST_ENTRY List;
|
PLIST_ENTRY List;
|
||||||
PUSBPORT_TRANSFER Transfer;
|
PUSBPORT_TRANSFER Transfer;
|
||||||
KIRQL PrevIrql;
|
|
||||||
PURB Urb;
|
PURB Urb;
|
||||||
PIRP Irp;
|
PIRP Irp;
|
||||||
PIRP irp;
|
|
||||||
KIRQL OldIrql;
|
KIRQL OldIrql;
|
||||||
BOOLEAN Result;
|
BOOLEAN Result;
|
||||||
|
|
||||||
|
@ -877,11 +875,9 @@ USBPORT_FlushPendingTransfers(IN PUSBPORT_ENDPOINT Endpoint)
|
||||||
Transfer->TransferLink.Flink = NULL;
|
Transfer->TransferLink.Flink = NULL;
|
||||||
Transfer->TransferLink.Blink = NULL;
|
Transfer->TransferLink.Blink = NULL;
|
||||||
|
|
||||||
irp = Irp;
|
|
||||||
|
|
||||||
if (Irp)
|
if (Irp)
|
||||||
{
|
{
|
||||||
irp = USBPORT_RemovePendingTransferIrp(FdoDevice, Irp);
|
Irp = USBPORT_RemovePendingTransferIrp(FdoDevice, Irp);
|
||||||
}
|
}
|
||||||
|
|
||||||
KeReleaseSpinLockFromDpcLevel(&Endpoint->EndpointSpinLock);
|
KeReleaseSpinLockFromDpcLevel(&Endpoint->EndpointSpinLock);
|
||||||
|
@ -890,13 +886,13 @@ USBPORT_FlushPendingTransfers(IN PUSBPORT_ENDPOINT Endpoint)
|
||||||
|
|
||||||
KeAcquireSpinLock(&FdoExtension->FlushTransferSpinLock, &OldIrql);
|
KeAcquireSpinLock(&FdoExtension->FlushTransferSpinLock, &OldIrql);
|
||||||
|
|
||||||
if (irp)
|
if (Irp)
|
||||||
{
|
{
|
||||||
IoSetCancelRoutine(irp, USBPORT_CancelActiveTransferIrp);
|
IoSetCancelRoutine(Irp, USBPORT_CancelActiveTransferIrp);
|
||||||
|
|
||||||
if (Irp->Cancel && IoSetCancelRoutine(irp, NULL))
|
if (Irp->Cancel && IoSetCancelRoutine(Irp, NULL))
|
||||||
{
|
{
|
||||||
DPRINT_CORE("USBPORT_FlushPendingTransfers: irp - %p\n", irp);
|
DPRINT_CORE("USBPORT_FlushPendingTransfers: irp - %p\n", Irp);
|
||||||
|
|
||||||
KeReleaseSpinLock(&FdoExtension->FlushTransferSpinLock,
|
KeReleaseSpinLock(&FdoExtension->FlushTransferSpinLock,
|
||||||
OldIrql);
|
OldIrql);
|
||||||
|
@ -905,8 +901,8 @@ USBPORT_FlushPendingTransfers(IN PUSBPORT_ENDPOINT Endpoint)
|
||||||
goto Worker;
|
goto Worker;
|
||||||
}
|
}
|
||||||
|
|
||||||
USBPORT_FindUrbInIrpTable(FdoExtension->ActiveIrpTable, Urb, irp);
|
USBPORT_FindUrbInIrpTable(FdoExtension->ActiveIrpTable, Urb, Irp);
|
||||||
USBPORT_InsertIrpInTable(FdoExtension->ActiveIrpTable, irp);
|
USBPORT_InsertIrpInTable(FdoExtension->ActiveIrpTable, Irp);
|
||||||
}
|
}
|
||||||
|
|
||||||
IsMapTransfer = USBPORT_QueueActiveUrbToEndpoint(Endpoint, Urb);
|
IsMapTransfer = USBPORT_QueueActiveUrbToEndpoint(Endpoint, Urb);
|
||||||
|
@ -920,9 +916,9 @@ USBPORT_FlushPendingTransfers(IN PUSBPORT_ENDPOINT Endpoint)
|
||||||
}
|
}
|
||||||
|
|
||||||
Worker:
|
Worker:
|
||||||
KeRaiseIrql(DISPATCH_LEVEL, &PrevIrql);
|
KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
|
||||||
Result = USBPORT_EndpointWorker(Endpoint, FALSE);
|
Result = USBPORT_EndpointWorker(Endpoint, FALSE);
|
||||||
KeLowerIrql(PrevIrql);
|
KeLowerIrql(OldIrql);
|
||||||
|
|
||||||
if (Result)
|
if (Result)
|
||||||
USBPORT_InvalidateEndpointHandler(FdoDevice,
|
USBPORT_InvalidateEndpointHandler(FdoDevice,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue