From owner-freebsd-current@FreeBSD.ORG Wed Jul 28 16:01:55 2010 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95F7A106564A; Wed, 28 Jul 2010 16:01:55 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102]) by mx1.freebsd.org (Postfix) with ESMTP id 4A0AF8FC19; Wed, 28 Jul 2010 16:01:55 +0000 (UTC) Received: from ncsc.bris.ac.uk ([137.222.10.41]) by dirg.bris.ac.uk with esmtp (Exim 4.69) (envelope-from ) id 1Oe94r-0005f8-Ps; Wed, 28 Jul 2010 17:01:53 +0100 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncsc.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1Oe94r-00031Q-Al; Wed, 28 Jul 2010 17:01:53 +0100 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.4/8.14.4) with ESMTP id o6SG1rHO091847; Wed, 28 Jul 2010 17:01:53 +0100 (BST) (envelope-from mexas@bristol.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.4/8.14.4/Submit) id o6SG1qOf091846; Wed, 28 Jul 2010 17:01:52 +0100 (BST) (envelope-from mexas@bristol.ac.uk) X-Authentication-Warning: mech-cluster241.men.bris.ac.uk: mexas set sender to mexas@bristol.ac.uk using -f Date: Wed, 28 Jul 2010 17:01:52 +0100 From: Anton Shterenlikht To: Andriy Gapon Message-ID: <20100728160152.GA91835@mech-cluster241.men.bris.ac.uk> References: <20100726132451.GA18443@mech-cluster241.men.bris.ac.uk> <1280226205.78791.0.camel@buffy.york.ac.uk> <20100727115831.GA46325@mech-cluster241.men.bris.ac.uk> <1280238737.78791.20.camel@buffy.york.ac.uk> <20100727144703.GA46905@mech-cluster241.men.bris.ac.uk> <1280249605.78791.36.camel@buffy.york.ac.uk> <20100727172021.GA47859@mech-cluster241.men.bris.ac.uk> <4C502902.8000806@icyb.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C502902.8000806@icyb.net.ua> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-current@FreeBSD.org, Gavin Atkinson , Anton Shterenlikht , lstewart@FreeBSD.org Subject: Re: amd64 panic snd_hda - hdac_get_capabilities: Invalid corb size (0) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 16:01:55 -0000 On Wed, Jul 28, 2010 at 03:56:34PM +0300, Andriy Gapon wrote: > on 27/07/2010 20:20 Anton Shterenlikht said the following: > > yes, thanks, the panic has gone away. > > There still seems to be a problem with this device: > > > > > > hdac0@pci0:0:20:2: class=0x040300 card=0x30c2103c chip=0x43831002 rev=0x00 hdr=0x00 > > vendor = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.' > > device = 'IXP SB600 High Definition Audio Controller' > > class = multimedia > > subclass = HDA > > > > > > hdac0: irq 16 at device 20.2 on pci0 > > hdac0: HDA Driver Revision: 20100226_0142 > > hdac0: [ITHREAD] > > hdac0: hdac_get_capabilities: Invalid rirb size (0) > > device_attach: hdac0 attach returned 6 > > > > > > I understand from the manual, there should > > be devices /dev/pcmX and /dev/dsp, but I have neither. > > > > I'll ask in @questions. > > > > many thanks for a quick fix! > > Can you also try the following patch? > If the patch works, could you please report back `dmesg | fgrep -i hda` output? here it is: % dmesg|fgrep -i hda pci0: at device 20.2 (no driver attached) pci0: at device 20.2 (no driver attached) hdac0: irq 16 at device 20.2 on pci0 hdac0: HDA Driver Revision: 20100226_0142 hdac0: [ITHREAD] hdac0: hdac_get_capabilities: Invalid rirb size (0) device_attach: hdac0 attach returned 6 hdac0: irq 16 at device 20.2 on pci0 hdac0: HDA Driver Revision: 20100226_0142 hdac0: [ITHREAD] hdac0: hdac_get_capabilities: Invalid rirb size (0) hdac0: Resetting rirb size to 256 many thanks anton > > diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c > index 22ea4c8..a5556d2 100644 > --- a/sys/dev/sound/pci/hda/hdac.c > +++ b/sys/dev/sound/pci/hda/hdac.c > @@ -1609,7 +1609,15 @@ hdac_get_capabilities(struct hdac_softc *sc) > else { > device_printf(sc->dev, "%s: Invalid corb size (%x)\n", > __func__, corbsize); > - return (ENXIO); > + if (corbsize == 0) { > + device_printf(sc->dev, "Resetting corb size to 256\n"); > + sc->corb_size = 256; > + corbsize = > + HDAC_CORBSIZE_CORBSIZE(HDAC_CORBSIZE_CORBSIZE_256); > + HDAC_WRITE_1(&sc->mem, HDAC_CORBSIZE, corbsize); > + } > + else > + return (ENXIO); > } > > rirbsize = HDAC_READ_1(&sc->mem, HDAC_RIRBSIZE); > @@ -1625,7 +1633,15 @@ hdac_get_capabilities(struct hdac_softc *sc) > else { > device_printf(sc->dev, "%s: Invalid rirb size (%x)\n", > __func__, rirbsize); > - return (ENXIO); > + if (rirbsize == 0) { > + device_printf(sc->dev, "Resetting rirb size to 256\n"); > + sc->rirb_size = 256; > + rirbsize = > + HDAC_RIRBSIZE_RIRBSIZE(HDAC_RIRBSIZE_RIRBSIZE_256); > + HDAC_WRITE_1(&sc->mem, HDAC_RIRBSIZE, rirbsize); > + } > + else > + return (ENXIO); > } > > HDA_BOOTVERBOSE( > > -- > Andriy Gapon -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423