Author: janderwald
Date: Mon Jan 23 04:22:11 2012
New Revision: 55091
URL:
http://svn.reactos.org/svn/reactos?rev=55091&view=rev
Log:
[USBEHCI]
- Don't complete irps with lock held
Modified:
branches/usb-bringup-trunk/drivers/usb/usbehci_new/usb_queue.cpp
Modified: branches/usb-bringup-trunk/drivers/usb/usbehci_new/usb_queue.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
==============================================================================
--- branches/usb-bringup-trunk/drivers/usb/usbehci_new/usb_queue.cpp [iso-8859-1]
(original)
+++ branches/usb-bringup-trunk/drivers/usb/usbehci_new/usb_queue.cpp [iso-8859-1] Mon Jan
23 04:22:11 2012
@@ -695,6 +695,7 @@
IUSBRequest * Request;
BOOLEAN ShouldReleaseWhenDone;
USBD_STATUS UrbStatus;
+ KIRQL OldLevel;
//
// sanity checks
@@ -764,9 +765,19 @@
if (Request->GetQueueHead(&NewQueueHead) == STATUS_SUCCESS)
{
//
+ // first acquire request lock
+ //
+ KeAcquireSpinLock(&m_Lock, &OldLevel);
+
+ //
// add to pending list
//
InsertTailList(&m_PendingRequestAsyncList,
&NewQueueHead->LinkedQueueHeads);
+
+ //
+ // release queue head
+ //
+ KeReleaseSpinLock(&m_Lock, OldLevel);
//
// Done for now
@@ -860,9 +871,19 @@
Request = (IUSBRequest*) CurrentQH->Request;
//
+ // release lock
+ //
+ KeReleaseSpinLock(&m_Lock, OldLevel);
+
+ //
// complete request now
//
QueueHeadCleanup(CurrentQH);
+
+ //
+ // first acquire request lock
+ //
+ KeAcquireSpinLock(&m_Lock, &OldLevel);
}
//