NetBSD Problem Report #59621

From df4nx@gmx.net  Sun Aug 31 13:03:14 2025
Return-Path: <df4nx@gmx.net>
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 "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id A692A1A923A
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 31 Aug 2025 13:03:14 +0000 (UTC)
Message-Id: <20250831125806.1B68F3AE62D@p3.local>
Date: Sun, 31 Aug 2025 14:58:06 +0200 (CEST)
From: df4nx@gmx.net
Reply-To: df4nx@gmx.net
To: gnats-bugs@NetBSD.org
Subject: kernel panic with Fujitsu Siemens Lifebook E Series
X-Send-Pr-Version: 3.95

>Number:         59621
>Category:       install
>Synopsis:       kernel panic on esm driver
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 31 13:05:01 +0000 2025
>Last-Modified:  Thu Apr 02 18:05:02 +0000 2026
>Originator:     d-ra=09
>Release:        NetBSD 10.1
>Organization:
=09
>Environment:
=09
=09
System: NetBSD p3.local 10.1 NetBSD 10.1 (GENERIC) #0: Mon Dec 16 13:08:11=
 UTC 2024 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/i386/compile/GENERI=
C i386
Architecture: i386
Machine: i386
>Description:
On booting the install media boot.iso of the NetBSD 10.1 release a kernelr
panic occured.
Disable the esm driver with uc> disable esm it boots correct without panic=
.
So i am pretty sure it is the esm driver that causes the problem.
I attached a serial line to get ps and trace:


  \\-__,------,___.
   \\        __,---`  NetBSD/x86 BIOS Boot
    \\       `---,_.  Revision 5.11 (Mon Dec 16 13:08:11 UTC 2024)
     \\-,_____,.---`
      \\
       \\
        \\


     1. Boot normally
     2. Boot single user
     3. Drop to boot prompt

Choose an option; RETURN for default; SPACE to stop countdown.
Option 1 will be chosen in 5 seconds.=20
WARNING: couldn't open /var/db/entropy-file
Loading /stand/i386/10.1/modules/cd9660/cd9660.kmod
WARNING: 1 module failed to load
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 200=
3,
[   1.0000000]     2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2=
013,
[   1.0000000]     2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2=
023,
[   1.0000000]     2024
[   1.0000000]     The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All right=
s reserved.

[   1.0000000] NetBSD 10.1 (GENERIC) #0: Mon Dec 16 13:08:11 UTC 2024
[   1.0000000] 	mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/i386/compile/=
GENERIC
[   1.0000000] total memory =3D 255 MB
[   1.0000000] avail memory =3D 227 MB
[   1.0000000] WARNING: module error: module `cd9660' pushed by boot loade=
r already exists
[   1.0000040] mainbus0 (root)
[   1.0000040] ACPI: RSDP 0x00000000000F66B0 000014 (v00 FUJ   )
[   1.0000040] ACPI: RSDT 0x000000000FFEB691 000028 (v01 FUJ    BISCAYNE 0=
1360000 FUJ  00001000)
[   1.0000040] ACPI: FACP 0x000000000FFEFB8C 000074 (v01 FUJ    BISCAYNE 0=
1360000 FUJ  00001000)
[   1.0000040] ACPI: DSDT 0x000000000FFEB6B9 0044D3 (v01 FUJ    BISCAYNE 0=
1360000 MSFT 01000007)
[   1.0000040] ACPI: FACS 0x000000000FFEFFC0 000040
[   1.0000040] ACPI: 1 ACPI AML tables successfully acquired and loaded
[   1.0000040] ACPI: BIOS is too old (19991130). Set acpi_force_load to us=
e.
[   1.0000040] ACPI Error: Could not remove SCI handler (20221020/evmisc-3=
16)
[   1.0000040] cpu0 at mainbus0
[   1.0000040] ACPI Error: AE_BAD_PARAMETER, Thread 3243113152 could not a=
cquire Mutex [ACPI_MTX_Tables] (0x2) (20221020/utmutex-326)
[   1.0000040] ACPI Error: Mutex [ACPI_MTX_Tables] (0x2) is not acquired, =
cannot release (20221020/utmutex-367)
[   1.0000040] cpu0: Intel 686-class, 741MHz, id 0x686
[   1.0000040] cpu0: node 0, package 0, core 0, smt 0
[   1.0000040] pci0 at mainbus0 bus 0: configuration mode 1
[   1.0000040] pchb0 at pci0 dev 0 function 0: Intel 82443BX Host Bridge/C=
ontroller (rev. 0x03)
[   1.0000040] agp0 at pchb0: aperture at 0xf8000000, size 0x4000000
[   1.0000040] ppb0 at pci0 dev 1 function 0: Intel 82443BX AGP Interface =
(rev. 0x03)
[   1.0000040] pci1 at ppb0 bus 1
[   1.0000040] vga0 at pci1 dev 0 function 0: ATI Technologies Rage Mobili=
ty (rev. 0x64)
[   1.0000040] wsdisplay0 at vga0 kbdmux 1
[   1.0000040] drm at vga0 not configured
[   1.0000040] pcib0 at pci0 dev 7 function 0: Intel 82371AB (PIIX4) PCI-I=
SA Bridge (rev. 0x02)
[   1.0000040] piixide0 at pci0 dev 7 function 1: Intel 82371AB IDE contro=
ller (PIIX4) (rev. 0x01)
[   1.0000040] piixide0: primary channel interrupting at irq 14
[   1.0000040] atabus0 at piixide0 channel 0
[   1.0000040] piixide0: secondary channel interrupting at irq 15
[   1.0000040] atabus1 at piixide0 channel 1
[   1.0000040] uhci0 at pci0 dev 7 function 2: Intel 82371AB (PIIX4) USB H=
ost Controller (rev. 0x01)
[   1.0000040] uhci0: interrupting at irq 9
[   1.0000040] usb0 at uhci0: USB revision 1.0
[   1.0000040] piixpm0 at pci0 dev 7 function 3: Intel 82371AB (PIIX4) Pow=
er Management Controller (rev. 0x03)
[   1.0005278] piixpm0: 24-bit timer
[   1.0005278] piixpm0: interrupting at SMI,=20
[   1.0005278] iic0 at piixpm0 port 0: I2C bus
[   1.0005278] esm0 at pci0 dev 13 function 0: ESS Technology Maestro 2E P=
CI Audio Accelerator (rev. 0x10)
[   1.0005278] esm0: interrupting at irq 9
[   1.0005278] esm0: esm_read_codec() RW_DONE timed out.
[   1.0005278] esm0: will perform cold reset.
[   1.0005278] uvm_fault(0xc15ad960, 0, 1) -> 0xe
[   1.0005278] fatal page fault in supervisor mode
[   1.0005278] trap type 6 code 0 eip 0xc0127a2c cs 0x8 eflags 0x10282 cr2=
 0 ilevel 0x8 esp 0xc0213017
