[ jhb and tanimura CC'd because they are the last two to
  touch mpu.c ]

I have a maestro3 sound card in a Dell lattitude C600.
Configuring pcm, midi, and seq in KERNCONF results in
that kernel panic'ing in mpu.c:releaseres() at mtx_destroy().
I'm guessing it is because the mutex isn't yet created
since releaseres() is most often called from the probe()
functions.

This fixes the panic, but I'm not sure what the original
intent of the authors were.

FYI, emu0 and mpu0 fail to probe/attach on my system.

  emu0: Resource alloc failed, pnp_quirks may need { 0x00000000, 0x00000000 }
  mpu0: reset failed.

Here's the patch that I'm using:

-- 
Dan Eischen

%%%
Index: dev/sound/isa/mpu.c
===================================================================
RCS file: /opt/FreeBSD/cvs/src/sys/dev/sound/isa/mpu.c,v
retrieving revision 1.16
diff -u -r1.16 mpu.c
--- dev/sound/isa/mpu.c 4 Apr 2002 21:03:16 -0000       1.16
+++ dev/sound/isa/mpu.c 2 Dec 2002 06:43:18 -0000
@@ -363,6 +363,7 @@
        /* Allocate the resources, switch to uart mode. */
        if (mpu_allocres(scp, dev) || mpu_uartmode(scp)) {
                mpu_releaseres(scp, dev);
+               mtx_destroy(&scp->mtx);
                return (ENXIO);
        }
 
@@ -769,7 +770,6 @@
                bus_release_resource(dev, SYS_RES_IOPORT, scp->io_rid, scp->io);
                scp->io = NULL;
        }
-       mtx_destroy(&scp->mtx);
 }
%%%

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to