Author: cgutman
Date: Wed Jan 25 01:46:35 2012
New Revision: 55166
URL:
http://svn.reactos.org/svn/reactos?rev=55166&view=rev
Log:
[USBSTOR]
- Fix a bug in SRB queuing
Modified:
branches/usb-bringup-trunk/drivers/usb/usbstor/queue.c
Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/queue.c
URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
==============================================================================
--- branches/usb-bringup-trunk/drivers/usb/usbstor/queue.c [iso-8859-1] (original)
+++ branches/usb-bringup-trunk/drivers/usb/usbstor/queue.c [iso-8859-1] Wed Jan 25
01:46:35 2012
@@ -142,6 +142,8 @@
PFDO_DEVICE_EXTENSION FDODeviceExtension;
BOOLEAN IrpListFreeze;
BOOLEAN SrbProcessing;
+ PIO_STACK_LOCATION IoStack = IoGetCurrentIrpStackLocation(Irp);
+ PSCSI_REQUEST_BLOCK Request =
(PSCSI_REQUEST_BLOCK)IoStack->Parameters.Others.Argument1;
//
// get FDO device extension
@@ -201,10 +203,15 @@
//
if (SrbProcessing)
{
+ ASSERT(FDODeviceExtension->ActiveSrb != NULL);
+
OldDriverCancel = IoSetCancelRoutine(Irp, USBSTOR_Cancel);
}
else
{
+ ASSERT(FDODeviceExtension->ActiveSrb == NULL);
+
+ FDODeviceExtension->ActiveSrb = Request;
OldDriverCancel = IoSetCancelRoutine(Irp, USBSTOR_CancelIo);
}