From jose@we.lc.ehu.es  Sat Apr  7 16:27:07 2001
Return-Path: <jose@we.lc.ehu.es>
Received: from polaris.we.lc.ehu.es (polaris.we.lc.ehu.es [158.227.6.43])
	by hub.freebsd.org (Postfix) with ESMTP id E24E837B423
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  7 Apr 2001 16:27:05 -0700 (PDT)
	(envelope-from jose@we.lc.ehu.es)
Received: from v-ger.we.lc.ehu.es (lxpx496.lx.ehu.es [158.227.27.142])
	by polaris.we.lc.ehu.es (8.11.1/8.11.1) with ESMTP id f37NQm901122
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 8 Apr 2001 01:26:48 +0200 (MET DST)
Received: (from jose@localhost)
	by v-ger.we.lc.ehu.es (8.11.3/8.11.3) id f37NQgF01681;
	Sun, 8 Apr 2001 01:26:42 +0200 (CEST)
	(envelope-from jose)
Message-Id: <200104072326.f37NQgF01681@v-ger.we.lc.ehu.es>
Date: Sun, 8 Apr 2001 01:26:42 +0200 (CEST)
From: "Jose M. Alcaide" <jose@we.lc.ehu.es>
Reply-To: jose@we.lc.ehu.es
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: yet another ES1371 sound chip rev.
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         26415
>Category:       i386
>Synopsis:       [FIX] yet another ES1371 sound chip rev.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 07 16:30:04 PDT 2001
>Closed-Date:    Sat Apr 7 17:08:00 PDT 2001
>Last-Modified:  Tue May  1 16:40:03 PDT 2001
>Originator:     Jose M. Alcaide
>Release:        FreeBSD 4.3-RC i386
>Organization:
Universidad del Pais Vasco / Dept. de Electricidad y Electronica
>Environment:
System: FreeBSD v-ger.we.lc.ehu.es 4.3-RC FreeBSD 4.3-RC #3: Wed Mar 28 16:25:53 CEST 2001 toor@v-ger.we.lc.ehu.es:/usr/obj/usr/src/sys/V-GER i386


>Description:

After installing 4.3-RC1 on a new system based on the Gigabyte GA-7ZX
motherboard, which includes an ES1371 audio chip, the pcm driver
fails to detect the AC97 codec properly:

pcm0: <AudioPCI ES1371> port 0xd000-0xd03f irq 10 at device 14.0 on pci0
es_init
es_init pre ac97 2.1
wrcodec addr 0x26 data 0x0
wrcodec addr 0x0 data 0x0
rdcodec addr 0x0 ... loop 1 t 0x1000 x 0x40000000 loop 2 t 0x5000 x 0x70000 loop 3 t 0x1000 0x40000000
ret 0x0
rdcodec addr 0x7c ... loop 1 t 0x1000 x 0x40000000 loop 2 t 0x5000 x 0x70000 loop 3 t 0x1000
0x40000000 ret 0x0
rdcodec addr 0x7e ... loop 1 t 0x1000 x 0x40000000 loop 2 t 0x5000 x 0x70000 loop 3 t 0x1000
0x40000000 ret 0x0
pcm0: ac97 codec invalid or not present (id == 0)
device_probe_and_attach: pcm0 attach returned 6

And this is the relevant line from "pciconf -l":

none0@pci0:14:0:        class=0x040100 card=0xa0001458 chip=0x58801274 rev=0x03 hdr=0x00

>How-To-Repeat:
	N/A
>Fix:

I modified es137x.c, changing the test

  revid == 7 || revid >= 9 || (devid == ES1371_PCI_ID3 && revid == 2)

to (yes, I know it is ugly ;-) ):

  revid == 7 || revid >= 9 || (devid == ES1371_PCI_ID3 && (revid == 2 || revid == 3))


(Ugly, but it works)
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: greid 
State-Changed-When: Sat Apr 7 17:08:00 PDT 2001 
State-Changed-Why:  
Revision ID added, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=26415 

From: "David W. Chapman Jr." <dwcjr@inethouston.net>
To: <FreeBSD-gnats-submit@freebsd.org>,
	"Jose M. Alcaide" <jose@we.lc.ehu.es>
Cc: <greid@freebsd.org>
Subject: Re: i386/26415: [FIX] yet another ES1371 sound chip rev.
Date: Tue, 1 May 2001 18:34:09 -0500

 I'm looking through the cvs logs and I don't see this in RELENG_4, and I
 missing it?
 

From: George Reid <greid@FreeBSD.org>
To: "David W. Chapman Jr." <dwcjr@inethouston.net>
Cc: FreeBSD-gnats-submit@freebsd.org,
	"Jose M. Alcaide" <jose@we.lc.ehu.es>
Subject: Re: i386/26415: [FIX] yet another ES1371 sound chip rev.
Date: Wed, 2 May 2001 00:38:41 +0100 (BST)

 On Tue, 1 May 2001, David W. Chapman Jr. wrote:
 
 > I'm looking through the cvs logs and I don't see this in RELENG_4, and I
 > missing it?
 
 You're not missing it - it hasn't been MFC'd yet. I'll be doing an MFC of
 some ES137x stuff in the next couple of days.
 
 ~greid
 --
 +-------------------+---------------------+
 |    George Reid    |  FreeBSD Committer  |
 |  +44 7740 197460  |  greid@FreeBSD.org  |
 +-------------------+---------------------+
 
>Unformatted:
