Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Apr 2025 21:40:07 GMT
From:      Vladimir Kondratyev <wulf@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 2abdb305bd0c - main - iichid(4): Do not send packets read in interrupt handler to hidbus
Message-ID:  <202504282140.53SLe7c4061973@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by wulf:

URL: https://cgit.FreeBSD.org/src/commit/?id=2abdb305bd0c105226f6a71a8d3dc89698c9ef6b

commit 2abdb305bd0c105226f6a71a8d3dc89698c9ef6b
Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2025-04-28 21:39:28 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2025-04-28 21:39:28 +0000

    iichid(4): Do not send packets read in interrupt handler to hidbus
    
    if no hidbus and hidbus clients were attached and opened by users.
    
    iichid(4) enables interrupts before hidbus is attached and sending
    packets to it at this time leads to panic at boot time.
    
    Fixes: daa098cc37b9 ("Wait for RESET command response while attaching")
    
    Tested by:      dch
    PR:             286045
    MFC with:       daa098cc37b9
---
 sys/dev/iicbus/iichid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/iicbus/iichid.c b/sys/dev/iicbus/iichid.c
index b86858791a4d..9c0324a24685 100644
--- a/sys/dev/iicbus/iichid.c
+++ b/sys/dev/iicbus/iichid.c
@@ -630,7 +630,7 @@ iichid_intr(void *context)
 	error = iichid_cmd_read(sc, sc->intr_buf, sc->intr_bufsize, &actual);
 	THREAD_NO_SLEEPING();
 	if (error == 0) {
-		if (sc->power_on) {
+		if (sc->power_on && sc->open) {
 			if (actual != 0)
 				sc->intr_handler(sc->intr_ctx, sc->intr_buf,
 				    actual);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202504282140.53SLe7c4061973>