Author: cgutman Date: Mon Mar 5 14:42:05 2012 New Revision: 56033
URL: http://svn.reactos.org/svn/reactos?rev=56033&view=rev Log: [USBSTOR] - Deny removal to fix a race with the legacy disk class driver
Modified: trunk/reactos/drivers/usb/usbstor/fdo.c trunk/reactos/drivers/usb/usbstor/pdo.c
Modified: trunk/reactos/drivers/usb/usbstor/fdo.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbstor/fdo.c?r... ============================================================================== --- trunk/reactos/drivers/usb/usbstor/fdo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbstor/fdo.c [iso-8859-1] Mon Mar 5 14:42:05 2012 @@ -374,11 +374,15 @@ case IRP_MN_QUERY_STOP_DEVICE: case IRP_MN_QUERY_REMOVE_DEVICE: { +#if 0 // // we can if nothing is pending // if (DeviceExtension->IrpPendingCount != 0 || DeviceExtension->ActiveSrb != NULL) +#else + if (TRUE) +#endif { /* We have pending requests */ DPRINT1("Failing removal/stop request due to pending requests present\n");
Modified: trunk/reactos/drivers/usb/usbstor/pdo.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbstor/pdo.c?r... ============================================================================== --- trunk/reactos/drivers/usb/usbstor/pdo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbstor/pdo.c [iso-8859-1] Mon Mar 5 14:42:05 2012 @@ -905,10 +905,14 @@ case IRP_MN_QUERY_REMOVE_DEVICE: case IRP_MN_QUERY_STOP_DEVICE: { +#if 0 // // if we're not claimed it's ok // if (DeviceExtension->Claimed) +#else + if (TRUE) +#endif { Status = STATUS_UNSUCCESSFUL; DPRINT1("[USBSTOR] Request %x fails because device is still claimed\n", IoStack->MinorFunction);