The FDO code calls PdoSuspend() and PdoResume() when a PDO is removed or
added (respectively) to the FDO list. However, if the FDO is not in state
D0, this is not the correct thing to do. Currently PdoSuspend() and
PdoResume() do nothing in XENBUS, but the equivalent functions in XENVIF
do and a call to PdoSuspend() when the FDO was in D3 was causing a BSOD.
Commit
5b895423957de23a82dc763dc378e305be16817a fixes this problem in
XENVIF. This patch brings XENBUS into line.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
ASSERT3U(Fdo->References, !=, 0);
Fdo->References++;
- PdoResume(Pdo);
+ if (__FdoGetDevicePowerState(Fdo) == PowerDeviceD0)
+ PdoResume(Pdo);
}
VOID
Dx = (PXENBUS_DX)DeviceObject->DeviceExtension;
ASSERT3U(Dx->Type, ==, PHYSICAL_DEVICE_OBJECT);
- PdoSuspend(Pdo);
+ if (__FdoGetDevicePowerState(Fdo) == PowerDeviceD0)
+ PdoSuspend(Pdo);
RemoveEntryList(&Dx->ListEntry);
ASSERT3U(Fdo->References, !=, 0);
)
{
UNREFERENCED_PARAMETER(Pdo);
+
+ Trace("<===>\n");
}
VOID
)
{
UNREFERENCED_PARAMETER(Pdo);
+
+ Trace("<===>\n");
}
NTSTATUS