Subject: kern/21031: auich quirk foo
To: None <gnats-bugs@gnats.netbsd.org>
From: None <lha@netbsd.org>
List: netbsd-bugs
Date: 04/05/2003 17:10:22
>Number: 21031
>Category: kern
>Synopsis: auich quirk foo
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Apr 05 07:11:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Love
>Release: NetBSD 1.6Q
>Organization:
>Environment:
System: NetBSD nutcracker.stacken.kth.se 1.6Q NetBSD 1.6Q (NUTCRACKER) #76: Sat Apr 5 16:01:31 CEST 2003 root@dhcp196.it.su.se:/usr/src/sys/arch/i386/compile/NUTCRACKER i386
Architecture: i386
Machine: i386
>Description:
I've got a `Intel 82801BA (ICH2)' it maybe needs a quick that ignores
that codec isn't ready.
>How-To-Repeat:
n/a
>Fix:
Index: auich.c
===================================================================
RCS file: /sources/netbsd/NetBSD-cvs/src/sys/dev/pci/auich.c,v
retrieving revision 1.36
diff -u -u -w -r1.36 auich.c
--- auich.c 1 Feb 2003 06:23:38 -0000 1.36
+++ auich.c 4 Apr 2003 21:55:26 -0000
@@ -320,13 +320,18 @@
int product;
const char *name;
const char *shortname;
+ int quirks;
+#define QUIRK_IGNORE_CODEC_READY 0x1
+#define QUIRK_IGNORE_CODEC_READY_MAYBE 0x2
} auich_devices[] = {
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801AA_ACA,
"i82801AA (ICH) AC-97 Audio", "ICH" },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801AB_ACA,
- "i82801AB (ICH0) AC-97 Audio", "ICH0" }, /* i810-L */
+ "i82801AB (ICH0) AC-97 Audio", "ICH0",
+ QUIRK_IGNORE_CODEC_READY_MAYBE }, /* i810-L */
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801BA_ACA,
- "i82801BA (ICH2) AC-97 Audio", "ICH2" },
+ "i82801BA (ICH2) AC-97 Audio", "ICH2",
+ QUIRK_IGNORE_CODEC_READY_MAYBE },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82440MX_ACA,
"i82440MX AC-97 Audio", "440MX" },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801CA_AC,
@@ -336,7 +341,8 @@
{ PCI_VENDOR_SIS, PCI_PRODUCT_SIS_7012_AC,
"SiS 7012 AC-97 Audio", "SiS7012" },
{ PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_NFORCE_MCP_AC,
- "nForce MCP AC-97 Audio", "nForce-MCP" },
+ "nForce MCP AC-97 Audio", "nForce-MCP",
+ QUIRK_IGNORE_CODEC_READY },
{ PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_NFORCE2_MCPT_AC,
"nForce2 MCP-T AC-97 Audio", "nForce-MCP-T" },
{ PCI_VENDOR_AMD, PCI_PRODUCT_AMD_PBC768_AC,
@@ -447,11 +453,10 @@
sc->sc_sts_reg = ICH_STS;
sc->sc_sample_size = 2;
}
- /* nForce MCP quirk */
- if (d->vendor == PCI_VENDOR_NVIDIA
- && d->product == PCI_PRODUCT_NVIDIA_NFORCE_MCP_AC) {
+
+ if (d->quirks & QUIRK_IGNORE_CODEC_READY)
sc->sc_ignore_codecready = TRUE;
- }
+
/* Workaround for a 440MX B-stepping erratum */
sc->sc_dmamap_flags = BUS_DMA_COHERENT;
if (d->vendor == PCI_VENDOR_INTEL
@@ -471,13 +476,11 @@
auich_reset_codec(sc);
status = bus_space_read_4(sc->iot, sc->aud_ioh, ICH_GSTS);
if (!(status & ICH_PCR)) { /* reset failure */
- if (d->vendor == PCI_VENDOR_INTEL
- && d->product == PCI_PRODUCT_INTEL_82801DB_AC) {
/* MSI 845G Max never return ICH_PCR */
+ if (d->quirks & QUIRK_IGNORE_CODEC_READY_MAYBE)
sc->sc_ignore_codecready = TRUE;
- } else {
+ else
return;
- }
}
/* Print capabilities though there are no supports for now */
if ((status & ICH_SAMPLE_CAP) == ICH_POM20)
>Release-Note:
>Audit-Trail:
>Unformatted: