From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BD8B2D8363; Tue, 15 Jul 2025 13:49:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752587390; cv=none; b=euG458cLG4quZWhmxFclAKi8RtNzDGIpmMNJi3AI7HwTFJDt2fqH1RZUHt7zp92PqIWxRW0MQkLzrJoLUyIBeXOmkhM6gzdtWhK6WvswYdmJLIUpYImi9fmU23B+tO3sKbpycs1JNBpIqjIyjXHHUgkd6ozJfKRut13BXJxziWc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752587390; c=relaxed/simple; bh=DqYeUxWmp3A4/Kno/s/aZe/gZf1nlOV9ZWDDvt0/iPQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tE86S75C6UJRXYK5LDVfO9+5npncUowNoH3ZV0ZldDH7ko9dhGIej0eZdXtfBGKRJuRNIn3/8EjI1bf3ei8HklaC1LT6XOXzhtFuuSrIMUXcn0dTMTXZFnYBOVYQ+8oA2QOFrEbA3r6cR3Somgd5VJeZJ0NErqjP3pnJED4949c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mUWgg7bo; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="mUWgg7bo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47A49C4CEE3; Tue, 15 Jul 2025 13:49:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1752587389; bh=DqYeUxWmp3A4/Kno/s/aZe/gZf1nlOV9ZWDDvt0/iPQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mUWgg7boq1/FH1KbV4p/XXQGx/E966uRw1fiRBdMxN5n8/TLRtsv92MYGuX6XKOXK STTVwzAKzJ1pJMm6Pt4BV4Kstq4QlG26WCQroygTtk2ob8yASjb+U662NxX4lU0AwX PDku0HyzfQkPT7lL5cz5g+v+LhZtcEpyY1RlfJSg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Paul Menzel , Hans de Goede , Dmitry Torokhov , Wang Hai Subject: [PATCH 6.1 83/88] Input: atkbd - do not skip atkbd_deactivate() when skipping ATKBD_CMD_GETID Date: Tue, 15 Jul 2025 15:14:59 +0200 Message-ID: <20250715130757.903144709@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250715130754.497128560@linuxfoundation.org> References: <20250715130754.497128560@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Hans de Goede commit 9cf6e24c9fbf17e52de9fff07f12be7565ea6d61 upstream. After commit 936e4d49ecbc ("Input: atkbd - skip ATKBD_CMD_GETID in translated mode") not only the getid command is skipped, but also the de-activating of the keyboard at the end of atkbd_probe(), potentially re-introducing the problem fixed by commit be2d7e4233a4 ("Input: atkbd - fix multi-byte scancode handling on reconnect"). Make sure multi-byte scancode handling on reconnect is still handled correctly by not skipping the atkbd_deactivate() call. Fixes: 936e4d49ecbc ("Input: atkbd - skip ATKBD_CMD_GETID in translated mode") Tested-by: Paul Menzel Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240126160724.13278-3-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov Signed-off-by: Wang Hai Signed-off-by: Greg Kroah-Hartman --- drivers/input/keyboard/atkbd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c @@ -807,7 +807,7 @@ static int atkbd_probe(struct atkbd *atk if (atkbd_skip_getid(atkbd)) { atkbd->id = 0xab83; - return 0; + goto deactivate_kbd; } /* @@ -844,6 +844,7 @@ static int atkbd_probe(struct atkbd *atk return -1; } +deactivate_kbd: /* * Make sure nothing is coming from the keyboard and disturbs our * internal state.