NetBSD Problem Report #60818
From www@netbsd.org Mon Sep 28 17:51:17 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.netbsd.org", Issuer "YR1" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 315941A923B
for <gnats-bugs@gnats.NetBSD.org>; Mon, 28 Sep 2026 17:51:17 +0000 (UTC)
Message-Id: <20260928175115.DE86E1A923C@mollari.NetBSD.org>
Date: Mon, 28 Sep 2026 17:51:15 +0000 (UTC)
From: arcata@gmail.com
Reply-To: arcata@gmail.com
To: gnats-bugs@NetBSD.org
Subject: plmmc_ifpga.c does not establish interrupt handler for PL181 controller
X-Send-Pr-Version: www-1.0
X-From4GNATS: "arcata@gmail.com via gnats" <gnats-admin@NetBSD.org>
>Number: 60818
>Category: kern
>Synopsis: plmmc_ifpga.c does not establish interrupt handler for PL181 controller
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Sep 28 17:55:00 +0000 2026
>Closed-Date: Wed Oct 07 18:46:58 +0000 2026
>Last-Modified: Wed Oct 07 18:46:58 +0000 2026
>Originator: Joe Groff
>Release: 11.0-STABLE
>Organization:
>Environment:
>Description:
The evbarm INTEGRATOR_CP kernel configuration attaches the SDMMC controller via:
```
plmmc0 at ifpga? offset 0x0c000000 irq 23
```
However, the code in `plmmc_ifpga_attach` that enables the controller has the line that establishes the interrupt handler disabled in an `#if 0` block. At line 79:
```
#if 0
sc->sc_ih = ifpga_intr_establish(ifa->ifa_irq, IPL_BIO, plmmc_intr, sc);
#endif
```
Booting a kernel with a QEMU virtual machine with `qemu-system-arm -machine integratorcp -sd foo.img`, the kernel will time out trying to probe the SD card because the interrupts from the controller are never handled. However, by removing the `#if 0` and the assignment to the nonexistent `sc->sc_ih` field, the existing interrupt handler appears to just work.
>How-To-Repeat:
- Build the kernel with `./build.sh -m evbarm -a earmv5 kernel=INTEGRATOR_CP`.
- Boot the kernel in qemu with something like `qemu-system-arm -machine integratorcp -kernel ../path/to/INTEGRATOR_CP/netbsd -sd netbsd-root.fs`
>Fix:
Change line 79 of arch/evbarm/ifpga/plmmc_ifpga.c to remove the `#if 0` and unnecessary assignment (or, alternately, add an `sc_ih` field to `struct plmmc_softc`):
```
-#if 0
- sc->sc_ih = ifpga_intr_establish(ifa->ifa_irq, IPL_BIO, plmmc_intr, sc);
-#endif
+ ifpga_intr_establish(ifa->ifa_irq, IPL_BIO, plmmc_intr, sc);
```
>Release-Note:
>Audit-Trail:
From: "Nick Hudson" <skrll@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/60818 CVS commit: src/sys
Date: Tue, 29 Sep 2026 19:58:32 +0000
Module Name: src
Committed By: skrll
Date: Tue Sep 29 19:58:32 UTC 2026
Modified Files:
src/sys/arch/evbarm/ifpga: plmmc_ifpga.c
src/sys/dev/ic: pl181var.h
Log Message:
evbarm/INTEGRATOR_CP: establish interrupt handler for PL181 controller
PR/60818 plmmc_ifpga.c does not establish interrupt handler for PL181 controller
Capture the handle returned from ifpga_intr_establish - someone might
write the code to call ifpga_intr_disestablish.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/ifpga/plmmc_ifpga.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/ic/pl181var.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->pending-pullups
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Wed, 30 Sep 2026 05:14:23 +0000
State-Changed-Why:
[pullup-11 #504] PR/60818 plmmc_ifpga.c does not establish interrupt handler for PL181 controller
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/60818 CVS commit: [netbsd-11] src/sys
Date: Fri, 2 Oct 2026 11:44:05 +0000
Module Name: src
Committed By: martin
Date: Fri Oct 2 11:44:05 UTC 2026
Modified Files:
src/sys/arch/evbarm/ifpga [netbsd-11]: plmmc_ifpga.c
src/sys/dev/ic [netbsd-11]: pl181var.h
Log Message:
Pull up following revision(s) (requested by skrll in ticket #504):
sys/dev/ic/pl181var.h: revision 1.4
sys/arch/evbarm/ifpga/plmmc_ifpga.c: revision 1.3
evbarm/INTEGRATOR_CP: establish interrupt handler for PL181 controller
PR/60818 plmmc_ifpga.c does not establish interrupt handler for PL181 controller
Capture the handle returned from ifpga_intr_establish - someone might
write the code to call ifpga_intr_disestablish.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.18.1 src/sys/arch/evbarm/ifpga/plmmc_ifpga.c
cvs rdiff -u -r1.3 -r1.3.44.1 src/sys/dev/ic/pl181var.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: pending-pullups->feedback
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Fri, 02 Oct 2026 17:06:53 +0000
State-Changed-Why:
ok to close?
From: Joe Groff <arcata@gmail.com>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org, netbsd-bugs@netbsd.org, gnats-admin@netbsd.org,
skrll@netbsd.org
Subject: Re: kern/60818 (plmmc_ifpga.c does not establish interrupt handler
for PL181 controller)
Date: Tue, 6 Oct 2026 07:55:13 -0700
On Fri, Oct 2, 2026 at 10:06=E2=80=AFAM <skrll@netbsd.org> wrote:
>
> Synopsis: plmmc_ifpga.c does not establish interrupt handler for PL181 co=
ntroller
>
> State-Changed-From-To: pending-pullups->feedback
> State-Changed-By: skrll@NetBSD.org
> State-Changed-When: Fri, 02 Oct 2026 17:06:53 +0000
> State-Changed-Why:
> ok to close?
Looks good, thanks for fixing this!
State-Changed-From-To: feedback->closed
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Wed, 07 Oct 2026 18:46:58 +0000
State-Changed-Why:
confirmed fixed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.