From owner-freebsd-multimedia@FreeBSD.ORG Sat Feb 4 02:00:24 2006 Return-Path: X-Original-To: freebsd-multimedia@hub.freebsd.org Delivered-To: freebsd-multimedia@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B73516A420 for ; Sat, 4 Feb 2006 02:00:24 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D34D143D45 for ; Sat, 4 Feb 2006 02:00:23 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k1420N8m078282 for ; Sat, 4 Feb 2006 02:00:23 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k1420Nad078281; Sat, 4 Feb 2006 02:00:23 GMT (envelope-from gnats) Date: Sat, 4 Feb 2006 02:00:23 GMT Message-Id: <200602040200.k1420Nad078281@freefall.freebsd.org> To: freebsd-multimedia@FreeBSD.org From: Josef Karthauser Cc: Subject: Re: kern/92764: [snd_ich] [panic] Kernel panic undef RELENG_6. X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Josef Karthauser List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2006 02:00:24 -0000 The following reply was made to PR kern/92764; it has been noted by GNATS. From: Josef Karthauser To: Ariff Abdullah Cc: bug-followup@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@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--