|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH 11/14] ConsoleDisable cannot be called at DISPATCH
From: Owen Smith <owen.smith@xxxxxxxxxx>
Move the ConsoleDisable to FdoD0ToD3, similar to PdoSuspend
Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
src/xencons/fdo.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/xencons/fdo.c b/src/xencons/fdo.c
index ef26869..6aad6e2 100644
--- a/src/xencons/fdo.c
+++ b/src/xencons/fdo.c
@@ -1228,10 +1228,6 @@ __FdoD3ToD0(
ASSERT3U(KeGetCurrentIrql(), ==, DISPATCH_LEVEL);
- status = ConsoleEnable(Fdo->Console);
- if (!NT_SUCCESS(status))
- goto fail1;
-
status = XENBUS_STORE(WatchAdd,
&Fdo->StoreInterface,
"device",
@@ -1239,7 +1235,7 @@ __FdoD3ToD0(
ThreadGetEvent(Fdo->ScanThread),
&Fdo->ScanWatch);
if (!NT_SUCCESS(status))
- goto fail2;
+ goto fail1;
(VOID)XENBUS_STORE(Printf,
&Fdo->StoreInterface,
@@ -1255,11 +1251,6 @@ __FdoD3ToD0(
return STATUS_SUCCESS;
-fail2:
- Error("fail2\n");
-
- ConsoleDisable(Fdo->Console);
-
fail1:
Error("fail1 (%08x)\n", status);
@@ -1288,8 +1279,6 @@ __FdoD0ToD3(
Fdo->ScanWatch);
Fdo->ScanWatch = NULL;
- ConsoleDisable(Fdo->Console);
-
Trace("<====\n");
}
@@ -1348,6 +1337,10 @@ FdoD3ToD0(
KeLowerIrql(Irql);
+ status = ConsoleEnable(Fdo->Console);
+ if (!NT_SUCCESS(status))
+ goto fail5;
+
__FdoSetDevicePowerState(Fdo, PowerDeviceD0);
PowerState.DeviceState = PowerDeviceD0;
@@ -1378,6 +1371,11 @@ FdoD3ToD0(
return STATUS_SUCCESS;
+fail5:
+ Error("fail5\n");
+
+ KeRaiseIrql(DISPATCH_LEVEL, &Irql);
+
fail4:
Error("fail4\n");
@@ -1447,6 +1445,8 @@ FdoD0ToD3(
__FdoSetDevicePowerState(Fdo, PowerDeviceD3);
+ ConsoleDisable(Fdo->Console);
+
KeRaiseIrql(DISPATCH_LEVEL, &Irql);
XENBUS_SUSPEND(Deregister,
--
2.8.3
_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/win-pv-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |