Re: [Bug 292695] rpi3b+ muge0 panic on shutdown

bob prohaska <[email protected]> Wed, 18 Feb 2026 08:04:48 -0800
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]>
On Mon, Feb 02, 2026 at 08:16:44AM -0800, bob prohaska wrote:
> On Mon, Feb 02, 2026 at 04:06:39PM +0100, Alex Samorukov wrote:
> > 
> > On 02.02.2026 15:30, bob prohaska wrote:
> > > > > > This seems like a promising clue but I have no idea how to
> > > > > > exploit it. Can anyone suggest experiments?
> > > > > > 
> > > > > > Thanks for reading,
> > > > > > 
> > > > > > bob prohaska
> > > > > Did you tried it with my patch or w/o it?
> > > Without. The sources are unmodified.
> > Ah, okay, so wrong subject :) I was confused
> > > 
> > > > > I also found that leds are
> > > > > broken in if_muge.c because of broken FDT binding. Thinking how to do a
> > > > > better patch.
> > > > > 
> > > By "leds", do you mean those on the Ethernet jack, or the red/green LEDs
> > > signifying power and activity?
> > > 
> > Ethernet jack. They are dead silent on rpi 3b+,  because of wrong fdt.
> > 
> > I did another patch for smcs which i feel is in use for on the rpi2:
> > 
> > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290417
> 
> Looks like it works. No crash on shutdown, ethernet connected or not.
> 
> bob@www:~ % uname -apKU
> FreeBSD www.zefox.org 16.0-CURRENT FreeBSD 16.0-CURRENT #7 main-n283373-58580dc0c694-dirty: Tue Feb  3 15:23:18 PST 2026     [email protected]:/usr/obj/usr/src/arm.armv7/sys/GENERIC arm armv7 1600011 1600011

I've been attempting to bisect to the source of the panic on shutdown
on a separate FreeBSD-current raspberry pi 2 v1.1 but for the last
few iterations the bisects have failed to build to completion in the
kernel phase with what look like  compiler errors: 

Building /usr/obj/usr/src/arm.armv7/sys/GENERIC/modules/usr/src/sys/modules/aq/aq_hw_llh.o
  158 |         if (!AQ_READ_REG(hw, 0x370)) {
      |              ^
/usr/src/sys/dev/aq/aq_hw.h:46:38: note: expanded from macro 'AQ_READ_REG'
   46 | #define AQ_READ_REG(hw, reg) le32toh(readl((hw)->hw_addr + reg))
      |                                      ^
/usr/src/sys/dev/aq/aq_hw.c:165:13: error: call to undeclared function 'writel'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
  165 |             AQ_WRITE_REG(hw, AQ_HW_UCP_0X370_REG, ucp_0x370);
      |             ^
/usr/src/sys/dev/aq/aq_hw.h:44:38: note: expanded from macro 'AQ_WRITE_REG'
   44 | #define AQ_WRITE_REG(hw, reg, value) writel(((hw)->hw_addr + (reg)), htole32(value))
      |   

I've been invoking git bisect skip repeatedly to seek a revision that builds
to the point it can be tested. Most recently git reported:

# git bisect skip
Bisecting: 5 revisions left to test after this (roughly 3 steps)
[5c1d9df10b78f8d2e13e16f5db2e4542f582aebd] vmem.9: provide a reference to libuvmem(3)

How should I expect this process to end? Will git report there's nothing more
to test, or am I heading into an infinite loop?

The revision of FreeBSD running right now is
# uname -apKU
FreeBSD pelorus.zefox.org 16.0-CURRENT FreeBSD 16.0-CURRENT #20 n282638-7f3da1f800f7: Mon Feb 16 11:27:29 PST 2026     [email protected]:/usr/obj/usr/src/arm.armv7/sys/GENERIC arm armv7 1600007 1600007

Thanks for reading,

bob prohaska