NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: install/59621: kernel panic with Fujitsu Siemens Lifebook E Series



The following reply was made to PR install/59621; it has been noted by GNATS.

From: mlelstv%serpens.de@localhost (Michael van Elst)
To: gnats-bugs%netbsd.org@localhost
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@localhost (d-ra) writes:
 
 >Michael van Elst via gnats <gnats-admin%netbsd.org@localhost> 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");
 


Home | Main Index | Thread Index | Old Index