PERFORCE change 114897 for review

John Baldwin jhb at FreeBSD.org
Fri Feb 23 20:12:24 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=114897

Change 114897 by jhb at jhb_mutex on 2007/02/23 20:11:36

	IFC @114896.

Affected files ...

.. //depot/projects/smpng/sys/amd64/amd64/intr_machdep.c#24 integrate
.. //depot/projects/smpng/sys/dev/cnw/if_cnw.c#24 integrate
.. //depot/projects/smpng/sys/dev/ieee488/pcii.c#5 integrate
.. //depot/projects/smpng/sys/dev/ieee488/tnt4882.c#3 integrate
.. //depot/projects/smpng/sys/dev/pdq/if_fpa.c#12 integrate
.. //depot/projects/smpng/sys/dev/ppbus/ppi.c#14 integrate
.. //depot/projects/smpng/sys/dev/si/si_isa.c#8 integrate
.. //depot/projects/smpng/sys/dev/si/si_pci.c#7 integrate
.. //depot/projects/smpng/sys/dev/sound/isa/gusc.c#9 integrate
.. //depot/projects/smpng/sys/dev/sound/isa/sbc.c#17 integrate
.. //depot/projects/smpng/sys/dev/sound/pci/csa.c#17 integrate
.. //depot/projects/smpng/sys/dev/sound/pci/ds1.c#22 integrate
.. //depot/projects/smpng/sys/dev/sound/pci/emu10kx.c#5 integrate
.. //depot/projects/smpng/sys/dev/sound/pci/envy24.c#7 integrate
.. //depot/projects/smpng/sys/dev/sound/pci/envy24ht.c#5 integrate
.. //depot/projects/smpng/sys/dev/sound/pci/vibes.c#16 integrate
.. //depot/projects/smpng/sys/dev/sound/pcm/sound.c#38 integrate
.. //depot/projects/smpng/sys/dev/usb/slhci_pccard.c#3 integrate
.. //depot/projects/smpng/sys/dev/wds/wd7000.c#9 integrate
.. //depot/projects/smpng/sys/i386/i386/intr_machdep.c#24 integrate
.. //depot/projects/smpng/sys/kern/kern_linker.c#84 integrate
.. //depot/projects/smpng/sys/net/if_bridge.c#43 integrate
.. //depot/projects/smpng/sys/pci/if_mn.c#14 integrate
.. //depot/projects/smpng/sys/pci/ncr.c#24 integrate

Differences ...

==== //depot/projects/smpng/sys/amd64/amd64/intr_machdep.c#24 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/amd64/amd64/intr_machdep.c,v 1.28 2007/02/23 12:18:25 piso Exp $
+ * $FreeBSD: src/sys/amd64/amd64/intr_machdep.c,v 1.29 2007/02/23 20:03:23 jhb Exp $
  */
 
 /*
@@ -271,7 +271,7 @@
 			continue;
 		}
 		CTR4(KTR_INTR, "%s: exec %p(%p) for %s", __func__,
-		    ih->ih_handler, ih->ih_argument == NULL ? frame :
+		    ih->ih_filter, ih->ih_argument == NULL ? frame :
 		    ih->ih_argument, ih->ih_name);
 		if (ih->ih_argument == NULL)
 			ih->ih_filter(frame);

==== //depot/projects/smpng/sys/dev/cnw/if_cnw.c#24 (text+ko) ====

@@ -2,7 +2,7 @@
 
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/cnw/if_cnw.c,v 1.24 2006/11/06 13:41:52 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/cnw/if_cnw.c,v 1.25 2007/02/23 19:27:49 imp Exp $");
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -1631,7 +1631,7 @@
 		return (error);
 	}
 
-	error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET,
+	error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET, NULL,
 			       cnw_intr, sc, &sc->cnw_intrhand);
 
 	if (error) {

==== //depot/projects/smpng/sys/dev/ieee488/pcii.c#5 (text+ko) ====

@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ieee488/pcii.c,v 1.7 2006/01/14 09:46:27 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ieee488/pcii.c,v 1.8 2007/02/23 19:30:55 imp Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -149,7 +149,7 @@
 		return (error);
 
 	error = bus_setup_intr(dev, sc->res[0],
-	    INTR_TYPE_MISC | INTR_MPSAFE,
+	    INTR_TYPE_MISC | INTR_MPSAFE, NULL,
 	    upd7210intr, &sc->upd7210, &sc->intr_handler);
 	if (error) {
 		bus_release_resources(dev, pcii_res_spec, sc->res);

==== //depot/projects/smpng/sys/dev/ieee488/tnt4882.c#3 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/ieee488/tnt4882.c,v 1.2 2005/09/24 20:44:55 phk Exp $
+ * $FreeBSD: src/sys/dev/ieee488/tnt4882.c,v 1.3 2007/02/23 19:30:55 imp Exp $
  */
 
 #include <sys/param.h>
@@ -284,7 +284,7 @@
 		return (error);
 
 	error = bus_setup_intr(dev, sc->res[2], INTR_TYPE_MISC | INTR_MPSAFE,
-	    upd7210intr, &sc->upd7210, &sc->intr_handler);
+	    NULL, upd7210intr, &sc->upd7210, &sc->intr_handler);
 
 	/* Necessary magic for MITE */
 	bus_write_4(sc->res[0], 0xc0, rman_get_start(sc->res[1]) | 0x80);

==== //depot/projects/smpng/sys/dev/pdq/if_fpa.c#12 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/pdq/if_fpa.c,v 1.26 2005/11/11 07:36:13 ru Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/pdq/if_fpa.c,v 1.27 2007/02/23 19:31:44 imp Exp $");
 
 /*
  * DEC PDQ FDDI Controller; code for BSD derived operating systems
@@ -157,7 +157,7 @@
 	goto bad;
     }
 
-    error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET,
+    error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET, NULL,
 			   pdq_pci_ifintr, dev, &sc->irq_ih);
     if (error) {
 	device_printf(dev, "Failed to setup interrupt handler.\n");

==== //depot/projects/smpng/sys/dev/ppbus/ppi.c#14 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ppbus/ppi.c,v 1.40 2006/02/22 18:16:25 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ppbus/ppi.c,v 1.41 2007/02/23 19:32:21 imp Exp $");
 #include "opt_ppb_1284.h"
 
 #include <sys/param.h>
@@ -276,8 +276,9 @@
 #ifdef PERIPH_1284
 		if (ppi->intr_resource) {
 			/* register our interrupt handler */
-			bus_setup_intr(ppidev, ppi->intr_resource,
-				       INTR_TYPE_TTY, ppiintr, dev, &ppi->intr_cookie);
+			bus_setup_intr(ppidev, ppi->intr_resource, 
+				       INTR_TYPE_TTY, NULL, ppiintr, dev,
+				       &ppi->intr_cookie);
 		}
 #endif /* PERIPH_1284 */
 	}

==== //depot/projects/smpng/sys/dev/si/si_isa.c#8 (text+ko) ====

@@ -20,7 +20,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/si/si_isa.c,v 1.7 2005/01/06 01:43:14 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/si/si_isa.c,v 1.8 2007/02/23 19:33:07 imp Exp $");
 
 #include "opt_debug_si.h"
 
@@ -292,7 +292,7 @@
 	}
 	sc->sc_irq = rman_get_start(sc->sc_irq_res);
 	error = bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_TTY,
-			       si_intr, sc,&ih);
+			       NULL, si_intr, sc, &ih);
 	if (error) {
 		device_printf(dev, "couldn't activate interrupt\n");
 		goto fail;

==== //depot/projects/smpng/sys/dev/si/si_pci.c#7 (text+ko) ====

@@ -19,7 +19,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/si/si_pci.c,v 1.8 2005/11/08 04:11:50 rodrigc Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/si/si_pci.c,v 1.9 2007/02/23 19:33:07 imp Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -99,7 +99,7 @@
 	}
 	sc->sc_irq = rman_get_start(sc->sc_irq_res);
 	error = bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_TTY,
