Date: Wed, 19 Nov 2025 21:44:29 +0000 From: Colin Percival <cperciva@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Poul-Henning Kamp <phk@FreeBSD.org> Subject: git: d02a08f89932 - releng/15.0 - iichid: The IICHID spec defines the response to the RESET command as two bytes of zeros. Message-ID: <691e3a3d.33775.6905fe84@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=d02a08f899322dd9ed34cbf77e917068ba59b3ff commit d02a08f899322dd9ed34cbf77e917068ba59b3ff Author: Poul-Henning Kamp <phk@FreeBSD.org> AuthorDate: 2025-11-18 19:22:01 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2025-11-19 21:36:49 +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. Approved by: re (cperciva) Differential Revision: https://reviews.freebsd.org/D53803 MFC after: 1 day Approved by: re(ccperciva) (cherry picked from commit 5d53462af1d0e892da77b52b701b337119b2f5d7) (cherry picked from commit d61be9d994702ffb8443c686f3ae2a5c702df3c7) --- 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)help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?691e3a3d.33775.6905fe84>
