Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Nov 2010 20:55:34 GMT
From:      Jason Harmening <jason.harmening@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/152378: [sound][patch] Update snd_envy24ht to be MPSAFE and use 32-bit DMA addresses
Message-ID:  <201011182055.oAIKtYe5057261@www.freebsd.org>
Resent-Message-ID: <201011182100.oAIL0Ixx097680@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         152378
>Category:       kern
>Synopsis:       [sound][patch] Update snd_envy24ht to be MPSAFE and use 32-bit DMA addresses
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 18 21:00:18 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Jason Harmening
>Release:        8.1-STABLE
>Organization:
>Environment:
FreeBSD riviera.austin.rr.com 8.1-STABLE FreeBSD 8.1-STABLE #0: Sun Nov 14 12:01:19 CST 2010     jason@riviera.austin.rr.com:/usr/obj/usr/src/sys/CUSTOM  amd64
>Description:
--Allow DMA addresses anywhere in the lower 4GB--Envy24HT has a 32-bit DMA engine, not 28-bit like Envy24
--Mark interrupt handler as MPSAFE, seems to be correctly synchronized
Testing done:
   daily usage of envy24ht-based sound card for ~1yr on machine w/ 6GB RAM
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- envy24ht.h.orig	2007-05-27 14:58:39.000000000 -0500
+++ envy24ht.h	2009-05-06 10:49:56.000000000 -0500
@@ -176,8 +176,7 @@
 #define ENVY24HT_VOL_MIN   96 /* -144db(negate) */
 #define ENVY24HT_VOL_MUTE 127 /* mute */
 
-#define BUS_SPACE_MAXADDR_ENVY24 0x0fffffff /* Address space beyond 256MB is not
- supported */
+#define BUS_SPACE_MAXADDR_ENVY24 0xffffffff
 #define BUS_SPACE_MAXSIZE_ENVY24 0x3fffc /* 64k x 4byte(1dword) */
 
 #define ENVY24HT_CCS_GPIO_HDATA 0x1E
--- envy24ht.c	2009-05-07 09:09:31.000000000 -0500
+++ envy24ht.c	2009-05-07 09:22:38.000000000 -0500
@@ -2421,7 +2421,7 @@
 	sc->irq = bus_alloc_resource(sc->dev, SYS_RES_IRQ, &sc->irqid,
 				 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
 	if (!sc->irq ||
-	    snd_setup_intr(sc->dev, sc->irq, 0, envy24ht_intr, sc, &sc->ih)) {
+	    snd_setup_intr(sc->dev, sc->irq, INTR_MPSAFE, envy24ht_intr, sc, &sc->ih)) {
 		device_printf(sc->dev, "unable to map interrupt\n");
 		return ENXIO;
 	}
@@ -2431,7 +2431,7 @@
 	    /*alignment*/4,
 	    /*boundary*/0,
 	    /*lowaddr*/BUS_SPACE_MAXADDR_ENVY24,
-	    /*highaddr*/BUS_SPACE_MAXADDR_ENVY24,
+	    /*highaddr*/BUS_SPACE_MAXADDR,
 	    /*filter*/NULL, /*filterarg*/NULL,
 	    /*maxsize*/BUS_SPACE_MAXSIZE_ENVY24,
 	    /*nsegments*/1, /*maxsegsz*/0x3ffff,


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011182055.oAIKtYe5057261>