-			       si_intr, sc, &ih);
+			       NULL, si_intr, sc, &ih);
 	if (error) {
 		device_printf(dev, "could not activate interrupt\n");
 		goto fail;

==== //depot/projects/smpng/sys/dev/sound/isa/gusc.c#9 (text+ko) ====

@@ -42,7 +42,7 @@
 #include <isa/isavar.h>
 #include <isa/isa_common.h>
 
-SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/isa/gusc.c,v 1.18 2007/02/23 12:18:54 piso Exp $");
+SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/isa/gusc.c,v 1.19 2007/02/23 19:40:13 ariff Exp $");
 
 #define LOGICALID_NOPNP 0
 #define LOGICALID_PCM   0x0000561e
@@ -316,7 +316,7 @@
 	}
 
 	if (scp->irq != NULL)
-		bus_setup_intr(dev, scp->irq, INTR_TYPE_AV, NULL, gusc_intr, scp, &ih);
+		snd_setup_intr(dev, scp->irq, 0, gusc_intr, scp, &ih);
 	bus_generic_attach(dev);
 
 	return (0);
@@ -418,16 +418,21 @@
 }
 
 static int
-gusc_setup_intr(device_t dev, device_t child, struct resource *irq,
-		int flags, driver_filter_t *filter, driver_intr_t *intr, void *arg, void **cookiep)
+gusc_setup_intr(device_t dev, device_t child, struct resource *irq, int flags,
+#if __FreeBSD_version >= 700031
+		driver_filter_t *filter,
+#endif
+		driver_intr_t *intr, void *arg, void **cookiep)
 {
 	sc_p scp = (sc_p)device_get_softc(dev);
 	devclass_t devclass;
 
+#if __FreeBSD_version >= 700031
 	if (filter != NULL) {
 		printf("gusc.c: we cannot use a filter here\n");
 		return (EINVAL);
 	}
+#endif
 	devclass = device_get_devclass(child);
 	if (strcmp(devclass_get_name(devclass), "midi") == 0) {
 		scp->midi_intr.intr = intr;
@@ -438,8 +443,11 @@
 		scp->pcm_intr.arg = arg;
 		return 0;
 	}
-	return bus_generic_setup_intr(dev, child, irq, flags, filter, intr,
-				      arg, cookiep);
+	return bus_generic_setup_intr(dev, child, irq, flags,
+#if __FreeBSD_version >= 700031
+				filter,
+#endif
+				intr, arg, cookiep);
 }
 
 static device_t

==== //depot/projects/smpng/sys/dev/sound/isa/sbc.c#17 (text+ko) ====

@@ -30,7 +30,7 @@
 
 #include <isa/isavar.h>
 
-SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/isa/sbc.c,v 1.46 2007/02/23 12:18:54 piso Exp $");
+SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/isa/sbc.c,v 1.47 2007/02/23 19:40:13 ariff Exp $");
 
 #define IO_MAX	3
 #define IRQ_MAX	1
@@ -80,7 +80,11 @@
 static int sbc_release_resource(device_t bus, device_t child, int type, int rid,
 				struct resource *r);
 static int sbc_setup_intr(device_t dev, device_t child, struct resource *irq,
-   	       int flags, driver_filter_t *filter, driver_intr_t *intr, 
+   	       int flags,
+#if __FreeBSD_version >= 700031
+	       driver_filter_t *filter,
+#endif
+	       driver_intr_t *intr, 
    	       void *arg, void **cookiep);
 static int sbc_teardown_intr(device_t dev, device_t child, struct resource *irq,
   		  void *cookie);
@@ -502,18 +506,23 @@
 }
 
 static int
