Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jul 2010 15:56:34 +0300
From:      Andriy Gapon <avg@icyb.net.ua>
To:        Anton Shterenlikht <mexas@bristol.ac.uk>
Cc:        freebsd-current@FreeBSD.org, Gavin Atkinson <gavin@FreeBSD.org>, lstewart@FreeBSD.org
Subject:   Re: amd64 panic snd_hda - hdac_get_capabilities: Invalid corb size (0)
Message-ID:  <4C502902.8000806@icyb.net.ua>
In-Reply-To: <20100727172021.GA47859@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>

next in thread | previous in thread | raw e-mail | index | archive | help
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: <ATI SB600 High Definition Audio Controller> 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?

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C502902.8000806>