Date: Sun, 5 Sep 2004 22:32:33 +0200 From: Stephane Legrand <stephane@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org Subject: Re: kern/71189: Kernel panic (trace included) "recursed on non-recursive mutex" with SoundBlaster 32 (ISA port) Message-ID: <20040905203233.GA657@sequoia.mondomaineamoi.megalo> In-Reply-To: <200408311150.i7VBoSo0044177@freefall.freebsd.org> References: <200408311147.i7VBl2JJ017235@sequoia.mondomaineamoi.megalo> <200408311150.i7VBoSo0044177@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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;
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040905203233.GA657>