-sbc_setup_intr(device_t dev, device_t child, struct resource *irq,
-   	       int flags, driver_filter_t *filter, driver_intr_t *intr, 
+sbc_setup_intr(device_t dev, device_t child, struct resource *irq, int flags,
+#if __FreeBSD_version >= 700031
+   	       driver_filter_t *filter,
+#endif
+	       driver_intr_t *intr, 
    	       void *arg, void **cookiep)
 {
 	struct sbc_softc *scp = device_get_softc(dev);
 	struct sbc_ihl *ihl = NULL;
 	int i, ret;
 
+#if __FreeBSD_version >= 700031
 	if (filter != NULL) {
 		printf("sbc.c: we cannot use a filter here\n");
 		return (EINVAL);
 	}
+#endif
 	sbc_lock(scp);
 	i = 0;
 	while (i < IRQ_MAX) {

==== //depot/projects/smpng/sys/dev/sound/pci/csa.c#17 (text+ko) ====

@@ -48,7 +48,7 @@
 
 #include <gnu/dev/sound/pci/csaimg.h>
 
-SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/csa.c,v 1.35 2007/02/23 12:18:54 piso Exp $");
+SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/csa.c,v 1.36 2007/02/23 19:40:13 ariff Exp $");
 
 /* This is the pci device id. */
 #define CS4610_PCI_ID 0x60011013
@@ -82,8 +82,10 @@
 				   struct resource *r);
 static int csa_setup_intr(device_t bus, device_t child,
 			  struct resource *irq, int flags,
-			  driver_filter_t *filter, driver_intr_t *intr, 
-			  void *arg, void **cookiep);
+#if __FreeBSD_version >= 700031
+			  driver_filter_t *filter,
+#endif
+			  driver_intr_t *intr,  void *arg, void **cookiep);
 static int csa_teardown_intr(device_t bus, device_t child,
 			     struct resource *irq, void *cookie);
 static driver_intr_t csa_intr;
@@ -440,17 +442,21 @@
 static int
 csa_setup_intr(device_t bus, device_t child,
 	       struct resource *irq, int flags,
-	       driver_filter_t *filter, driver_intr_t *intr, void *arg, 
-	       void **cookiep)
+#if __FreeBSD_version >= 700031
+	       driver_filter_t *filter,
+#endif
+	       driver_intr_t *intr, void *arg, void **cookiep)
 {
 	sc_p scp;
 	csa_res *resp;
 	struct sndcard_func *func;
 
+#if __FreeBSD_version >= 700031
 	if (filter != NULL) {
 		printf("ata-csa.c: we cannot use a filter here\n");
 		return (EINVAL);
 	}
+#endif
 	scp = device_get_softc(bus);
 	resp = &scp->res;
 

==== //depot/projects/smpng/sys/dev/sound/pci/ds1.c#22 (text+ko) ====

@@ -33,7 +33,7 @@
 #include <dev/sound/pci/ds1.h>
 #include <dev/sound/pci/ds1-fw.h>
 
-SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/ds1.c,v 1.46 2007/02/23 13:47:34 netchild Exp $");
+SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/ds1.c,v 1.47 2007/02/23 19:41:16 ariff Exp $");
 
 /* -------------------------------------------------------------------- */
 
@@ -157,7 +157,7 @@
  */
 
 /* stuff */
-static int       ds_init(struct sc_info *, device_t);
+static int       ds_init(struct sc_info *);
 static void      ds_intr(void *);
 
 /* talk to the card */
@@ -785,7 +785,7 @@
 }
 
 static int
