]> xenbits.xensource.com Git - pvdrivers/win/xenvbd.git/commitdiff
Force a re-enumeration of PDOs after filter destruction
authorPaul Durrant <paul.durrant@citrix.com>
Wed, 22 Jul 2015 12:25:11 +0000 (13:25 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Wed, 22 Jul 2015 12:26:24 +0000 (13:26 +0100)
If the underlying PDO has not gone away then we need to create a fresh
filter object.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
src/xendisk/fdo.c
src/xendisk/fdo.h
src/xendisk/pdo.c

index 09f785f72701ea81ddfbc955b3dba1aa3dc240d7..cfa1ad3cb1c162291f40d70b3680fa4a4578cbd6 100644 (file)
@@ -165,6 +165,14 @@ __FdoGetPhysicalDeviceObject(
     return Fdo->PhysicalDeviceObject;
 }
 
+PDEVICE_OBJECT
+FdoGetPhysicalDeviceObject(
+    IN  PXENDISK_FDO    Fdo
+    )
+{
+    return __FdoGetPhysicalDeviceObject(Fdo);
+}
+
 VOID
 FdoAddPhysicalDeviceObject(
     IN  PXENDISK_FDO    Fdo,
index 0b30911013409be889ab1fdcc09415fde47b68f8..a6fb68bd3a21a1b19f270a67018457a10a49f7f8 100644 (file)
@@ -59,6 +59,11 @@ FdoReleaseMutex(
     IN  PXENDISK_FDO     Fdo
     );
 
+extern PDEVICE_OBJECT
+FdoGetPhysicalDeviceObject(
+    IN  PXENDISK_FDO    Fdo
+    );
+
 extern NTSTATUS
 FdoDispatch(
     IN  PXENDISK_FDO    Fdo,
index dffb294dab6e6d59fba05976ed0d8c27a088c722..07f4cfd0ab4ed4d7bd308bbb164f0e37b2f517d4 100644 (file)
@@ -1098,6 +1098,9 @@ done:
     PdoDestroy(Pdo);
     FdoReleaseMutex(Fdo);
 
+    IoInvalidateDeviceRelations(FdoGetPhysicalDeviceObject(Fdo),
+                                BusRelations);
+
     return status;
 
 fail1: