Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1320933rwd; Thu, 18 May 2023 10:30:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6qLpAi3GMr91nlZ+N3xWb5TIpDkQ5RfqTXAOmO1fvJjKUi2p+tNcpSfK3gEmTrsEBhqxHo X-Received: by 2002:a05:6a20:2453:b0:101:4c8c:d1fa with SMTP id t19-20020a056a20245300b001014c8cd1famr719723pzc.5.1684431027961; Thu, 18 May 2023 10:30:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684431027; cv=none; d=google.com; s=arc-20160816; b=xaQPC9NQi224tr+JYO5HWvCwT5n5ftUXx3LCAOV4OekUxmn4kRrpsDHUpF8TQaUAba pEDSFk44tf0RFztLNrcdSBdFV5+rXRgWkzn3SrgrN64snjwSDJKHjae9LMr9nnHSiIhe L1Av5WmoKdbNsuUXfxtQmtUzhepAxs2UGjoOt6hzb8dcB4a0xjTdKW6ji3Ai/JXucrIJ ZPL7GBlPcO7N1PJXCrwiCHd6mOy2vaKu4DB41aKuTiuBm207/Pbpb0iBiHicJN2TCjNY +KQpMZLFYMEELpONdqBrzHLq9gUrpyMuitjzTKmQfsTC0wAvNxiyVZWCX/xQJxKEdgWV 4xuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=b+rwc/rApgwI+dAA3an+HwUXLn0bCgY2XPrm6uv+NV8=; b=Mj7KCJWdw1k9WwXgE7YvQ38bc/5MAlCcfKwJDdt/LRpZ0CNFRPidl/dYO3iA5luXaD 1ifsITsPLREFSHLlCBNH1gMjO6DgHSCUKth4bMIJAwjPedIVK88Ai0hce6iB2qNKidV5 Z7o3KaH9a+8Yz//a583RFTJjbzPUXf/CzQJTDBWVoTq7o8wYihuPUGx8NUhQRtYwYW2f BF53B5rRl/ij0SVuF/CE9RwU4+z02FvO5U7l7mKH/CKcoDMtymrn5QYKxZmYfIUhFOS2 wCXXUDBFOZnoIfvy7ltARLtKGe5iNsnUG9tTTKkFbrrqi/Z8SimqxdBvwQSapV1Suvvd MU7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PSkpNA7f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l4-20020a639844000000b005321c4f2f50si1799270pgo.846.2023.05.18.10.30.13; Thu, 18 May 2023 10:30:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PSkpNA7f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229894AbjERRWG (ORCPT + 99 others); Thu, 18 May 2023 13:22:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229875AbjERRWF (ORCPT ); Thu, 18 May 2023 13:22:05 -0400 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C19D71BC for ; Thu, 18 May 2023 10:22:04 -0700 (PDT) Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-76c75d32005so52632439f.1 for ; Thu, 18 May 2023 10:22:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1684430524; x=1687022524; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=b+rwc/rApgwI+dAA3an+HwUXLn0bCgY2XPrm6uv+NV8=; b=PSkpNA7fOT3HlIDrptAtDnmWIkRRMc4Vb6U+89YAScGhdQHDFjWODzeaeEb0ildOfT DHq7xm1T2OeJwmp/JH+voIrMmT4rZ00OgaaIxi829J6h76qeJxk6RCCZmIwogCM1lMFA c2Rcp0rhKT0noWiCNdw35AKYJKsHYBxepNlnA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684430524; x=1687022524; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=b+rwc/rApgwI+dAA3an+HwUXLn0bCgY2XPrm6uv+NV8=; b=bHJtW74QUhfK23AzKZz16ZHGDgXQd5be22sCQTE3yjw2T0IhB+CCDF4oQrwhQEYJAQ /TkvBC56QI+fFMJLlyWCjyRTWIItTJxuodCKOMikdxfcEPSLZAFeKkolmuBjrxLYIgbJ /f+for8BYqR6SF9w13d2i++0Op0tdkkSkx47gpUOT5/B/qcnWUtExvJ22BfgZZtUDdoo dI/m7DLXHbojqWQDVs5UVOR6v2UtGMm0nGGC3H64VG6H71oiFO+yiQzYADwMSIr+2pmd f7PggiPvKUCNqI249DKdr48lXZyi/hkJHlkoPi1Vg/MvvMlrLakffcqS4L062J5jD7ps Nxjg== X-Gm-Message-State: AC+VfDyajc/x9IRuu4tggfOq17u0lJdxeQBLgas75HbfN7pfwVC5KIAt YleLdbsRpcJbTys/QKJb7VeksG0YmPpM+O9JTEE9Xg== X-Received: by 2002:a6b:4f0f:0:b0:760:f795:ccdf with SMTP id d15-20020a6b4f0f000000b00760f795ccdfmr6571153iob.8.1684430524165; Thu, 18 May 2023 10:22:04 -0700 (PDT) Received: from google.com (h24-56-189-219.arvdco.broadband.dynamic.tds.net. [24.56.189.219]) by smtp.gmail.com with ESMTPSA id n19-20020a027153000000b0040f9af9237asm604223jaf.41.2023.05.18.10.22.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 10:22:03 -0700 (PDT) Date: Thu, 18 May 2023 11:22:02 -0600 From: Raul E Rangel To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/7] Input: libps2 - fix NAK handling Message-ID: References: <20230511185252.386941-1-dmitry.torokhov@gmail.com> <20230511185252.386941-5-dmitry.torokhov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230511185252.386941-5-dmitry.torokhov@gmail.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 11, 2023 at 11:52:44AM -0700, Dmitry Torokhov wrote: > Do not try to process "resend" or "reject" responses from the device > as normal response data for a command. > > Signed-off-by: Dmitry Torokhov > --- > drivers/input/serio/libps2.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/input/serio/libps2.c b/drivers/input/serio/libps2.c > index d09450eca9a7..14b70a78875d 100644 > --- a/drivers/input/serio/libps2.c > +++ b/drivers/input/serio/libps2.c > @@ -445,7 +445,7 @@ bool ps2_handle_ack(struct ps2dev *ps2dev, u8 data) > ps2dev->flags &= ~PS2_FLAG_ACK; > wake_up(&ps2dev->wait); > > - if (data != PS2_RET_ACK) > + if (!ps2dev->nak && data != PS2_RET_ACK) > ps2_handle_response(ps2dev, data); > > return true; Reviewed-by: Raul E Rangel