Subject: port-i386/9355: "options PCIBIOS" changes will make AC97 probe fail
To: None <gnats-bugs@gnats.netbsd.org>
From: Jun-ichiro itojun Hagino <itojun@itojun.org>
List: netbsd-bugs
Date: 02/04/2000 23:54:41
>Number:         9355
>Category:       port-i386
>Synopsis:       "options PCIBIOS" changes will make AC97 probe fail
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-i386-maintainer (NetBSD/i386 Portmaster)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb  4 23:54:01 2000
>Last-Modified:
>Originator:     Jun-ichiro itojun Hagino
>Organization:
	itojun.org
>Release:        netbsd-current, yesterday
>Environment:
NetBSD starfruit.itojun.org 1.4R NetBSD 1.4R (STARFRUIT) #67: Sat Feb  5 16:37:03 JST 2000     itojun@starfruit.itojun.org:/usr/home/itojun/NetBSD/src/sys/arch/i386/compile/STARFRUIT i386

>Description:
	With almost-generic kernel on ThinkPad570, clcs0 (Cirrus Logic
	PCI sound) probes fine.  with "options PCIBIOS" it fails due to
	initialization failure in AC97 related code.
>How-To-Repeat:
	have the following items added into GENERIC (from DR-EVIL).
options        PCIBIOS                 # PCI BIOS support
options        PCIBIOSVERBOSE          # PCI BIOS verbose info
options        PCIBIOS_INTR_FIXUP      # fixup PCI interrupt routing
#options       PCIINTR_DEBUG           # super-verbse PCI interrupt fixup
options        PCIBIOS_BUS_FIXUP       # fixup PCI bus numbering

	see dmesg result changes.
	""reset_codec: AC97 inputs slot ready timeout""
	is the most important difference, it seems.

--- without-pcibios	Sat Feb  5 16:50:39 2000
+++ with-pcibios	Sat Feb  5 16:50:33 2000
@@ -1,11 +1,29 @@
-NetBSD 1.4R (STARFRUIT) #67: Sat Feb  5 16:37:03 JST 2000
+NetBSD 1.4R (STARFRUIT) #65: Sat Feb  5 02:08:26 JST 2000
     itojun@starfruit.itojun.org:/usr/home/itojun/NetBSD/src/sys/arch/i386/compile/STARFRUIT
 cpu0: family 6 model 6 step a
 cpu0: Intel Pentium II (Celeron) (686-class)
 total memory = 65088 KB
-avail memory = 56024 KB
+avail memory = 56012 KB
 using 839 buffers containing 3356 KB of memory
 BIOS32 rev. 0 found at 0xfd840
+PCI BIOS rev. 2.1 found at 0xfd96f
+pcibios: config mechanism [1][x], special cycles [x][x], last bus 10
+PCI IRQ Routing Table rev. 1.0 found at 0xfdef0, size 192 bytes (10 entries)
+PCI Interrupt Router at 000:06:0 (Intel 82371FB PCI-to-ISA Bridge (PIIX))
+--------------------------------------------
+  device vendor product pin PIRQ   IRQ stage
+--------------------------------------------
+000:02:0 0x104c 0xac1b  A   0x00   11  0
+000:02:1 0x104c 0xac1b  B   0x01   11  0
+000:05:0 0x1013 0x6003  A   0x00   11  0
+000:06:2 0x8086 0x7112  D   0x03   11  0
+000:07:0 0x11c1 0x0448  A   0x02   11  0
+001:00:0 0x10c8 0x0005  A   0x00   11  0
+--------------------------------------------
+PCI bridge 0: primary 0, secondary 1, subordinate 1
+PCI bridge 1: primary 0, secondary 2, subordinate 2
+PCI bridge 2: primary 0, secondary 3, subordinate 3
+PCI bus #3 is the last bus
 mainbus0 (root)
 pci0 at mainbus0 bus 0: configuration mode 1
 pci0: i/o space, memory space enabled
@@ -20,8 +38,11 @@
 Texas Instruments PCI1450 PCI-CardBus Bridge (CardBus bridge, revision 0x03) at pci0 dev 2 function 1 not configured
 clcs0 at pci0 dev 5 function 0: Cirrus Logic CS4280 CrystalClear Audio Interface (rev. 0x01)
 clcs0: interrupting at irq 11
-clcs0: Cirrus Logic CS4297 codec; headphone, 18 bit DAC, 18 bit ADC, no 3D stereo
-audio0 at clcs0: full duplex, independent
+reset_codec: AC97 inputs slot ready timeout
+clcs0: AC97 write fail (DCV!=0) for add=0x26 data=0x0000
+clcs0: AC97 write fail (DCV!=0) for add=0x00 data=0x0000
+clcs0: AC97 read prob. (DCV!=0) for add=0x7c
+clcs0: ac97_attach failed
 pcib0 at pci0 dev 6 function 0
 pcib0: Intel 82371AB PCI-to-ISA Bridge (PIIX4) (rev. 0x02)
 Intel 82371AB IDE controller (PIIX4) (IDE mass storage, interface 0x80, revision 0x01) at pci0 dev 6 function 1 not configured

>Fix:
	don't know.
>Audit-Trail:
>Unformatted: