kern/92764: [snd_ich] [panic] Kernel panic undef RELENG_6.

Josef Karthauser joe at FreeBSD.org
Fri Feb 3 18:00:24 PST 2006


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

From: Josef Karthauser <joe at FreeBSD.org>
To: Ariff Abdullah <ariff at FreeBSD.org>
Cc: bug-followup at FreeBSD.org
Subject: Re: kern/92764: [snd_ich] [panic] Kernel panic undef RELENG_6.
Date: Sat, 4 Feb 2006 01:54:16 +0000

 --HnQK338I3UIa/qiP
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Wow! A patch!  Oooh, and so quicly too! :) :o).
 Thanks Ariff. I'll build and install it now.
 
 Ta,
 Joe
 
 On Sat, Feb 04, 2006 at 09:15:15AM +0800, Ariff Abdullah wrote:
 > Does this patch fix it?
 >=20
 > --
 > Ariff Abdullah
 > FreeBSD
 
 > --- src/sys/dev/sound/pci/ich.c.orig	Tue Jan 17 13:13:37 2006
 > +++ src/sys/dev/sound/pci/ich.c	Sat Feb  4 09:08:45 2006
 > @@ -677,7 +677,6 @@
 >  ich_init(struct sc_info *sc)
 >  {
 >  	u_int32_t stat;
 > -	int sz;
 > =20
 >  	ich_wr(sc, ICH_REG_GLOB_CNT, ICH_GLOB_CTL_COLD, 4);
 >  	DELAY(600000);
 > @@ -701,15 +700,6 @@
 >  	if (sc->hasmic && ich_resetchan(sc, 2))
 >  		return ENXIO;
 > =20
 > -	if (bus_dmamem_alloc(sc->dmat, (void **)&sc->dtbl, BUS_DMA_NOWAIT, &sc-=
 >dtmap))
 > -		return ENOSPC;
 > -
 > -	sz =3D sizeof(struct ich_desc) * ICH_DTBL_LENGTH * 3;
 > -	if (bus_dmamap_load(sc->dmat, sc->dtmap, sc->dtbl, sz, ich_setmap, sc, =
 0)) {
 > -		bus_dmamem_free(sc->dmat, (void **)&sc->dtbl, sc->dtmap);
 > -		return ENOSPC;
 > -	}
 > -
 >  	return 0;
 >  }
 > =20
 > @@ -828,6 +818,15 @@
 >  		goto bad;
 >  	}
 > =20
 > +	if (bus_dmamem_alloc(sc->dmat, (void **)&sc->dtbl,
 > +		    BUS_DMA_NOWAIT, &sc->dtmap))
 > +		goto bad;
 > +
 > +	if (bus_dmamap_load(sc->dmat, sc->dtmap, sc->dtbl,
 > +		    sizeof(struct ich_desc) * ICH_DTBL_LENGTH * 3,
 > +		    ich_setmap, sc, 0))
 > +		goto bad;
 > +
 >  	sc->codec =3D AC97_CREATE(dev, sc, ich_ac97);
 >  	if (sc->codec =3D=3D NULL)
 >  		goto bad;
 > @@ -895,6 +894,10 @@
 >  	if (sc->nabmbar)
 >  		bus_release_resource(dev, sc->regtype,
 >  		    sc->nabmbarid, sc->nabmbar);
 > +	if (sc->dtmap)
 > +		bus_dmamap_unload(sc->dmat, sc->dtmap);
 > +	if (sc->dmat)
 > +		bus_dma_tag_destroy(sc->dmat);
 >  	if (sc->ich_lock)
 >  		snd_mtxfree(sc->ich_lock);
 >  	free(sc, M_DEVBUF);
 > @@ -916,6 +919,7 @@
 >  	bus_release_resource(dev, SYS_RES_IRQ, sc->irqid, sc->irq);
 >  	bus_release_resource(dev, sc->regtype, sc->nambarid, sc->nambar);
 >  	bus_release_resource(dev, sc->regtype, sc->nabmbarid, sc->nabmbar);
 > +	bus_dmamap_unload(sc->dmat, sc->dtmap);
 >  	bus_dma_tag_destroy(sc->dmat);
 >  	snd_mtxfree(sc->ich_lock);
 >  	free(sc, M_DEVBUF);
 > @@ -987,24 +991,21 @@
 >  	}
 >  	/* Reinit mixer */
 >  	ich_pci_codec_reset(sc);
 > +	ICH_UNLOCK(sc);
 >  	ac97_setextmode(sc->codec, sc->hasvra | sc->hasvrm);
 >      	if (mixer_reinit(dev) =3D=3D -1) {
 >  		device_printf(dev, "unable to reinitialize the mixer\n");
 > -		ICH_UNLOCK(sc);
 >  		return ENXIO;
 >  	}
 >  	/* Re-start DMA engines */
 >  	for (i =3D 0 ; i < 3; i++) {
 >  		struct sc_chinfo *ch =3D &sc->ch[i];
 >  		if (sc->ch[i].run_save) {
 > -			ICH_UNLOCK(sc);
 >  			ichchan_setblocksize(0, ch, ch->blksz);
 >  			ichchan_setspeed(0, ch, ch->spd);
 >  			ichchan_trigger(0, ch, PCMTRIG_START);
 > -			ICH_LOCK(sc);
 >  		}
 >  	}
 > -	ICH_UNLOCK(sc);
 >  	return 0;
 >  }
 > =20
 
 
 --=20
 Josef Karthauser (joe at tao.org.uk)	       http://www.josef-k.net/
 FreeBSD (cvs meister, admin and hacker)     http://www.uk.FreeBSD.org/
 Physics Particle Theory (student)   http://www.pact.cpes.sussex.ac.uk/
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D An eclectic mix of fact an=
 d theory. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 
 --HnQK338I3UIa/qiP
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.2 (FreeBSD)
 
 iEYEARECAAYFAkPkCUcACgkQXVIcjOaxUBa7BQCgp5kdwPYfp725cRpfUcYpn4PC
 sAQAniuMUzuo393iTN8LPqLTxpZbb33S
 =eMd5
 -----END PGP SIGNATURE-----
 
 --HnQK338I3UIa/qiP--


More information about the freebsd-multimedia mailing list