From 5414600e1ea06ea2a0aa69ccd6db0916abba8b32 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 4 May 2025 17:27:23 +0200 Subject: [PATCH] [KBDCLASS] Set the device interface state on device start and device remove --- drivers/input/kbdclass/kbdclass.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/input/kbdclass/kbdclass.c b/drivers/input/kbdclass/kbdclass.c index 357eb581cd1..04bc8dcface 100644 --- a/drivers/input/kbdclass/kbdclass.c +++ b/drivers/input/kbdclass/kbdclass.c @@ -873,6 +873,8 @@ ClassPnp( } else DeviceExtension->FileHandle = NULL; + if (DeviceExtension->InterfaceName.Length != 0) + IoSetDeviceInterfaceState(&DeviceExtension->InterfaceName, TRUE); Irp->IoStatus.Status = Status; IoCompleteRequest(Irp, IO_NO_INCREMENT); return Status; @@ -887,6 +889,8 @@ ClassPnp( break; case IRP_MN_REMOVE_DEVICE: + if (DeviceExtension->InterfaceName.Length != 0) + IoSetDeviceInterfaceState(&DeviceExtension->InterfaceName, FALSE); if (DeviceExtension->FileHandle) { ZwClose(DeviceExtension->FileHandle);