[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH] Avoid returning STATUS_PNP_REBOOT_REQUIRED
When emulated devices are present, returning STATUS_PNP_REBOOT_REQUIRED will display the 'reboot required' toast popup, but will also count as a failure when distributing XenNet via Windows Update, which will result in Microsoft pulling the XenNet update. Note: PnpUnplugRequest is called twice in this startup codepath, as the reference count is decreased by PdoStopDevice later and keeping the reference count above zero is needed to unplug the emulated device. Signed-off-by: Owen Smith <owen.smith@xxxxxxxxx> --- src/xenvif/pdo.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/xenvif/pdo.c b/src/xenvif/pdo.c index a3ae061..8ec9814 100644 --- a/src/xenvif/pdo.c +++ b/src/xenvif/pdo.c @@ -1407,7 +1407,6 @@ PdoStartDevice( IN PIRP Irp ) { - PIO_STACK_LOCATION StackLocation; HANDLE SoftwareKey; HANDLE HardwareKey; NTSTATUS status; @@ -1438,18 +1437,15 @@ PdoStartDevice( status = PdoParseMibTable(Pdo, SoftwareKey); if (status == STATUS_PNP_REBOOT_REQUIRED || !PdoUnplugRequested(Pdo)) { - PdoUnplugRequest(Pdo, TRUE); + PdoUnplugRequest(Pdo, TRUE); // fix unplug reference count DriverRequestReboot(); - status = STATUS_PNP_REBOOT_REQUIRED; - goto fail5; + status = STATUS_SUCCESS; } - StackLocation = IoGetCurrentIrpStackLocation(Irp); - status = PdoD3ToD0(Pdo); if (!NT_SUCCESS(status)) - goto fail6; + goto fail5; PdoUnplugRequest(Pdo, TRUE); @@ -1463,9 +1459,6 @@ PdoStartDevice( return STATUS_SUCCESS; -fail6: - Error("fail6\n"); - fail5: Error("fail5\n"); -- 2.44.0.windows.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |