Author: mjmartin
Date: Thu Jan 6 18:45:18 2011
New Revision: 50304
URL: http://svn.reactos.org/svn/reactos?rev=50304&view=rev
Log:
[usb/usbehci]:
- EhciDefferedRoutine: Only free Mdl if one was created when the request was added to the queue.
- Dont assume that three transfer descriptors need to be freed, use a while moving to each linked and free instead.
- Yabba Dabba Doo added to increase size of message. :)
Modified:
trunk/reactos/drivers/usb/usbehci/fdo.c
Modified: trunk/reactos/drivers/usb/usbehci/fdo.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbehci/fdo.c?…
==============================================================================
--- trunk/reactos/drivers/usb/usbehci/fdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbehci/fdo.c [iso-8859-1] Thu Jan 6 18:45:18 2011
@@ -46,12 +46,12 @@
DPRINT("Asyn Complete!\n");
ULONG CurrentAddr, OffSet;
PQUEUE_HEAD CompletedQH, NextQH;
- PQUEUE_TRANSFER_DESCRIPTOR CompletedTD;
+ PQUEUE_TRANSFER_DESCRIPTOR CompletedTD, NextTD;
- /* AsyncListAddr Register will have the next QueueHead to execute */
+ /* AsyncListAddr Register will have the next QueueHead to execute */
CurrentAddr = GetAsyncListQueueRegister(hcd);
- /* Calculate the VA for the next QueueHead */
+ /* Calculate the VA for the next QueueHead */
OffSet = CurrentAddr - (ULONG)FdoDeviceExtension->hcd.CommonBufferPA.LowPart;
NextQH = (PQUEUE_HEAD)((ULONG)FdoDeviceExtension->hcd.CommonBufferVA + OffSet);
@@ -62,16 +62,15 @@
//DumpQueueHead(CompletedQH);
- /* Free memory for the Descriptors */
+ /* Free memory for the Descriptors */
CompletedTD = CompletedQH->TransferDescriptor;
- //DumpTransferDescriptor(CompletedTD);
- FreeDescriptor(CompletedTD);
- CompletedTD = CompletedTD->NextDescriptor;
- //DumpTransferDescriptor(CompletedTD);
- FreeDescriptor(CompletedTD);
- CompletedTD = CompletedTD->NextDescriptor;
- //DumpTransferDescriptor(CompletedTD);
- FreeDescriptor(CompletedTD);
+ NextTD = CompletedTD;
+ while (NextTD)
+ {
+ CompletedTD = NextTD;
+ NextTD = NextTD->NextDescriptor;
+ FreeDescriptor(CompletedTD);
+ }
/* If the Event is set then release waiter */
if (CompletedQH->Event)
@@ -79,27 +78,25 @@
KeSetEvent(CompletedQH->Event, IO_NO_INCREMENT, FALSE);
}
- /* Free the Mdl */
- ASSERT(CompletedQH->MdlToFree);
- IoFreeMdl(CompletedQH->MdlToFree);
+ /* Free the Mdl if there was one */
+ if(CompletedQH->MdlToFree)
+ IoFreeMdl(CompletedQH->MdlToFree);
/* Is there an IRP that needs to be completed */
if (CompletedQH->IrpToComplete)
{
- PIRP Irp;
-
+ PIRP Irp;
+ PIO_STACK_LOCATION Stack;
+ PURB Urb;
+
Irp = CompletedQH->IrpToComplete;
+ Stack = IoGetCurrentIrpStackLocation(Irp);
+ ASSERT(Stack);
+ Urb = (PURB) Stack->Parameters.Others.Argument1;
/* Check for error */
if (CStatus & EHCI_ERROR_INT)
{
- PIO_STACK_LOCATION Stack;
- PURB Urb;
-
- Stack = IoGetCurrentIrpStackLocation(Irp);
- ASSERT(Stack);
- Urb = (PURB) Stack->Parameters.Others.Argument1;
- ASSERT(FALSE);
/* Haled bit should be set */
if (CompletedQH->Token.Bits.Halted)
{
Author: tkreuzer
Date: Thu Jan 6 00:19:40 2011
New Revision: 50296
URL: http://svn.reactos.org/svn/reactos?rev=50296&view=rev
Log:
[WIN32K]
Fix a bug in FLOATOBJ_DivLong
Modified:
trunk/reactos/subsystems/win32/win32k/eng/i386/floatobj.S
Modified: trunk/reactos/subsystems/win32/win32k/eng/i386/floatobj.S
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/i386/floatobj.S [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/i386/floatobj.S [iso-8859-1] Thu Jan 6 00:19:40 2011
@@ -1,4 +1,4 @@
-/*
+/*
* COPYRIGHT: LGPL, see LGPL.txt in the top level directory
* PROJECT: ReactOS Win32 subsystem
* PURPOSE: FLOATOBJ floating point emulation functions for x86
@@ -98,7 +98,7 @@
jz SetFloat0 /* If it's all zero, ... */
shl ecx, 7 /* Put the bits for the mantissa in place */
-
+
cdq /* Fill edx with the sign from the FLOATL in eax */
and ecx, HEX(7fffffff) /* Mask out invalid field in the mantissa */
@@ -818,7 +818,8 @@
push [ebp + PARAM1] /* Push the FLOATOBJ param on the stack */
call _FLOATOBJ_Div@8 /* Divide */
- pop ebp /* Cleanup and return */
+ mov esp, ebp /* Cleanup and return */
+ pop ebp
ret 8