From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796381860; b=0nEUFrT4c/W3n3q424mMj6MiWCuKB0kD/LKxIpnVJdG6Ky9g7tqpBUEJpjtu0izrBzhx Sn0hUHkxU5OcXWrdaB7p09PwrZPyc2NlIk2z6PGiu6jQDAOjO46/A7eTkEuoppMqZr1PZ 8n5e5tdKuxP90ImCAL/ua5pci7b2D/ou+MP4236escZo63EJ1Fg/FUS3Z4tDVHLswijey zxAVyK1sy65Rv5bVnNkPLQ6mcPWRCwpCKVr5eku+5rbjxORnp1qs3kPh1RVEKpHiZsz+6 QELWDFeCUz2YTHV1uhFJmSyne9QD757znRZRSAho3tOLWceEpRbp63H0CmoXAj2cHKQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796381860; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=TVfUkulwBp50WzLcereqg8SFVhWQHwFqc5y6nH/sIds=; b=4DypfVPGObwryhPEKcwK/jqfP5LXPdROCV+Hm178pIpvQ3Z1uCWhGTvBv5Xgs3k9BtA+ foyVTOyDZ1GzrwsemVq9XKb11KXnuDdQSaRYv4XWtmYaAgWi5EDW82NTDfgViR6DlL2Co NKR9em8dv7FLSr2pCak761QOI7HjdMg8uDJvPf8tkC6KVr79jox+fzTb2+L3DLEFBRqpP NP0WWQbiu15DoLStnKPYLaHwpVz5s7m5IZGRXqFQ9MPBiFIj90Kfk42QYK2r5qehLw2d/ COPqy9/ezUgd36YogKNJlX3tB+znvXTPiUwV+OQczyaGMEnetT0vwbB1JmO5M5YL9Gg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=UgouYUE0; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E55C606A330; Fri, 4 Dec 2026 10:57:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=UgouYUE0 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE6181F00936; Fri, 4 Dec 2026 10:57:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796381860; bh=TVfUkulwBp50WzLcereqg8SFVhWQHwFqc5y6nH/sIds=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=UgouYUE0qEEA9tlgNBDXAPwMpRrIFjcDOZP6DfymQVlkR3OT2tAsN/XwosY7ens2Q PsLp6k/kToCAvih71SnuKz9Adj/E/hTnPVULTean7+zjSy1uv1yLupsN0ImCnmSnqm 3OWOuT2nntDWyv97X0/jDMroXOecoeTKaDRVRxMo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Eren=20=C3=87akar?= , Hans de Goede , Jiri Kosina , Sasha Levin Subject: [PATCH 6.18 205/703] HID: letsketch: skip string descriptors the firmware does not implement Date: Fri, 4 Dec 2026 19:01:44 +0900 Message-ID: <20261204100633.303544347@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100627.522266145@linuxfoundation.org> References: <20261204100627.522266145@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Eren Çakar [ Upstream commit f2f69bbddd34801cbf6af2e89235ca427f3811c5 ] The Starcom GC-422 is a rebranded LetSketch WP9620C with the same USB ID (6161:4d15), so it binds to this driver. Its firmware ("Vision_V201_180530") does not implement every string descriptor index that the raw mode handshake reads. For those indices usb_string() keeps returning an empty string or -EPIPE, letsketch_get_string() gives up after its retries, and the probe fails: letsketch ...: probe with driver letsketch failed with error -5 The tablet then does not work at all. The handshake only needs the reads to happen, not their contents. Once the retries are used up, report an index that still reads as empty or STALLs as missing with -ENOENT, and let the probe skip it. Other errors still fail the probe as before, and the retries stay in place, so firmware that only fails a read now and then behaves as it did. With this change the GC-422 completes the handshake, switches to raw mode and reports pen position, pressure and the five pad buttons. The change and this message were written with the help of an AI coding assistant (Claude Code); I reviewed them and tested the result on the hardware. Fixes: 33a5c2793451 ("HID: Add new Letsketch tablet driver") Signed-off-by: Eren Çakar Reviewed-by: Hans de Goede Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin --- drivers/hid/hid-letsketch.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/hid/hid-letsketch.c b/drivers/hid/hid-letsketch.c index b52e93a91ae54..6a93245b7ac1e 100644 --- a/drivers/hid/hid-letsketch.c +++ b/drivers/hid/hid-letsketch.c @@ -213,6 +213,12 @@ static int letsketch_raw_event(struct hid_device *hdev, * string descriptors. But the firmware is buggy and does not like it if * we do this too fast. Even if we go slow sometimes the usb_string() call * fails. Ignore errors and retry it a couple of times if necessary. + * + * Some firmware revisions (e.g. "Vision_V201_180530", sold as the Starcom + * GC-422) do not implement every string descriptor index the handshake + * reads. For those indices usb_string() keeps returning an empty string or + * -EPIPE (STALL). Report such an index as missing with -ENOENT once the + * retries are used up, so that the caller can skip it. */ static int letsketch_get_string(struct usb_device *udev, int index, char *buf, int size) { @@ -225,9 +231,14 @@ static int letsketch_get_string(struct usb_device *udev, int index, char *buf, i return 0; } + if (ret == 0 || ret == -EPIPE) { + dev_dbg(&udev->dev, "String descriptor %d not implemented\n", index); + return -ENOENT; + } + dev_err(&udev->dev, "Max retries (%d) exceeded reading string descriptor %d\n", LETSKETCH_GET_STRING_RETRIES, index); - return ret ? ret : -EIO; + return ret; } static int letsketch_probe(struct hid_device *hdev, const struct hid_device_id *id) @@ -256,6 +267,8 @@ static int letsketch_probe(struct hid_device *hdev, const struct hid_device_id * */ for (i = LETSKETCH_INFO_STR_IDX_BEGIN; i <= LETSKETCH_INFO_STR_IDX_END; i++) { ret = letsketch_get_string(udev, i, buf, sizeof(buf)); + if (ret == -ENOENT) + continue; if (ret) return ret; @@ -264,16 +277,16 @@ static int letsketch_probe(struct hid_device *hdev, const struct hid_device_id * for (i = 1; i <= 250; i++) { ret = letsketch_get_string(udev, i, buf, sizeof(buf)); - if (ret) + if (ret && ret != -ENOENT) return ret; } ret = letsketch_get_string(udev, 0x64, buf, sizeof(buf)); - if (ret) + if (ret && ret != -ENOENT) return ret; ret = letsketch_get_string(udev, LETSKETCH_INFO_STR_IDX_BEGIN, buf, sizeof(buf)); - if (ret) + if (ret && ret != -ENOENT) return ret; /* -- 2.53.0