[   1.0005278] curlwp 0xc14dfac0 pid 0 lid 0 lowest kstack 0xc18892c0
kernel: supervisor trap page fault, code=3D0
Stopped in pid 0.0 (system) at  netbsd:bus_space_read_1+0xc:    cmpl    $0=
,0(%ea
x)
db{0}> ps
PID     LID S CPU     FLAGS       STRUCT LWP *               NAME WAIT
0        26 2   0       200           c1eabc40         usbtask-dr
0        25 2   0       200           c1eab980         usbtask-hc
0        24 2   0       200           c1eab6c0            atabus1
0        23 2   0       200           c1eab400            atabus0
0        22 2   0       200           c1eab140           lnxsyswq
0        21 2   0       200           c1eaac00           lnxubdwq
0        20 2   0       200           c1eaa940           lnxpwrwq
0        19 2   0       200           c1eaa680           lnxlngwq
0        18 2   0       200           c1eaa3c0           lnxhipwq
0        17 2   0       200           c1eaa100           lnxrcugc
0        16 2   0       200           c1ea5bc0             sysmon
0        15 2   0       200           c1ea5900         pmfsuspend
0        14 2   0       200           c1ea5640           pmfevent
0        13 2   0       200           c1ea5380         sopendfree
0        12 2   0       200           c1ea50c0             ifwdog
0        11 2   0       200           c1d99b80            iflnkst
0        10 2   0       200           c1d998c0           nfssilly
0         9 2   0       200           c1d99600             vdrain
0         8 2   0       200           c1d99340          modunload
0         7 2   0       200           c1d99080            xcall/0
0         6 1   0       200           c1d97b40          softser/0
0         5 1   0       200           c1d97880          softclk/0
0         4 1   0       200           c1d975c0          softbio/0
0         3 1   0       200           c1d97300          softnet/0
db{0}> trace
bus_space_read_1(c1ed6200,0,0,c188aa28,c0cd536f,a,5,c1ed6228,c188aa1c,0) a=
t netb
sd:bus_space_read_1+0xc
ac97_attach_type(c1eb1730,c1ed6200,1,c1eb1704,c188abc8,c02150ac,c1eb1730,c=
1ed620
0,c1eb1704,1000c0) at netbsd:ac97_attach_type+0xc01
ac97_attach(c1eb1730,c1ed6200,c1eb1704,1000c0,c0214102,c1ed6200,c1ed6224,c=
1eb171
4,c188ab78,0) at netbsd:ac97_attach+0x27
esm_attach(c1eb63c0,c1ed6200,c188acb0,c1eb63c0,c188acb0,c1ed6200,c188acb0,=
c1eb63
c0,c14ee5d8,c188ac24) at netbsd:esm_attach+0x34b
config_attach_internal(c0183af6,c188ac04,c0cbd3b2,0,c188ac8c,0,0,c188ac8c,=
c1ef76
20,c188ac94) at netbsd:config_attach_internal+0x1f2
config_found(c1eb63c0,c188acb0,c0183af6,c188ac94,c188ac78,c1ef20a8,c1ef20a=
c,4010
010,1978,4000) at netbsd:config_found+0xf1
pci_probe_device1(c1ef2000,80006800,0,0,0,c000,d,0,0,d) at netbsd:pci_prob=
e_devi
ce1+0x652
pci_enumerate_bus1(c1ef2000,c0e5aa64,0,0,0,2,10,8,4,c1eb63c0) at netbsd:pc=
i_enum
erate_bus1+0x1e0
pciattach(c1eb6040,c1eb63c0,c188ae4c,c1eb6040,c188ae4c,c1eb63c0,c188ae4c,c=
1eb604
0,c14ee080,c188ae18) at netbsd:pciattach+0x18f
config_attach_internal(c01939a5,c188adf8,0,c11af788,0,0,0,c11af788,c1d84ac=
0,c1eb
6040) at netbsd:config_attach_internal+0x1f2
config_found(c1eb6040,c188ae4c,c01939a5,c188ae30,1,0,0,c11af788,0,0) at ne=
tbsd:c
onfig_found+0xf1
i386_mainbus_rescan(c1eb6040,c11af788,0,c1eb6040,c01379be,0,c1eb6040,0,c18=
8aec8,
0) at netbsd:i386_mainbus_rescan+0x2ed
i386_mainbus_attach(0,c1eb6040,0,0,0,c1eb6040,c14ee068,0,c11ae3fd,c188af50=
) at n
etbsd:i386_mainbus_attach+0x96
config_attach_internal(0,c188af30,0,0,0,0,0,0,331c,ff8e000) at netbsd:conf=
ig_att
ach_internal+0x1f2
config_rootfound(c11ae3fd,0,c188afb0,c0e517af,3,2,64,0,0,0) at netbsd:conf=
ig_roo
tfound+0x71
cpu_configure(3,2,64,0,0,0,0,0,aa5e000,0) at netbsd:cpu_configure+0x3e
main(0,0,0,0,0,0,0,0,0,0) at netbsd:main+0x30f
db{0}>=20
bus_space_read_1(c1ed6200,0,0,c188aa28,c0cd536f,a,5,c1ed6228,c188aa1c,0) a=
t netb
sd:bus_space_read_1+0xc
ac97_attach_type(c1eb1730,c1ed6200,1,c1eb1704,c188abc8,c02150ac,c1eb1730,c=
1ed620
0,c1eb1704,1000c0) at netbsd:ac97_attach_type+0xc01
ac97_attach(c1eb1730,c1ed6200,c1eb1704,1000c0,c0214102,c1ed6200,c1ed6224,c=
1eb171
4,c188ab78,0) at netbsd:ac97_attach+0x27
esm_attach(c1eb63c0,c1ed6200,c188acb0,c1eb63c0,c188acb0,c1ed6200,c188acb0,=
c1eb63
c0,c14ee5d8,c188ac24) at netbsd:esm_attach+0x34b
config_attach_internal(c0183af6,c188ac04,c0cbd3b2,0,c188ac8c,0,0,c188ac8c,=
c1ef76
20,c188ac94) at netbsd:config_attach_internal+0x1f2
config_found(c1eb63c0,c188acb0,c0183af6,c188ac94,c188ac78,c1ef20a8,c1ef20a=
c,4010
010,1978,4000) at netbsd:config_found+0xf1
pci_probe_device1(c1ef2000,80006800,0,0,0,c000,d,0,0,d) at netbsd:pci_prob=
e_devi
ce1+0x652
pci_enumerate_bus1(c1ef2000,c0e5aa64,0,0,0,2,10,8,4,c1eb63c0) at netbsd:pc=
i_enum
erate_bus1+0x1e0
pciattach(c1eb6040,c1eb63c0,c188ae4c,c1eb6040,c188ae4c,c1eb63c0,c188ae4c,c=
1eb604
0,c14ee080,c188ae18) at netbsd:pciattach+0x18f
config_attach_internal(c01939a5,c188adf8,0,c11af788,0,0,0,c11af788,c1d84ac=
0,c1eb
6040) at netbsd:config_attach_internal+0x1f2
config_found(c1eb6040,c188ae4c,c01939a5,c188ae30,1,0,0,c11af788,0,0) at ne=
tbsd:c
onfig_found+0xf1
i386_mainbus_rescan(c1eb6040,c11af788,0,c1eb6040,c01379be,0,c1eb6040,0,c18=
8aec8,
0) at netbsd:i386_mainbus_rescan+0x2ed
i386_mainbus_attach(0,c1eb6040,0,0,0,c1eb6040,c14ee068,0,c11ae3fd,c188af50=
) at n
etbsd:i386_mainbus_attach+0x96
config_attach_internal(0,c188af30,0,0,0,0,0,0,331c,ff8e000) at netbsd:conf=
ig_att
ach_internal+0x1f2
config_rootfound(c11ae3fd,0,c188afb0,c0e517af,3,2,64,0,0,0) at netbsd:conf=
ig_roo
tfound+0x71
cpu_configure(3,2,64,0,0,0,0,0,aa5e000,0) at netbsd:cpu_configure+0x3e
main(0,0,0,0,0,0,0,0,0,0) at netbsd:main+0x30f
db{0}> ~.
>How-To-Repeat:
=09
>Fix:
=09

