From nobody Tue Nov 18 19:25:20 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 4d9vhd03hrz6GPmB for ; Tue, 18 Nov 2025 19:25:21 +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 4d9vhc6XZqz3YrL for ; Tue, 18 Nov 2025 19:25:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763493920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ze0L8sLle1YHYgzSzlPTrZH1rQdsGmeFWJ1Jo6evZXc=; b=OIiltfrK9oxLu1FQUx16J/TgVpJy3OH25/+Oy/PxYkUh4Zgwe1ZoeoFstvyMzo+gdmqTPu 481qcHTL/4i7/g5AQz6bT+hkixvJTUiS0+U9Get/u70R71BfIUgk/fRxN9mkSXcWH4YVpa GMKF+HTNAjTm17mM7YHw4/PRge2AVp9CewAZlQclTU6CYt3rbg6ukvGRsJ42HQDJW5aBaJ zXRFLmfyUaEuTMeXNgS/KxTeJbWl9YZ4UCrLJRd6wleE9FY05eUjCJY5chFTpR8Z+RsOjv mSGEydV7F3WTUQQUHKTLgKXjWaFQoXVuhQdCb+VjzYUgVxde4hTrixGUvRQfVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763493920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ze0L8sLle1YHYgzSzlPTrZH1rQdsGmeFWJ1Jo6evZXc=; b=jzNlvdh76z/qdXfDK7GpxC6E9VyCNI1M1sDnP7cqObpETV2Z+dyD1k2RmvQ80uKsYqtvv2 0Wq+QzPUHvV/EGHUenHLzJ3i/1rb434+EZrM/ffEw3ulNtdKCDx2bYYp6zq05lBdpW7UpE Jn5C0VKG4E6ADYKC4yekDKPveZrtnE+/OOsOOdL0Zbw0N6CHfvWnxbEh7CgCwpdYn8IFga eDzxpMkejGJX6/+4rRdeKqwUS+hbjwa7/NniVCwjeE0IiER5TgoaeRnMWO5iGFw0ADe38J G/Igx/C4V+Cw3GYDUqrjuKu6fttlazMJhTUe8dyukwxr/ciQvIHCr4aubIlkOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763493920; a=rsa-sha256; cv=none; b=ek6llN3nWq8VZqUz+iosktzfBoj1GO7AfyQwW0A2UZ+X2uWGAwVlLpOKiLvlT3KsXfsMQy ZOC7R812pXrg/N/xFZ/hczsgvIGqa2KkLkj5GzC6enUlsq2pgli2/UODx0eDjPGSlq2T1k ZFfKNfCOdXEHurM7cw2ny+mI+SITx+Cj8TkdB7PYFg9cgIqioINyEaoB616a+26nrotS6z W8n++79poIo4dZhsObSvEU8JiTmewLv9QyBa8d2h2XYXQhjmqWXpnTvg7mu1D+CpcuykhT epjTo9M7f8mGU8LO6SP1eOfLfVOnhW62U0MseB07ZkAmwSfnkaMRRsidv+1hJw== 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 4d9vhc681bz16VY for ; Tue, 18 Nov 2025 19:25:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2ad9f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 18 Nov 2025 19:25:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Poul-Henning Kamp Subject: git: 5d53462af1d0 - main - 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: phk X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d53462af1d0e892da77b52b701b337119b2f5d7 Auto-Submitted: auto-generated Date: Tue, 18 Nov 2025 19:25:20 +0000 Message-Id: <691cc820.2ad9f.7db644f3@gitrepo.freebsd.org> The branch main has been updated by phk: URL: https://cgit.FreeBSD.org/src/commit/?id=5d53462af1d0e892da77b52b701b337119b2f5d7 commit 5d53462af1d0e892da77b52b701b337119b2f5d7 Author: Poul-Henning Kamp AuthorDate: 2025-11-18 19:22:01 +0000 Commit: Poul-Henning Kamp CommitDate: 2025-11-18 19:25:10 +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) --- 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)