Subject: kludge for CS4236B on isapnp (e.g. Dell Dimension)
To: None <port-i386@netbsd.org>
From: John Kohl <jtk@kolvir.arlington.ma.us>
List: port-i386
Date: 12/12/1998 11:29:20
Based on mail from Lennart earlier this year, I whipped up a
slightly-less-than-totally-disgusting kludge to attach my WSS hardware
to audio under NetBSD.

If anybody can get this stuff actually working within wss_isapnp.c,
that'd be better, of course!

Index: arch/i386/isa/isapnp_machdep.c
===================================================================
RCS file: /u3/cvsroot/src/sys/arch/i386/isa/isapnp_machdep.c,v
retrieving revision 1.1.1.6
retrieving revision 1.2
diff -c -r1.1.1.6 -r1.2
*** isapnp_machdep.c	1998/09/07 02:20:27	1.1.1.6
--- isapnp_machdep.c	1998/12/12 15:51:24	1.2
***************
*** 62,67 ****
--- 62,68 ----
  
  #include <dev/isapnp/isapnpreg.h>
  #include <dev/isapnp/isapnpvar.h>
+ #include "wss_isapnp.h"
  
  /* isapnp_map():
   *	Map I/O regions used by PnP
***************
*** 78,83 ****
--- 79,97 ----
  
  	sc->sc_addr_ioh = ISAPNP_ADDR;
  	sc->sc_wrdata_ioh = ISAPNP_WRDATA;
+ #if NWSS_ISAPNP > 0
+ 	{
+ 	    bus_space_handle_t ioh;
+ 	    int rv;
+ 	    if ((rv = bus_space_map(sc->sc_iot, 0x534, 1, 0, &ioh)) == 0) {
+ 		DPRINTF(("wss probe kludge\n"));
+ 		(void) bus_space_read_1(sc->sc_iot, ioh, 0);
+ 		bus_space_unmap(sc->sc_iot, ioh, 1);
+ 	    } else {
+ 		DPRINTF(("wss probe kludge failed to map: %d\n", rv));
+ 	    }
+ 	}
+ #endif
  	return (0);
  }
  
Index: dev/isapnp/files.isapnp
===================================================================
RCS file: /u3/cvsroot/src/sys/dev/isapnp/files.isapnp,v
retrieving revision 1.1.1.20
retrieving revision 1.2
diff -c -r1.1.1.20 -r1.2
*** files.isapnp	1998/11/25 20:11:31	1.1.1.20
--- files.isapnp	1998/12/12 15:51:51	1.2
***************
*** 53,59 ****
  
  # WSS compatibles
  attach	wss at isapnp with wss_isapnp
! file	dev/isapnp/wss_isapnp.c			wss_isapnp
  
  # ESS compatibles
  attach	ess at isapnp with ess_isapnp
--- 53,59 ----
  
  # WSS compatibles
  attach	wss at isapnp with wss_isapnp
! file	dev/isapnp/wss_isapnp.c			wss_isapnp needs-flag
  
  # ESS compatibles
  attach	ess at isapnp with ess_isapnp