>Audit-Trail:
From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/59621: kernel panic with Fujitsu Siemens Lifebook E Series
Date: Sun, 31 Aug 2025 14:45:12 -0000 (UTC)

 df4nx@gmx.net writes:

 >On booting the install media boot.iso of the NetBSD 10.1 release a kernelr
 >panic occured.
 >Disable the esm driver with uc> disable esm it boots correct without panic=

 [   1.0005278] esm0 at pci0 dev 13 function 0: ESS Technology Maestro 2E P=
 CI Audio Accelerator (rev. 0x10)
 [   1.0005278] esm0: interrupting at irq 9
 [   1.0005278] esm0: esm_read_codec() RW_DONE timed out.
 [   1.0005278] esm0: will perform cold reset.
 [   1.0005278] uvm_fault(0xc15ad960, 0, 1) -> 0xe
 [   1.0005278] fatal page fault in supervisor mode
 [   1.0005278] trap type 6 code 0 eip 0xc0127a2c cs 0x8 eflags 0x10282 cr2=
  0 ilevel 0x8 esp 0xc0213017
 [   1.0005278] curlwp 0xc14dfac0 pid 0 lid 0 lowest kstack 0xc18892c0
 kernel: supervisor trap page fault, code=3D0
 Stopped in pid 0.0 (system) at  netbsd:bus_space_read_1+0xc:    cmpl    $0=
 ,0(%ea
 x)

 db{0}> trace
 bus_space_read_1(c1ed6200,0,0,c188aa28,c0cd536f,a,5,c1ed6228,c188aa1c,0) a=
 t netb
 sd:bus_space_read_1+0xc
 ac97_attach_type(c1eb1730,c1ed6200,1,c1eb1704,c188abc8,c02150ac,c1eb1730,c=
 1ed620
 0,c1eb1704,1000c0) at netbsd:ac97_attach_type+0xc01
 ac97_attach(c1eb1730,c1ed6200,c1eb1704,1000c0,c0214102,c1ed6200,c1ed6224,c=
 1eb171



 The crash happens in bus_space_read_1 where a NULL pointer is passed
 as bus tag. This sounds weird, but is explained by:

 int
 esm_read_codec(void *sc, uint8_t regno, uint16_t *result)
 {
         struct esm_softc *ess;
         unsigned t;

         ess = sc;
 ...
 }

 static void
 esm_attach(device_t parent, device_t self, void *aux)
 {
 ...
 	ess = device_private(self);


         /* initialize AC97 host interface */
         ess->host_if.arg = self;
         ess->host_if.attach = esm_attach_codec;
         ess->host_if.read = esm_read_codec;
         ess->host_if.write = esm_write_codec;
         ess->host_if.reset = esm_reset_codec;
         ess->host_if.flags = esm_flags_codec;

         if (ac97_attach(&ess->host_if, self, &ess->sc_lock) != 0) {
 ...
 }

 static void
 ac97_read(struct ac97_softc *as, uint8_t reg, uint16_t *val)
 {
 ...
 	if (as->host_if->read(as->host_if->arg, reg, val)) {
 ...
 }



 The interface routines expect the first argument to be the
 'struct esm_softc *', but ac97 will call it with esp->host_if.arg
 which is the device pointer.


 Can you try the following patch ?


 Index: sys/dev/pci/esm.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/pci/esm.c,v
 retrieving revision 1.66
 diff -p -u -r1.66 esm.c
 --- sys/dev/pci/esm.c   23 May 2022 13:53:37 -0000      1.66
 +++ sys/dev/pci/esm.c   31 Aug 2025 14:43:45 -0000
 @@ -1619,7 +1619,7 @@ esm_attach(device_t parent, device_t sel
         ess->codec_flags |= AC97_HOST_DONT_READ;

         /* initialize AC97 host interface */
 -       ess->host_if.arg = self;
 +       ess->host_if.arg = ess;
         ess->host_if.attach = esm_attach_codec;
         ess->host_if.read = esm_read_codec;
         ess->host_if.write = esm_write_codec;



From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/59621: kernel panic with Fujitsu Siemens Lifebook E Series
Date: Mon, 1 Sep 2025 12:22:13 -0000 (UTC)

 df4nx@gmx.net (d-ra) writes:

 >Yes, but now the panic occurs in audio0:

 >db{0}> trace
 >esm_query_devinfo(c1e0a200,c17b9690,ffffffff,c17b972b,ffffffff,ffffffff,ffffffff
 >,ffffffff,0,c0c94d81) at netbsd:esm_query_devinfo+0x9
 >mixer_init.constprop.0(c1cc3450,c1cb8620,c17b9a38,c1de7c40,c1de7b0c,c1de7af4,c1d
 >e7b00,3,c1ddc780,c128d420) at netbsd:mixer_init.constprop.0+0x14a
 >audioattach(c1e0a200,c1e0a3c0,c17b9b04,c1e0a200,c17b9b04,c1e0a3c0,c17b9b04,c1e0a


 Looks like another miss:

 Index: esm.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/pci/esm.c,v
 retrieving revision 1.66
 diff -p -u -r1.66 esm.c
 --- esm.c       23 May 2022 13:53:37 -0000      1.66
 +++ esm.c       1 Sep 2025 12:20:02 -0000
 @@ -1619,7 +1619,7 @@ esm_attach(device_t parent, device_t sel
         ess->codec_flags |= AC97_HOST_DONT_READ;

         /* initialize AC97 host interface */
 -       ess->host_if.arg = self;
 +       ess->host_if.arg = ess;
         ess->host_if.attach = esm_attach_codec;
         ess->host_if.read = esm_read_codec;
         ess->host_if.write = esm_write_codec;
 @@ -1647,7 +1647,7 @@ esm_attach(device_t parent, device_t sel
                 wc_wrreg(ess, pcmbar,
                     DMAADDR(&ess->sc_dma) >> WAVCACHE_BASEADDR_SHIFT);

 -       audio_attach_mi(&esm_hw_if, self, ess->sc_dev);
 +       audio_attach_mi(&esm_hw_if, ess, ess->sc_dev);

         if (!pmf_device_register(self, esm_suspend, esm_resume))
                 aprint_error_dev(self, "couldn't establish power handler\n");

From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/59621: kernel panic with Fujitsu Siemens Lifebook E Series
Date: Mon, 1 Sep 2025 13:50:27 -0000 (UTC)

 df4nx@gmx.net (d-ra) writes:

 >Michael van Elst via gnats <gnats-admin@netbsd.org> wrote:
 >>  
 >>  Looks like another miss:
 >>  
 >>  Index: esm.c
 >...

 >Thanks for the patch :-)

 >Now the kernel boots, but rc.conf freezes while configuring the network
 >interface fxp0. I had to cycle via the power switch.

 >[   1.0000040] uhci0: interrupting at irq 9
 >[   1.0006812] esm0: interrupting at irq 9
 >[   1.0006812] fxp0: interrupting at irq 9
 >[   1.0006812] cbb0: interrupting at irq 9
 >[   1.0006812] cbb1: interrupting at irq 9


 The interrupt handler of esm looks bad...


 Index: sys/dev/pci/esm.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/pci/esm.c,v
 retrieving revision 1.66
 diff -p -u -r1.66 esm.c
 --- sys/dev/pci/esm.c	23 May 2022 13:53:37 -0000	1.66
 +++ sys/dev/pci/esm.c	1 Sep 2025 13:47:39 -0000
 @@ -1321,17 +1321,14 @@ esm_intr(void *sc)
  	struct esm_softc *ess;
  	uint16_t status;
  	uint16_t pos;
 -	int ret;

  	ess = sc;
 -	ret = 0;

 -	mutex_spin_enter(&ess->sc_intr_lock);
  	status = bus_space_read_1(ess->st, ess->sh, PORT_HOSTINT_STAT);
 -	if (!status) {
 -		mutex_spin_exit(&ess->sc_intr_lock);
 +	if (!status)
  		return 0;
 -	}
 +
 +	mutex_spin_enter(&ess->sc_intr_lock);

  	/* Acknowledge all. */
  	bus_space_write_2(ess->st, ess->sh, PORT_INT_STAT, 1);
 @@ -1353,7 +1350,6 @@ esm_intr(void *sc)
  			    + ((delta << 7) & 0x700) - 0x400);
  		}
  		bus_space_write_1(ess->st, ess->sh, PORT_HWVOL_MASTER, 0x88);
 -		ret++;
  	}
  #endif	/* XXX - HWVOL */

 @@ -1377,7 +1373,6 @@ esm_intr(void *sc)
  			}

  		}
 -		ret++;
  	}

  	if (ess->ractive) {
 @@ -1405,11 +1400,10 @@ esm_intr(void *sc)
  			}

  		}
 -		ret++;
  	}
  	mutex_spin_exit(&ess->sc_intr_lock);

 -	return ret;
 +	return 1;
  }

  static void
 @@ -1619,7 +1613,7 @@ esm_attach(device_t parent, device_t sel
  	ess->codec_flags |= AC97_HOST_DONT_READ;

  	/* initialize AC97 host interface */
 -	ess->host_if.arg = self;
 +	ess->host_if.arg = ess;
  	ess->host_if.attach = esm_attach_codec;
  	ess->host_if.read = esm_read_codec;
  	ess->host_if.write = esm_write_codec;
 @@ -1647,7 +1641,7 @@ esm_attach(device_t parent, device_t sel
  		wc_wrreg(ess, pcmbar,
  		    DMAADDR(&ess->sc_dma) >> WAVCACHE_BASEADDR_SHIFT);

 -	audio_attach_mi(&esm_hw_if, self, ess->sc_dev);
 +	audio_attach_mi(&esm_hw_if, ess, ess->sc_dev);

  	if (!pmf_device_register(self, esm_suspend, esm_resume))
  		aprint_error_dev(self, "couldn't establish power handler\n");

From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/59621: kernel panic with Fujitsu Siemens Lifebook E Series
Date: Mon, 1 Sep 2025 17:41:38 -0000 (UTC)

 df4nx@gmx.net (d-ra) writes:

 >Michael van Elst via gnats <gnats-admin@netbsd.org> wrote:
 >...  
 >>  The interrupt handler of esm looks bad...

 >fxp0 freezes :-(


 And finally pci_intr_establish_xname also got the wrong pointer:

 @@ -1556,7 +1549,7 @@ esm_attach(device_t parent, device_t sel
                 return;
         }
         intrstr = pci_intr_string(pc, ih, intrbuf, sizeof(intrbuf));
 -       ess->ih = pci_intr_establish_xname(pc, ih, IPL_AUDIO, esm_intr, self,
 +       ess->ih = pci_intr_establish_xname(pc, ih, IPL_AUDIO, esm_intr, ess,
             device_xname(self));
         if (ess->ih == NULL) {
                 aprint_error_dev(ess->sc_dev, "can't establish interrupt");



 I'm committing the changes.

From: "Michael van Elst" <mlelstv@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/59621 CVS commit: src/sys/dev/pci
Date: Mon, 1 Sep 2025 17:44:29 +0000

 Module Name:	src
 Committed By:	mlelstv
 Date:		Mon Sep  1 17:44:29 UTC 2025

 Modified Files:
 	src/sys/dev/pci: esm.c

 Log Message:
 With the device_t split, esm(4) got damaged since the wrong pointer
 is passed around.

 Fixes PR install/59621

 Pullups -11, -10, -9.


 To generate a diff of this commit:
 cvs rdiff -u -r1.66 -r1.67 src/sys/dev/pci/esm.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/59621 CVS commit: [netbsd-11] src/sys/dev/pci
Date: Thu, 2 Apr 2026 17:58:37 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Thu Apr  2 17:58:37 UTC 2026

 Modified Files:
 	src/sys/dev/pci [netbsd-11]: esm.c

 Log Message:
 Pull up following revision(s) (requested by mlelstv in ticket #218):

 	sys/dev/pci/esm.c: revision 1.67

 With the device_t split, esm(4) got damaged since the wrong pointer
 is passed around.

 Fixes PR install/59621


 To generate a diff of this commit:
 cvs rdiff -u -r1.66 -r1.66.12.1 src/sys/dev/pci/esm.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/59621 CVS commit: [netbsd-10] src/sys/dev/pci
Date: Thu, 2 Apr 2026 18:00:21 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Thu Apr  2 18:00:21 UTC 2026

 Modified Files:
 	src/sys/dev/pci [netbsd-10]: esm.c

 Log Message:
 Pull up following revision(s) (requested by mlelstv in ticket #1250):

 	sys/dev/pci/esm.c: revision 1.67

 With the device_t split, esm(4) got damaged since the wrong pointer
 is passed around.

 Fixes PR install/59621


 To generate a diff of this commit:
 cvs rdiff -u -r1.66 -r1.66.4.1 src/sys/dev/pci/esm.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/59621 CVS commit: [netbsd-9] src/sys/dev/pci
Date: Thu, 2 Apr 2026 18:01:59 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Thu Apr  2 18:01:59 UTC 2026

 Modified Files:
 	src/sys/dev/pci [netbsd-9]: esm.c

 Log Message:
 Pull up following revision(s) (requested by mlelstv in ticket #2007):

 	sys/dev/pci/esm.c: revision 1.67

 With the device_t split, esm(4) got damaged since the wrong pointer
 is passed around.

 Fixes PR install/59621


 To generate a diff of this commit:
 cvs rdiff -u -r1.63.2.1 -r1.63.2.2 src/sys/dev/pci/esm.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.49 2026/05/14 01:52:41 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.