Date: Fri, 10 Feb 2006 11:00:22 GMT From: Josef Karthauser <joe@FreeBSD.org> To: freebsd-multimedia@FreeBSD.org Subject: Re: kern/92764: [snd_ich] [panic] Kernel panic undef RELENG_6. Message-ID: <200602101100.k1AB0MDA073299@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/92764; it has been noted by GNATS. From: Josef Karthauser <joe@FreeBSD.org> To: Ariff Abdullah <ariff@FreeBSD.org>, bug-followup@FreeBSD.org Cc: Subject: Re: kern/92764: [snd_ich] [panic] Kernel panic undef RELENG_6. Date: Fri, 10 Feb 2006 10:50:41 +0000 --ABTtc+pdwF7KHXCz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I think it might fix it. I've not had that hang since, so it doesn't make things worse! (I cannot reproduce the problem at will). Joe On Sat, Feb 04, 2006 at 01:54:16AM +0000, Josef Karthauser wrote: > Wow! A patch! Oooh, and so quicly too! :) :o). > Thanks Ariff. I'll build and install it now. >=20 > Ta, > Joe >=20 > On Sat, Feb 04, 2006 at 09:15:15AM +0800, Ariff Abdullah wrote: > > Does this patch fix it? > >=20 > > -- > > Ariff Abdullah > > FreeBSD >=20 > > --- 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, &s= c->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 >=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 = and theory. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=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 --ABTtc+pdwF7KHXCz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iEYEARECAAYFAkPscAEACgkQXVIcjOaxUBY2kACfSXgqAP9i3x2LFVi8K3ZZZZ2g YkcAnjmEc3DIGuO69cU7GgS+n2e8mqqk =boZM -----END PGP SIGNATURE----- --ABTtc+pdwF7KHXCz--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602101100.k1AB0MDA073299>