tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Kernel panic on assertion in if_wpi.c
On Fri, Jan 09, 2015 at 10:00:23AM +0000, chris%chriswareham.net@localhost wrote:
> Hi,
>
> I upgraded my Dell Latitude D420 to -current, and have run into an issue with
> wpi(4) wireless. It appears to be connected to Manuel Bouyer's recent work
> around power management, as the kernel panics at the following assertion:
>
> kernel diagnostic assertion "mutex_owned(&sc->sc_rsw_mtx)" failed: file
> "/home/source/ab/HEAD/src/sys/dev/if_wpi.c", line 3309
>
> A backtrace on the kernel dump shows this to be in wpi_getrfkill after it's
> called from wpi_init.
The attached patch should be enough to fix it; can you please test ?
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Index: if_wpi.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_wpi.c,v
retrieving revision 1.70
diff -u -p -u -r1.70 if_wpi.c
--- if_wpi.c 6 Jan 2015 15:39:54 -0000 1.70
+++ if_wpi.c 9 Jan 2015 12:12:53 -0000
@@ -3197,13 +3197,16 @@ wpi_init(struct ifnet *ifp)
goto fail1;
/* Check the status of the radio switch */
+ mutex_enter(&sc->sc_rsw_mtx);
if (wpi_getrfkill(sc)) {
+ mutex_exit(&sc->sc_rsw_mtx);
aprint_error_dev(sc->sc_dev,
"radio is disabled by hardware switch\n");
ifp->if_flags &= ~IFF_UP;
error = EBUSY;
goto fail1;
}
+ mutex_exit(&sc->sc_rsw_mtx);
/* wait for thermal sensors to calibrate */
for (ntries = 0; ntries < 1000; ntries++) {
Home |
Main Index |
Thread Index |
Old Index