[USBSTOR]

- Deny removal to fix a race with the legacy disk class driver

svn path=/trunk/; revision=56033
This commit is contained in:
Cameron Gutman 2012-03-05 14:42:05 +00:00
parent 9816f534ee
commit b244ec1114
2 changed files with 8 additions and 0 deletions

View file

@ -374,11 +374,15 @@ USBSTOR_FdoHandlePnp(
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");

View file

@ -905,10 +905,14 @@ USBSTOR_PdoHandlePnp(
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);