[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[win-pv-devel] Incorrect device relations in xendisk filter breaking device removal


  • To: "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Ghiya, Murtaza" <murtazg@xxxxxxxxxx>
  • Date: Fri, 12 Jun 2015 16:46:16 +0000
  • Accept-language: en-US
  • Delivery-date: Fri, 12 Jun 2015 16:52:40 +0000
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>
  • Thread-index: AdClLz87IR337AmDRlSaqfTof3M/2A==
  • Thread-topic: [win-pv-devel] Incorrect device relations in xendisk filter breaking device removal

commit c6cee514bba39ecf5fe3e5090c297ac4d6c05139

Author: Murtaza Ghiya <murtazg@xxxxxxxxxx>

Date:   Thu Jun 4 13:03:36 2015 -0700

 

    Fixing the incorrect device relations

 

diff --git a/src/xendisk/fdo.c b/src/xendisk/fdo.c

index 154400f..38cd4f9 100644

--- a/src/xendisk/fdo.c

+++ b/src/xendisk/fdo.c

@@ -883,7 +883,15 @@ FdoQueryDeviceRelations(

     for (ListEntry = Fdo->Dx->ListEntry.Flink;

          ListEntry != &Fdo->Dx->ListEntry;

          ListEntry = ListEntry->Flink)

+    {

+        PXENDISK_DX     Dx = CONTAINING_RECORD(ListEntry, XENDISK_DX, ListEntry);

+        PXENDISK_PDO    Pdo = Dx->Pdo;

+

+        if (PdoGetDevicePnpState(Pdo) == Enumerated && PdoIsMissing(Pdo))

+            continue;

+

         Count++;

+    }

     Size = FIELD_OFFSET(DEVICE_RELATIONS, Objects) + (sizeof (DEVICE_OBJECT) * __min(Count, 1));

@@ -903,6 +911,9 @@ FdoQueryDeviceRelations(

         ASSERT3U(Dx->Type, ==, PHYSICAL_DEVICE_OBJECT);

+        if (PdoGetDevicePnpState(Pdo) == Enumerated && PdoIsMissing(Pdo))

+            continue;

+

         if (PdoGetDevicePnpState(Pdo) == Present)

             PdoSetDevicePnpState(Pdo, Enumerated);

diff --git a/src/xendisk/pdo.c b/src/xendisk/pdo.c

index fe11e18..e90e903 100644

--- a/src/xendisk/pdo.c

+++ b/src/xendisk/pdo.c

@@ -1138,6 +1138,10 @@ done:

         PdoDestroy(Pdo);

         FdoReleaseMutex(Fdo);

     }

+             else if (__PdoGetDevicePnpState(Pdo) == Enumerated)

+             {

+                 __PdoSetMissing(Pdo, "Device removed");

+             }

     return status;

 

_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.