From nobody Wed Nov 19 18:20:25 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dBVCG2RqGz6J4gQ for ; Wed, 19 Nov 2025 18:20:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dBVCF6jp9z3Y5S for ; Wed, 19 Nov 2025 18:20:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763576426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fTlR/Zu9cGarsHf20PPZYshutdStx1gjJ5Ik0CsVrDg=; b=L2wnZLwFwABMVfHwHNZg7Qw1D0aWr7f47L3CBWHXQRPVCOqsdJM+8+Oo0uBlEnp1ghDsEa bglwTMSCQYxup7TNCoGIYenqzQGdfl8sKxP5bLmFvOM6YK3o+jLzNatQAlwEaGq3VigR0N xcoyE/iR5TFOGJPyNTtIrZJNvSKbcnaVwO7kJ3FNgbFnVDewybR0Xp4L01ptwrr7GOS4OS grtm5CoxdbBTJ06wJN8UGMbNlFHneVlF0lpvkBxM35qQ/wGpiSrHLx3pAVAQNpGSKEUqz3 rzP4NN2ZucmjhwiVZHVgWe0DwbX+v/NB2O9G0EZcHqas6O+DLUVkodLLF/v2wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763576426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fTlR/Zu9cGarsHf20PPZYshutdStx1gjJ5Ik0CsVrDg=; b=nakXHxBbhhlOSNnt9LblH3Be5pUA7x1Rpqg0DkVhy08uzFbwomBqu9TQpdFdm3wdHvh4tI DoiullKPvGLnOn5hvkKXHQGHfhdea3I+b388E0d3xMMKguGFfOxBBrY2B2nypr/0x8+gPM IGSMNUxb6O49nJOHAUad0EOwjIOeZMIg24gVOr9KWbyk8TRqZ1fmml56GzxX3BqeAtiJEO lezKor9bgNr83Pze/D6x5zwUijLndt61rqwXcBuDoLqfWPLIzO2IYdjcmJSulei/gFoN3K XXQz73bMWDC7N3iY4YIA/nMMWMKS9roYteI6sm9cdp+kmsoCTBfJKxm4A+wtTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763576426; a=rsa-sha256; cv=none; b=ew5E2S++4TzWDG8Zb6A4jD31bygBXq4/NzWveAukJgN1W4hZOlJhf1+TVCe9vmVRznZh/5 VOQhHDWWUuSJeB2TRYzkwtzynX6ti10QOmGkoDVLzphYGHbfX1w3LJwIsX7xdSOjyXgKLD bRuwPOTClwWY8pqGZepLolFfn4ucRmXHx9pG2mnFCi7NLHnSjGtYxdIjnIbilc5/0GWKgr nYWknqZFMxjtMkl32OtEE2cr/5pi9ZjJ5eaANFZyyRLeo/jZl9vfJ1jTLWM64cy8GKa3Wy +moSFekqo8ix9lU1ozBrje9emzNGeRcF+hzP66WUpHIRj04PM0VDJAtCKgQ+0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dBVCF5h28zrkX for ; Wed, 19 Nov 2025 18:20:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d3cc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 19 Nov 2025 18:20:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Poul-Henning Kamp From: Ed Maste Subject: git: d61be9d99470 - stable/15 - iichid: The IICHID spec defines the response to the RESET command as two bytes of zeros. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d61be9d994702ffb8443c686f3ae2a5c702df3c7 Auto-Submitted: auto-generated Date: Wed, 19 Nov 2025 18:20:25 +0000 Message-Id: <691e0a69.d3cc.7d8aab3c@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d61be9d994702ffb8443c686f3ae2a5c702df3c7 commit d61be9d994702ffb8443c686f3ae2a5c702df3c7 Author: Poul-Henning Kamp AuthorDate: 2025-11-18 19:22:01 +0000 Commit: Ed Maste CommitDate: 2025-11-19 18:20:09 +0000 iichid: The IICHID spec defines the response to the RESET command as two bytes of zeros. Our recent changes to iichid.c has caused us to attempt to read a full REPORT instead, and at least one keyboard hangs solid when we do that. This patch changes us to be spec-compliant. Differential Revision: https://reviews.freebsd.org/D53803 MFC after: 1 day Approved by: re(ccperciva) (cherry picked from commit 5d53462af1d0e892da77b52b701b337119b2f5d7) --- sys/dev/iicbus/iichid.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/dev/iicbus/iichid.c b/sys/dev/iicbus/iichid.c index 5ca3f1b84e48..430066bd8f52 100644 --- a/sys/dev/iicbus/iichid.c +++ b/sys/dev/iicbus/iichid.c @@ -271,6 +271,8 @@ static int iichid_cmd_read(struct iichid_softc* sc, void *buf, iichid_size_t maxlen, iichid_size_t *actual_len) { + int error; + /* * 6.1.3 - Retrieval of Input Reports * DEVICE returns the length (2 Bytes) and the entire Input Report. @@ -280,7 +282,10 @@ iichid_cmd_read(struct iichid_softc* sc, void *buf, iichid_size_t maxlen, struct iic_msg msgs[] = { { sc->addr, IIC_M_RD, maxlen, buf }, }; - int error; + + if (!sc->reset_acked) { + msgs[0].len = 2; + } error = iicbus_transfer(sc->dev, msgs, nitems(msgs)); if (error != 0)