-ds_init(struct sc_info *sc, device_t dev)
+ds_init(struct sc_info *sc)
 {
 	int i;
 	u_int32_t *ci, r, pcs, rcs, ecs, ws, memsz, cb;
@@ -833,7 +833,7 @@
 	memsz += (64 + 1) * 4;
 
 	if (sc->regbase == NULL) {
-		if (bus_dma_tag_create(bus_get_dma_tag(dev), 2, 0,
+		if (bus_dma_tag_create(bus_get_dma_tag(sc->dev), 2, 0,
 				       BUS_SPACE_MAXADDR_32BIT,
 				       BUS_SPACE_MAXADDR,
 				       NULL, NULL, memsz, 1, memsz, 0, NULL,
@@ -985,7 +985,7 @@
 	}
 
 	sc->regbase = NULL;
-	if (ds_init(sc, dev) == -1) {
+	if (ds_init(sc) == -1) {
 		device_printf(dev, "unable to initialize the card\n");
 		goto bad;
 	}
@@ -1053,7 +1053,7 @@
 
        sc = pcm_getdevinfo(dev);
 
-       if (ds_init(sc, dev) == -1) {
+       if (ds_init(sc) == -1) {
            device_printf(dev, "unable to reinitialize the card\n");
            return ENXIO;
        }

==== //depot/projects/smpng/sys/dev/sound/pci/emu10kx.c#5 (text+ko) ====

@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/sound/pci/emu10kx.c,v 1.8 2007/02/23 13:47:34 netchild Exp $
+ * $FreeBSD: src/sys/dev/sound/pci/emu10kx.c,v 1.9 2007/02/23 19:41:16 ariff Exp $
  */
 
 #include <sys/param.h>
@@ -385,7 +385,7 @@
 static void	emu_initefx(struct emu_sc_info *sc);
 
 static int	emu_cardbus_init(struct emu_sc_info *sc);
-static int	emu_init(struct emu_sc_info *sc, device_t dev);
+static int	emu_init(struct emu_sc_info *sc);
 static int	emu_uninit(struct emu_sc_info *sc);
 
 static int	emu_read_ivar(device_t bus __unused, device_t dev, int ivar_index, uintptr_t * result);
@@ -2338,7 +2338,7 @@
 
 /* Probe and attach the card */
 static int
-emu_init(struct emu_sc_info *sc, device_t dev)
+emu_init(struct emu_sc_info *sc)
 {
 	uint32_t ch, tmp;
 	uint32_t spdif_sr;
@@ -2385,7 +2385,7 @@
 		emu_wrptr(sc, 0, SPBYPASS, 0xf00);	/* What will happen if
 							 * we write 1 here? */
 
-	if (bus_dma_tag_create( /* parent */ bus_get_dma_tag(dev),
+	if (bus_dma_tag_create( /* parent */ bus_get_dma_tag(sc->dev),
 	     /* alignment */ 2, /* boundary */ 0,
 	     /* lowaddr */ 1 << 31,	/* can only access 0-2gb */
 	     /* highaddr */ BUS_SPACE_MAXADDR,
@@ -2835,7 +2835,7 @@
 
 	i = 0;
 	sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &i, RF_ACTIVE | RF_SHAREABLE);
-	if ((sc->irq == NULL) || bus_setup_intr(dev, sc->irq, INTR_MPSAFE | INTR_TYPE_AV, NULL, emu_intr, sc, &sc->ih)) {
+	if ((sc->irq == NULL) || snd_setup_intr(dev, sc->irq, INTR_MPSAFE, emu_intr, sc, &sc->ih)) {
 		device_printf(dev, "unable to map interrupt\n");
 		goto bad;
 	}
@@ -2854,7 +2854,7 @@
 	sc->root = device_get_sysctl_tree(dev);
 	if (sc->root == NULL)
 		goto bad;
-	if (emu_init(sc, dev) == -1) {
+	if (emu_init(sc) == -1) {
 		device_printf(dev, "unable to initialize the card\n");
 		goto bad;
 	}

==== //depot/projects/smpng/sys/dev/sound/pci/envy24.c#7 (text+ko) ====

@@ -35,7 +35,7 @@
 
 #include "mixer_if.h"
 
-SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/envy24.c,v 1.7 2007/02/23 13:47:34 netchild Exp $");
+SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/envy24.c,v 1.8 2007/02/23 19:41:16 ariff Exp $");
 
 MALLOC_DEFINE(M_ENVY24, "envy24", "envy24 audio");
 
@@ -2301,7 +2301,7 @@
 }
 
 static int
-envy24_alloc_resource(struct sc_info *sc, device_t dev)
+envy24_alloc_resource(struct sc_info *sc)
 {
 	/* allocate I/O port resource */
 	sc->csid = PCIR_CCS;
@@ -2348,7 +2348,8 @@
 	}
 
 	/* allocate DMA resource */
-	if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(dev), /*alignment*/4,
+	if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(sc->dev),
+	    /*alignment*/4,
 	    /*boundary*/0,
 	    /*lowaddr*/BUS_SPACE_MAXADDR_ENVY24,
 	    /*highaddr*/BUS_SPACE_MAXADDR_ENVY24,
@@ -2395,7 +2396,7 @@
 	data = pci_read_config(dev, PCIR_COMMAND, 2);
 
 	/* allocate resources */
-	err = envy24_alloc_resource(sc, dev);
+	err = envy24_alloc_resource(sc);
 	if (err) {
 		device_printf(dev, "unable to allocate system resources\n");
 		goto bad;

==== //depot/projects/smpng/sys/dev/sound/pci/envy24ht.c#5 (text+ko) ====

@@ -36,7 +36,7 @@
 
 #include "mixer_if.h"
 
-SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/envy24ht.c,v 1.8 2007/02/23 13:47:34 netchild Exp $");
+SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/envy24ht.c,v 1.9 2007/02/23 19:41:16 ariff Exp $");
 
 MALLOC_DEFINE(M_ENVY24HT, "envy24ht", "envy24ht audio");
 
@@ -2332,7 +2332,7 @@
 }
 
 static int
-envy24ht_alloc_resource(struct sc_info *sc, device_t dev)
+envy24ht_alloc_resource(struct sc_info *sc)
 {
 	/* allocate I/O port resource */
 	sc->csid = PCIR_CCS;
@@ -2367,7 +2367,8 @@
 	}
 
 	/* allocate DMA resource */
-	if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(dev), /*alignment*/4,
+	if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(sc->dev),
+	    /*alignment*/4,
 	    /*boundary*/0,
 	    /*lowaddr*/BUS_SPACE_MAXADDR_ENVY24,
 	    /*highaddr*/BUS_SPACE_MAXADDR_ENVY24,
@@ -2414,7 +2415,7 @@
 	data = pci_read_config(dev, PCIR_COMMAND, 2);
 
 	/* allocate resources */
-	err = envy24ht_alloc_resource(sc, dev);
+	err = envy24ht_alloc_resource(sc);
 	if (err) {
 		device_printf(dev, "unable to allocate system resources\n");
 		goto bad;

==== //depot/projects/smpng/sys/dev/sound/pci/vibes.c#16 (text+ko) ====

@@ -36,7 +36,7 @@
 
 #include "mixer_if.h"
 
-SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/vibes.c,v 1.22 2007/02/23 13:47:34 netchild Exp $");
+SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/vibes.c,v 1.23 2007/02/23 19:39:06 ariff Exp $");
 
 /* ------------------------------------------------------------------------- */
 /* Constants */
@@ -762,7 +762,7 @@
         sc->irq   = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->irqid,
 				       0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
         if (!sc->irq ||
-	    bus_setup_intr(dev, sc->irq, INTR_TYPE_AV, NULL, sv_intr, sc, &sc->ih)) {
+	    snd_setup_intr(dev, sc->irq, 0, sv_intr, sc, &sc->ih)) {
                 device_printf(dev, "sv_attach: Unable to map interrupt\n");
                 goto fail;
         }

==== //depot/projects/smpng/sys/dev/sound/pcm/sound.c#38 (text+ko) ====

@@ -34,7 +34,7 @@
 
 #include "feeder_if.h"
 
-SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pcm/sound.c,v 1.109 2007/02/23 12:18:55 piso Exp $");
+SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pcm/sound.c,v 1.110 2007/02/23 19:40:13 ariff Exp $");
 
 devclass_t pcm_devclass;
 
@@ -129,7 +129,11 @@
 #else
 	flags = INTR_TYPE_AV;
 #endif
-	return bus_setup_intr(dev, res, flags, NULL, hand, param, cookiep);
+	return bus_setup_intr(dev, res, flags,
+#if __FreeBSD_version >= 700031
+			NULL,
+#endif
+			hand, param, cookiep);
 }
 
 #ifndef	PCM_DEBUG_MTX

==== //depot/projects/smpng/sys/dev/usb/slhci_pccard.c#3 (text+ko) ====

@@ -50,7 +50,7 @@
 #include <dev/usb/sl811hsvar.h>
 #include "pccarddevs.h"
 
-__FBSDID("$FreeBSD: src/sys/dev/usb/slhci_pccard.c,v 1.2 2005/09/22 05:06:37 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/slhci_pccard.c,v 1.3 2007/02/23 19:34:26 imp Exp $");
 
 static void	slhci_pccard_intr(void *arg);
 
@@ -130,7 +130,7 @@
 		device_printf(dev, "Could not add USB device\n");
 	}
 	device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus);
-	error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_BIO, slhci_pccard_intr, sc, &sc->ih);
+	error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_BIO, NULL, slhci_pccard_intr, sc, &sc->ih);
 	if (error)
 		goto out;
 #if 1

==== //depot/projects/smpng/sys/dev/wds/wd7000.c#9 (text+ko) ====

@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/wds/wd7000.c,v 1.11 2006/12/11 18:28:31 mjacob Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/wds/wd7000.c,v 1.12 2007/02/23 19:34:52 imp Exp $");
 
 /* All bugs are subject to removal without further notice */
 
@@ -542,7 +542,7 @@
 	if (wp->intr_r == NULL)
 		goto bad;
 	error = bus_setup_intr(dev, wp->intr_r, INTR_TYPE_CAM | INTR_ENTROPY,
-			       (driver_intr_t *)wds_intr, (void *)wp,
+			       NULL, (driver_intr_t *)wds_intr, (void *)wp,
 			       &wp->intr_cookie);
 	if (error)
 		goto bad;

==== //depot/projects/smpng/sys/i386/i386/intr_machdep.c#24 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/i386/i386/intr_machdep.c,v 1.23 2007/02/23 12:18:59 piso Exp $
+ * $FreeBSD: src/sys/i386/i386/intr_machdep.c,v 1.24 2007/02/23 20:03:24 jhb Exp $
  */
 
 /*
@@ -262,12 +262,12 @@
 			continue;
 		}
 		CTR4(KTR_INTR, "%s: exec %p(%p) for %s", __func__,
-		    ih->ih_handler, ih->ih_argument == NULL ? frame :
+		    ih->ih_filter, ih->ih_argument == NULL ? frame :
 		    ih->ih_argument, ih->ih_name);
 		if (ih->ih_argument == NULL)
 			ih->ih_filter(frame);
 		else
-			ih->ih_handler(ih->ih_argument);
+			ih->ih_filter(ih->ih_argument);
 	}
 
 	/*

==== //depot/projects/smpng/sys/kern/kern_linker.c#84 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_linker.c,v 1.144 2006/11/06 13:42:00 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_linker.c,v 1.145 2007/02/23 19:46:59 jhb Exp $");
 
 #include "opt_ddb.h"
 #include "opt_hwpmc_hooks.h"
@@ -403,8 +403,10 @@
 				linker_file_unload(lf, LINKER_UNLOAD_FORCE);
 				return (error);
 			}
+			KLD_UNLOCK();
 			linker_file_register_sysctls(lf);
 			linker_file_sysinit(lf);
+			KLD_LOCK();
 			lf->flags |= LINKER_FILE_LINKED;
 			*result = lf;
 			return (0);
@@ -502,7 +504,7 @@
 
 	KLD_LOCK_ASSERT();
 	TAILQ_FOREACH(lf, &linker_files, link)
-		if (lf->id == fileid)
+		if (lf->id == fileid && lf->flags & LINKER_FILE_LINKED)
 			break;
 	return (lf);
 }
@@ -1033,21 +1035,25 @@
 #endif
 
 	KLD_LOCK();
-	if (uap->fileid == 0) {
-		if (TAILQ_FIRST(&linker_files))
-			td->td_retval[0] = TAILQ_FIRST(&linker_files)->id;
-		else
-			td->td_retval[0] = 0;
-		goto out;
+	if (uap->fileid == 0)
+		lf = TAILQ_FIRST(&linker_files);
+	else {
+		lf = linker_find_file_by_id(uap->fileid);
+		if (lf == NULL) {
+			error = ENOENT;
+			goto out;
+		}
+		lf = TAILQ_NEXT(lf, link);
 	}
-	lf = linker_find_file_by_id(uap->fileid);
-	if (lf) {
-		if (TAILQ_NEXT(lf, link))
-			td->td_retval[0] = TAILQ_NEXT(lf, link)->id;
-		else
-			td->td_retval[0] = 0;
-	} else
-		error = ENOENT;
+
+	/* Skip partially loaded files. */
+	while (lf != NULL && !(lf->flags & LINKER_FILE_LINKED))
+		lf = TAILQ_NEXT(lf, link);
+
+	if (lf)
+		td->td_retval[0] = lf->id;
+	else
+		td->td_retval[0] = 0;
 out:
 	KLD_UNLOCK();
 	return (error);

==== //depot/projects/smpng/sys/net/if_bridge.c#43 (text+ko) ====

@@ -80,7 +80,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net/if_bridge.c,v 1.92 2006/12/11 23:46:40 thompsa Exp $");
+__FBSDID("$FreeBSD: src/sys/net/if_bridge.c,v 1.93 2007/02/23 19:37:55 thompsa Exp $");
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -532,13 +532,13 @@
 	int retry;
 
 	sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK|M_ZERO);
-	BRIDGE_LOCK_INIT(sc);
 	ifp = sc->sc_ifp = if_alloc(IFT_ETHER);
 	if (ifp == NULL) {
 		free(sc, M_DEVBUF);
 		return (ENOSPC);
 	}
 
+	BRIDGE_LOCK_INIT(sc);
 	sc->sc_brtmax = BRIDGE_RTABLE_MAX;
 	sc->sc_brttimeout = BRIDGE_RTABLE_TIMEOUT;
 

==== //depot/projects/smpng/sys/pci/if_mn.c#14 (text+ko) ====

@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/pci/if_mn.c,v 1.48 2005/06/10 16:49:22 brooks Exp $");
+__FBSDID("$FreeBSD: src/sys/pci/if_mn.c,v 1.49 2007/02/23 19:41:34 imp Exp $");
 
 /*
  * Stuff to describe the MUNIC32X and FALC54 chips.
@@ -1377,7 +1377,7 @@
 		return(ENXIO);
 	}
 
-	error = bus_setup_intr(self, sc->irq, INTR_TYPE_NET, mn_intr, sc, &sc->intrhand);
+	error = bus_setup_intr(self, sc->irq, INTR_TYPE_NET, NULL, mn_intr, sc, &sc->intrhand);
 
 	if (error) {
 		printf("couldn't set up irq\n");

==== //depot/projects/smpng/sys/pci/ncr.c#24 (text+ko) ====

@@ -40,7 +40,7 @@
 */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/pci/ncr.c,v 1.192 2006/11/02 00:54:38 mjacob Exp $");
+__FBSDID("$FreeBSD: src/sys/pci/ncr.c,v 1.193 2007/02/23 19:41:34 imp Exp $");
 
 
 #define NCR_DATE "pl30 98/1/1"
@@ -3764,7 +3764,7 @@
 			      "interruptless mode: reduced performance.\n");
 	} else {
 		bus_setup_intr(dev, np->irq_res, INTR_TYPE_CAM | INTR_ENTROPY,
-			       ncr_intr, np, &np->irq_handle);
+			       NULL, ncr_intr, np, &np->irq_handle);
 	}
 
 	/*


More information about the p4-projects mailing list