Subject: Re: kern/32473 (GUS PnP audio device seem to be broken in NetBSD 3.0)
To: None <gnats-bugs@NetBSD.org>
From: Jared D. McNeill <jmcneill@invisible.ca>
List: netbsd-bugs
Date: 09/24/2006 16:18:24
--Apple-Mail-1-429677987
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed

As far as I can tell, the gus_isapnp_attach function never calls  
isa_drq_alloc. Can you try the attached patch?

Cheers,
Jared


--Apple-Mail-1-429677987
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0640;
	name=gus_isapnp.diff
Content-Disposition: attachment;
	filename=gus_isapnp.diff

Index: gus_isapnp.c
===================================================================
RCS file: /cvsroot/src/sys/dev/isapnp/gus_isapnp.c,v
retrieving revision 1.27
diff -u -r1.27 gus_isapnp.c
--- gus_isapnp.c	30 Aug 2006 02:11:42 -0000	1.27
+++ gus_isapnp.c	24 Sep 2006 19:14:24 -0000
@@ -185,6 +185,11 @@
 	if (sc->sc_playdrq != -1) {
 		sc->sc_play_maxsize = isa_dmamaxsize(sc->sc_ic,
 		    sc->sc_playdrq);
+		if (isa_drq_alloc(sc->sc_ic, sc->sc_playdrq) != 0) {
+			printf("%s: can't reserve drq %d\n",
+			    sc->sc_dev.dv_xname, sc->sc_playdrq);
+			return;
+		}
 		if (isa_dmamap_create(sc->sc_ic, sc->sc_playdrq,
 		    sc->sc_play_maxsize, BUS_DMA_NOWAIT|BUS_DMA_ALLOCNOW)) {
 			printf("%s: can't create map for drq %d\n",
@@ -195,6 +200,11 @@
 	if (sc->sc_recdrq != -1) {
 		sc->sc_rec_maxsize = isa_dmamaxsize(sc->sc_ic,
 		    sc->sc_recdrq);
+		if (isa_drq_alloc(sc->sc_ic, sc->sc_recdrq) != 0) {
+			printf("%s: can't reserve drq %d\n",
+			    sc->sc_dev.dv_xname, sc->sc_recdrq);
+			return;
+		}
 		if (isa_dmamap_create(sc->sc_ic, sc->sc_recdrq,
 		    sc->sc_rec_maxsize, BUS_DMA_NOWAIT|BUS_DMA_ALLOCNOW)) {
 			printf("%s: can't create map for drq %d\n",

--Apple-Mail-1-429677987--