Subject: kern/8601: ThinkPad 240 hangs when attaching eso* audio driver.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <hashikaw@biology.tohoku.ac.jp>
List: netbsd-bugs
Date: 10/10/1999 08:36:47
>Number:         8601
>Category:       kern
>Synopsis:       ThinkPad 240 hangs when attaching eso* audio driver.
>Confidential:   yes
>Severity:       critical
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 10 08:36:00 1999
>Last-Modified:
>Originator:     Kouichi Hashikawa
>Organization:
>Release:        NetBSD 1.4K
>Environment:
	<machine, os, target, libraries (multiple lines)>
System: NetBSD himawari 1.4K NetBSD 1.4K (HIMAWARI) #0: Sun Oct 10 16:48:40 JST 1999 hashikaw@himawari:/usr/src/sys/arch/i386/compile/HIMAWARI i386


>Description:
	ThinkPad 240(2609-21J) has following device
	(This message is when disable 'eso* at pci? dev ? function ?'
	at kernel configuration):

	ESS Technology Inc SOLO-1 Audio Drive (audio multimedia, revision 0x02) at pci0 dev 11 function 0 not configured

	When I enable 'eso* at pci? dev ? function ?', my ThinkPad 240 hangs
	during boot (attaching eso0).

>How-To-Repeat:
	always, at machines which has 'ESS Solo-1 revision 0x02'.

>Fix:
	Please check following patch.
	'struct eso_rev2model' at eso.c(revision 1.8) has 2-items:

static const char * const eso_rev2model[] = {
	"ES1938",
	"ES1946"
};


	FYI: 
	1. applied following patch, my ThinkPad 240's ESS Solo-1 works
	   very well.
	2. I don't know the name of chip, 'ESS Solo-1 revision 0x02'.
	   IBM(Japan) don't describe the name at any manuals.


*** eso.c-1.8	Sun Oct 10 23:14:00 1999
--- eso.c	Sun Oct 10 23:18:19 1999
***************
*** 210,216 ****
  	sc->sc_revision = PCI_REVISION(pa->pa_class);
  
  	printf(": ESS Solo-1 PCI AudioDrive ");
! 	if (sc->sc_revision <=
  	    sizeof (eso_rev2model) / sizeof (eso_rev2model[0]))
  		printf("%s\n", eso_rev2model[sc->sc_revision]);
  	else
--- 210,216 ----
  	sc->sc_revision = PCI_REVISION(pa->pa_class);
  
  	printf(": ESS Solo-1 PCI AudioDrive ");
! 	if (sc->sc_revision <
  	    sizeof (eso_rev2model) / sizeof (eso_rev2model[0]))
  		printf("%s\n", eso_rev2model[sc->sc_revision]);
  	else
***************
*** 858,864 ****
  	strncpy(retp->name, "ESS Solo-1", sizeof (retp->name));
  	snprintf(retp->version, sizeof (retp->version), "0x%02x",
  	    sc->sc_revision);
! 	if (sc->sc_revision <=
  	    sizeof (eso_rev2model) / sizeof (eso_rev2model[0]))
  		strncpy(retp->config, eso_rev2model[sc->sc_revision],
  		    sizeof (retp->config));
--- 858,864 ----
  	strncpy(retp->name, "ESS Solo-1", sizeof (retp->name));
  	snprintf(retp->version, sizeof (retp->version), "0x%02x",
  	    sc->sc_revision);
! 	if (sc->sc_revision <
  	    sizeof (eso_rev2model) / sizeof (eso_rev2model[0]))
  		strncpy(retp->config, eso_rev2model[sc->sc_revision],
  		    sizeof (retp->config));

>Audit-Trail:
>Unformatted: