kern/71189: Kernel panic (trace included) "recursed on non-recursive mutex" with SoundBlaster 32 (ISA port)

Stephane Legrand stephane at FreeBSD.org
Sun Sep 5 13:32:43 PDT 2004


After looking at revision 1.84 of the sb16.c file (which corrected
a similar problem), i wrote and tried the patch below. It fixes the
problem, i can now play music with xmms or mplayer.

--- sb16.c.original	Sat Sep  4 23:47:39 2004
+++ sb16.c	Sun Sep  5 22:24:52 2004
@@ -209,7 +209,7 @@
 #if 0
     	printf("sb_cmd2: %x, %x\n", cmd, val);
 #endif
-	sb_lock(sb);
+	sb_lockassert(sb);
 	r = 0;
     	if (sb_dspwr(sb, cmd)) {
 		if (sb_dspwr(sb, val & 0xff)) {
@@ -218,7 +218,6 @@
 			}
 		}
     	}
-	sb_unlock(sb);
 
 	return r;
 }
@@ -243,12 +242,11 @@
 {
     	int val;
 
-	sb_lock(sb);
+    	sb_lockassert(sb);
     	sb_wr(sb, SB_MIX_ADDR, (u_char) (port & 0xff)); /* Select register */
     	DELAY(10);
     	val = sb_rd(sb, SB_MIX_DATA);
     	DELAY(10);
-	sb_unlock(sb);
 
     	return val;
 }


More information about the freebsd-bugs mailing list