Date: Fri, 23 Feb 2007 22:55:02 GMT From: Alexander Leidinger <netchild@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 114920 for review Message-ID: <200702232255.l1NMt2vl026522@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=114920 Change 114920 by netchild@netchild_magellan on 2007/02/23 22:54:40 IFC after Ariffs sound changes. Affected files ... .. //depot/projects/soundsystem/src/sys/dev/sound/isa/gusc.c#3 integrate .. //depot/projects/soundsystem/src/sys/dev/sound/isa/sbc.c#3 integrate .. //depot/projects/soundsystem/src/sys/dev/sound/pci/csa.c#3 integrate .. //depot/projects/soundsystem/src/sys/dev/sound/pci/ds1.c#4 integrate .. //depot/projects/soundsystem/src/sys/dev/sound/pci/emu10kx.c#4 integrate .. //depot/projects/soundsystem/src/sys/dev/sound/pci/envy24.c#4 integrate .. //depot/projects/soundsystem/src/sys/dev/sound/pci/envy24ht.c#4 integrate .. //depot/projects/soundsystem/src/sys/dev/sound/pci/vibes.c#4 integrate .. //depot/projects/soundsystem/src/sys/dev/sound/pcm/sound.c#3 integrate Differences ... ==== //depot/projects/soundsystem/src/sys/dev/sound/isa/gusc.c#3 (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/soundsystem/src/sys/dev/sound/isa/sbc.c#3 (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/soundsystem/src/sys/dev/sound/pci/csa.c#3 (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/soundsystem/src/sys/dev/sound/pci/ds1.c#4 (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/soundsystem/src/sys/dev/sound/pci/emu10kx.c#4 (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/soundsystem/src/sys/dev/sound/pci/envy24.c#4 (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/soundsystem/src/sys/dev/sound/pci/envy24ht.c#4 (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/soundsystem/src/sys/dev/sound/pci/vibes.c#4 (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/soundsystem/src/sys/dev/sound/pcm/sound.c#3 (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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702232255.l1NMt2vl026522>