]> xenbits.xensource.com Git - pvdrivers/win/xenvbd.git/commitdiff
REMOVE_DEVICE must set device to Deleted
authorOwen Smith <owen.smith@citrix.com>
Mon, 29 Jun 2015 13:45:53 +0000 (14:45 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Fri, 10 Jul 2015 16:42:32 +0000 (17:42 +0100)
Signed-off-by: Owen Smith <owen.smith@citrix.com>
src/xenvbd/pdo.c

index 89bfc5af0885f13b6f23e1fec184cf90dd3ca030..a77aeedd8159596fd66612f55720a92d06c44871 100644 (file)
@@ -420,10 +420,8 @@ PdoSetDevicePnpState(
             __PnpStateName(Pdo->DevicePnpState),
             __PnpStateName(State));
 
-    if (Pdo->DevicePnpState == Deleted) {
-        ASSERT(State == Deleted);
+    if (Pdo->DevicePnpState == Deleted)
         return;
-    }
 
     Pdo->PrevPnpState = Pdo->DevicePnpState;
     Pdo->DevicePnpState = State;
@@ -2556,15 +2554,11 @@ __PdoRemoveDevice(
         StorPortNotification(BusChangeDetected, PdoGetFdo(Pdo), 0);
         break;
 
-    case Enumerated:
+    default:
         PdoSetMissing(Pdo, "Removed");
         PdoSetDevicePnpState(Pdo, Deleted);
         StorPortNotification(BusChangeDetected, PdoGetFdo(Pdo), 0);
         break;
-
-    default:
-        PdoSetDevicePnpState(Pdo, Enumerated);
-        break;
     }
 }