From patchwork Sat Feb 10 21:51:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Zaidman X-Patchwork-Id: 199300 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1667673dyd; Sat, 10 Feb 2024 13:53:51 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUP1yhzEoOpMGOx1lBKmDvRsAMlAuUuTp8fsXl/xg9/ku/a0qQyCij0HS93hgkYv+LHvFERboiMHVv3cO4DJtz0bDYnzg== X-Google-Smtp-Source: AGHT+IHw/u/g/E9WWo2BvEynxZEibkrjDoO2C/iHlsY8WOJ63L4E4mUqoAErsppdpnX1Ey5THJ0z X-Received: by 2002:a05:6808:3997:b0:3bf:ebb9:cc6c with SMTP id gq23-20020a056808399700b003bfebb9cc6cmr5220927oib.30.1707602031521; Sat, 10 Feb 2024 13:53:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707602031; cv=pass; d=google.com; s=arc-20160816; b=UY2ozfDLpH4G70hGoJRXcieWzs/YdahYu3YwNFvIR9O+GnUufuOBU2FX1KIBp/eFMC eJpa9722la9xOQSlRX91Sum/GzIaOb3Gh4UNTCOQ0OgVHHsz5bv3Aqh8BrSJ2acUFpmZ rrbFcrSWwI1EbsZaI16EaCeubnf/qeCTdV/ElGitSuSH2V/8u7SsRRNRACwTTGpdv/Dy 5YYGBUfHT5gF+yTsXxvxeMazI/jFjnZzuBjqgKEWs3FJpGGD5GtUkb7NtD5UbEw1NasH DDSvFZTygqkLIpBPXcezcwPM1wHsUE5IDA7aAPUVAH+lerk3VK5KfTPxlmQ1U5nzM2f6 O6kA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=bVxhkjh/5tBWW60EFdNQVc5luLCi3ZBwXFOGT84jAw0=; fh=EqlA/V4hFYCFCXG8AnB0ZlKgYgxSWTHxCOjSaoYhA9A=; b=b4ue5WDAwbzq7wml7I2K73zJayXeNR9QhbY8yIe9NL6fcx86X7iRTv4X6w63mxeNn3 h/4txW1IobNE3F5Fvcv5cIgy/Bqqqcw6EexehL3N2Jb2CCAy3BapEEq7dyUfiKL+TGuf NF6dqWO9x/vNECccFokuLRq/lbsQRbU0wz6eskB/QqRnvrWSX2U+1p/cU+iqDwroellX DVCkYmMErABdh4ikolBj7cTdheqYiKe7EHqFp9cFFkFL+dUAzOigyHac5MqbmlTj4wyP Xf0SiT2AtNT7r8vyefhsJK4vYzU/7ZmLOg48GqFiNgEtb5aOouFFwIoEEp7RIWSU7W4R aryw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LO8PTBP8; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-60550-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60550-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=2; AJvYcCXQuSZ1iKwfFRZSrMqTyNQx9lo/xXaiO4+9EVqQLq9mH3Ucgnvj57en+X2mwNplrQidcMJwnd4mPvcdIaDLq/6Z2xpQ/w== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id ll13-20020a170903090d00b001d71c8871e4si3962140plb.165.2024.02.10.13.53.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 13:53:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60550-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LO8PTBP8; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-60550-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60550-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2B120285BCB for ; Sat, 10 Feb 2024 21:53:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AD0F960265; Sat, 10 Feb 2024 21:53:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LO8PTBP8" Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 45F4E5FF1A; Sat, 10 Feb 2024 21:52:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707601977; cv=none; b=rWJaiNF+QYCAgPSWQrulBS+sobr1CJ49ExCiIc5tyFLLHjbf8MO7764oJGDn61R2PVSHq6ODNh5KKN9qsZPxDCE+f/Axy3CioiZnzONe+ispzMN0GSimaIrFP7l1U/ntN+3T3SPAe46umFozmcoSonAGIdCO6cWk4q3wGfEcq/U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707601977; c=relaxed/simple; bh=tYkc4h4Bp8NHCaXbI+vtqrPfsBIKoN0wVgseUk6XCjo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=G7uPQUXcWR0ubs2YrIwvpWhe51myKAZzsZ+ZgLtfsKoCl/JTWiZ29w+HHk7Ecwh4HCkHiUwj6zS1Vti2ghGIKDP4DMAb65t+czJSRXE/+y5eoUK8+fi5vC5HnGBgPeoZGx/Aw5lTd43HHSEPuritE2l2isw4JNljT77T4ZduIyA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=LO8PTBP8; arc=none smtp.client-ip=209.85.167.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-51182f8590bso697806e87.0; Sat, 10 Feb 2024 13:52:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707601974; x=1708206774; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bVxhkjh/5tBWW60EFdNQVc5luLCi3ZBwXFOGT84jAw0=; b=LO8PTBP8YMAc2ZhLCB4w6V9aMGRFP2TG4Arl3XHo4vrcA7FMeYHD/UOvxBqFW/GxrI xUEAGBd/gUxK7uPcyyGu2vZN0h7RS+bLEQHo+vuHgyfdyRwL7SaxpLbeAGGUpiSrJ2JO cSFeYdXLX8aTfrvTw1EC0tqUkfYE7aEz66mAnMIdBk2k30oiaHiPWOlOPM2CdTS7TGmN e4YWXxDJA6X0SBExx6TDSuCedCJie7d3C3GwpEulZghCM8K84CbGud+6OayzkvXK+qIx VaHRwV+ZR6W62k8skKf0TJeqOoGeFYc0//59TKN8nUuldlf14STCHlhyFnhUAnPKu8Ej tafg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707601974; x=1708206774; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bVxhkjh/5tBWW60EFdNQVc5luLCi3ZBwXFOGT84jAw0=; b=jV9e8TYxiMFHRvmXq6C5piq0o/p/eNJmKROY6R3AoLP0oIXT1WRssI22Qm4P2Pjizn vALlKgy+N6dkdfsprmNBH7SiPgRpatitG8hxqjI1g0KE3VoGgJSZRm/lYDAvklq4ofu5 zSbSd/nixulDG8Q8S2RF8dIyugP8qg7VW1oXLO7//8bdxWquNvGDlLj0+Q/VQGCp0YAs M/yJo45lLvOGtc8hX3D4fZSja71c0BtwyeXOnaBG8CH4hCFMWxNn0Rt+v06rsM77GaIR lKuEhfQgja2VcE4Xzn4Me3DwddshO+0S14GIidoLM8ZXgwBmv1kmBFWxEGwVhFXo4WVe PyVw== X-Forwarded-Encrypted: i=1; AJvYcCUNvPgg9HQf/8poLPcYEeiGn+3k5UgzY4bZk0R7q+4Sn62zacMtregszEl1YVuZIsZsFzFSA1P24FHuMqA1q1L2kukvlxYXtD9MAGQW9FmK/BEcrDa0A5DbWG+Gc1JwtANu8yVfCxI0LIg= X-Gm-Message-State: AOJu0YzfD2L/DVow3czyejMN/XZPV7xhA3pNcLBUV41SdZllSUzWomWo 79yXp1WjB0djIqT9RFO/fwtkdQYZ+xmIbf2+vYXvbtdRpJtrZmmo X-Received: by 2002:ac2:4a99:0:b0:511:86a1:fbe8 with SMTP id l25-20020ac24a99000000b0051186a1fbe8mr726188lfp.1.1707601974290; Sat, 10 Feb 2024 13:52:54 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXc0/2chnx0D0t1iCvdzBQ0haZRG3cbeuWr4bTFtGRlVJhusDLPRwFnCDPIwEQLXvUVinpbCeePa50YHotJZKvrd7u3k7fsJlA4QOpPW3WL1RE1P/GKx2JFariM1jxbmQUrYCVdFCS7QPXoTKN37lzE9vAIR+L6+z+I+s20taQ/FIfiBZu4U+4NyHRtZlGPZDrOe0lHQJPI+Hi9X3hLqFKtrDXft8xyi/zvS/ILeOJxSiz2gizGwuGDYxcHzmfPnlp5PxyUrrHtZ7zO9/WVY11NC2McRyY7PD9KfOZ+jDp1TjTgeEl5gRK0LPiD2YHN+vWJnBuisr4BzG1RpEuX3riOFHOlcko6ISCDCGRumI9/EY6gpbFUtg== Received: from m2.. (89-139-223-180.bb.netvision.net.il. [89.139.223.180]) by smtp.googlemail.com with ESMTPSA id a7-20020a19ca07000000b0051189b53f93sm24005lfg.302.2024.02.10.13.52.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 13:52:54 -0800 (PST) From: Michael Zaidman To: chrysh@christina-quast.de, daniel.beer@igorinstitute.com, jikos@kernel.org Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-serial@vger.kernel.org, ilpo.jarvinen@linux.intel.com, johan@kernel.org, gregkh@linuxfoundation.org, equinox@diac24.net, michael.zaidman@gmail.com Subject: [PATCH v1 03/19] hid-ft260: fix i2c driver regression in ft260_raw_event Date: Sat, 10 Feb 2024 23:51:31 +0200 Message-Id: <20240210215147.77629-4-michael.zaidman@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240210215147.77629-1-michael.zaidman@gmail.com> References: <20240210215147.77629-1-michael.zaidman@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790550507753670686 X-GMAIL-MSGID: 1790550507753670686 Fix i2c regression in ft260_raw_event introduced by "[PATCH v4 RESEND] hid-ft260: Add serial driver" patch: https://lore.kernel.org/all/20231218093153.192268-1-contact@christina-quast.de/ It caused wrong printout per every hid input report: [21912.237393] ft260 0003:0403:6030.000C: unhandled report 0xde [21912.247405] ft260 0003:0403:6030.000C: unhandled report 0xde [21912.249403] ft260 0003:0403:6030.000C: unhandled report 0xd1 [21912.275399] ft260 0003:0403:6030.000C: unhandled report 0xde [21912.285404] ft260 0003:0403:6030.000C: unhandled report 0xde [21912.287403] ft260 0003:0403:6030.000C: unhandled report 0xd1 [21912.315406] ft260 0003:0403:6030.000C: unhandled report 0xde [21912.326390] ft260 0003:0403:6030.000C: unhandled report 0xde [21912.327402] ft260 0003:0403:6030.000C: unhandled report 0xd1 Signed-off-by: Michael Zaidman --- drivers/hid/hid-ft260.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hid/hid-ft260.c b/drivers/hid/hid-ft260.c index a67c625c9165..a348f11600c6 100644 --- a/drivers/hid/hid-ft260.c +++ b/drivers/hid/hid-ft260.c @@ -1755,6 +1755,8 @@ static int ft260_raw_event(struct hid_device *hdev, struct hid_report *report, if (dev->read_idx == dev->read_len) complete(&dev->wait); + return 0; + } else if (xfer->length > FT260_RD_DATA_MAX) { hid_err(hdev, "Received data too long (%d)\n", xfer->length); return -EBADR;