Initialize the opl softc lock pointer to the parent's interrupt lock. Briefly tested only on wss@isapnp.diff -r1.13 -r1.14 src/sys/dev/isa/opl_wss.c
(jakllsch)
--- src/sys/dev/isa/opl_wss.c 2008/04/28 20:23:52 1.13
+++ src/sys/dev/isa/opl_wss.c 2011/12/07 17:38:50 1.14
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: opl_wss.c,v 1.13 2008/04/28 20:23:52 martin Exp $ */ | 1 | /* $NetBSD: opl_wss.c,v 1.14 2011/12/07 17:38:50 jakllsch Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1998 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1998 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Author: Lennart Augustsson | 7 | * Author: Lennart Augustsson | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright | |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -19,27 +19,27 @@ | @@ -19,27 +19,27 @@ | |||
19 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 19 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
20 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 20 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
21 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 21 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
22 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 22 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
28 | * POSSIBILITY OF SUCH DAMAGE. | 28 | * POSSIBILITY OF SUCH DAMAGE. | |
29 | */ | 29 | */ | |
30 | 30 | |||
31 | #include <sys/cdefs.h> | 31 | #include <sys/cdefs.h> | |
32 | __KERNEL_RCSID(0, "$NetBSD: opl_wss.c,v 1.13 2008/04/28 20:23:52 martin Exp $"); | 32 | __KERNEL_RCSID(0, "$NetBSD: opl_wss.c,v 1.14 2011/12/07 17:38:50 jakllsch Exp $"); | |
33 | 33 | |||
34 | #include <sys/param.h> | 34 | #include <sys/param.h> | |
35 | #include <sys/systm.h> | 35 | #include <sys/systm.h> | |
36 | #include <sys/kernel.h> | 36 | #include <sys/kernel.h> | |
37 | #include <sys/errno.h> | 37 | #include <sys/errno.h> | |
38 | #include <sys/device.h> | 38 | #include <sys/device.h> | |
39 | #include <sys/malloc.h> | 39 | #include <sys/malloc.h> | |
40 | #include <sys/proc.h> | 40 | #include <sys/proc.h> | |
41 | #include <sys/conf.h> | 41 | #include <sys/conf.h> | |
42 | #include <sys/select.h> | 42 | #include <sys/select.h> | |
43 | #include <sys/audioio.h> | 43 | #include <sys/audioio.h> | |
44 | #include <sys/midiio.h> | 44 | #include <sys/midiio.h> | |
45 | 45 | |||
@@ -71,17 +71,18 @@ opl_wss_match(device_t parent, cfdata_t | @@ -71,17 +71,18 @@ opl_wss_match(device_t parent, cfdata_t | |||
71 | return opl_match(ssc->sc_iot, ssc->sc_opl_ioh, 0); | 71 | return opl_match(ssc->sc_iot, ssc->sc_opl_ioh, 0); | |
72 | } | 72 | } | |
73 | 73 | |||
74 | void | 74 | void | |
75 | opl_wss_attach(device_t parent, device_t self, void *aux) | 75 | opl_wss_attach(device_t parent, device_t self, void *aux) | |
76 | { | 76 | { | |
77 | struct wss_softc *ssc = device_private(parent); | 77 | struct wss_softc *ssc = device_private(parent); | |
78 | struct opl_softc *sc = device_private(self); | 78 | struct opl_softc *sc = device_private(self); | |
79 | 79 | |||
80 | sc->mididev.dev = self; | 80 | sc->mididev.dev = self; | |
81 | sc->ioh = ssc->sc_opl_ioh; | 81 | sc->ioh = ssc->sc_opl_ioh; | |
82 | sc->iot = ssc->sc_iot; | 82 | sc->iot = ssc->sc_iot; | |
83 | sc->offs = 0; | 83 | sc->offs = 0; | |
84 | sc->lock = &ssc->sc_ad1848.sc_ad1848.sc_intr_lock; | |||
84 | strcpy(sc->syn.name, "WSS "); | 85 | strcpy(sc->syn.name, "WSS "); | |
85 | 86 | |||
86 | opl_attach(sc); | 87 | opl_attach(sc); | |
87 | } | 88 | } |
--- src/sys/dev/isa/opl_ym.c 2008/04/28 20:23:52 1.16
+++ src/sys/dev/isa/opl_ym.c 2011/12/07 17:38:50 1.17
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: opl_ym.c,v 1.16 2008/04/28 20:23:52 martin Exp $ */ | 1 | /* $NetBSD: opl_ym.c,v 1.17 2011/12/07 17:38:50 jakllsch Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1998 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1998 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Author: Lennart Augustsson | 7 | * Author: Lennart Augustsson | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright | |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -19,27 +19,27 @@ | @@ -19,27 +19,27 @@ | |||
19 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 19 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
20 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 20 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
21 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 21 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
22 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 22 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
28 | * POSSIBILITY OF SUCH DAMAGE. | 28 | * POSSIBILITY OF SUCH DAMAGE. | |
29 | */ | 29 | */ | |
30 | 30 | |||
31 | #include <sys/cdefs.h> | 31 | #include <sys/cdefs.h> | |
32 | __KERNEL_RCSID(0, "$NetBSD: opl_ym.c,v 1.16 2008/04/28 20:23:52 martin Exp $"); | 32 | __KERNEL_RCSID(0, "$NetBSD: opl_ym.c,v 1.17 2011/12/07 17:38:50 jakllsch Exp $"); | |
33 | 33 | |||
34 | #include "mpu_ym.h" | 34 | #include "mpu_ym.h" | |
35 | 35 | |||
36 | #include <sys/param.h> | 36 | #include <sys/param.h> | |
37 | #include <sys/systm.h> | 37 | #include <sys/systm.h> | |
38 | #include <sys/kernel.h> | 38 | #include <sys/kernel.h> | |
39 | #include <sys/errno.h> | 39 | #include <sys/errno.h> | |
40 | #include <sys/device.h> | 40 | #include <sys/device.h> | |
41 | #include <sys/malloc.h> | 41 | #include <sys/malloc.h> | |
42 | #include <sys/proc.h> | 42 | #include <sys/proc.h> | |
43 | #include <sys/conf.h> | 43 | #include <sys/conf.h> | |
44 | #include <sys/select.h> | 44 | #include <sys/select.h> | |
45 | #include <sys/audioio.h> | 45 | #include <sys/audioio.h> | |
@@ -81,26 +81,27 @@ void | @@ -81,26 +81,27 @@ void | |||
81 | opl_ym_attach(device_t parent, device_t self, void *aux) | 81 | opl_ym_attach(device_t parent, device_t self, void *aux) | |
82 | { | 82 | { | |
83 | struct ym_softc *ssc = device_private(parent); | 83 | struct ym_softc *ssc = device_private(parent); | |
84 | struct opl_softc *sc = device_private(self); | 84 | struct opl_softc *sc = device_private(self); | |
85 | 85 | |||
86 | sc->mididev.dev = self; | 86 | sc->mididev.dev = self; | |
87 | sc->ioh = ssc->sc_opl_ioh; | 87 | sc->ioh = ssc->sc_opl_ioh; | |
88 | sc->iot = ssc->sc_iot; | 88 | sc->iot = ssc->sc_iot; | |
89 | sc->offs = 0; | 89 | sc->offs = 0; | |
90 | #ifndef AUDIO_NO_POWER_CTL | 90 | #ifndef AUDIO_NO_POWER_CTL | |
91 | sc->powerctl = opl_ym_power_ctl; | 91 | sc->powerctl = opl_ym_power_ctl; | |
92 | sc->powerarg = ssc; | 92 | sc->powerarg = ssc; | |
93 | #endif | 93 | #endif | |
94 | sc->lock = &ssc->sc_ad1848.sc_ad1848.sc_intr_lock; | |||
94 | snprintf(sc->syn.name, sizeof(sc->syn.name), "%s ", | 95 | snprintf(sc->syn.name, sizeof(sc->syn.name), "%s ", | |
95 | ssc->sc_ad1848.sc_ad1848.chip_name); | 96 | ssc->sc_ad1848.sc_ad1848.chip_name); | |
96 | 97 | |||
97 | opl_attach(sc); | 98 | opl_attach(sc); | |
98 | } | 99 | } | |
99 | 100 | |||
100 | #ifndef AUDIO_NO_POWER_CTL | 101 | #ifndef AUDIO_NO_POWER_CTL | |
101 | int | 102 | int | |
102 | opl_ym_power_ctl(void *arg, int onoff) | 103 | opl_ym_power_ctl(void *arg, int onoff) | |
103 | { | 104 | { | |
104 | struct ym_softc *ssc = arg; | 105 | struct ym_softc *ssc = arg; | |
105 | 106 | |||
106 | ym_power_ctl(ssc, YM_POWER_OPL3 | YM_POWER_OPL3_DA, onoff); | 107 | ym_power_ctl(ssc, YM_POWER_OPL3 | YM_POWER_OPL3_DA, onoff); |
--- src/sys/dev/pci/opl_cmpci.c 2008/04/28 20:23:55 1.15
+++ src/sys/dev/pci/opl_cmpci.c 2011/12/07 17:38:50 1.16
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: opl_cmpci.c,v 1.15 2008/04/28 20:23:55 martin Exp $ */ | 1 | /* $NetBSD: opl_cmpci.c,v 1.16 2011/12/07 17:38:50 jakllsch Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1998 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1998 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Lennart Augustsson (augustss@NetBSD.org). | 8 | * by Lennart Augustsson (augustss@NetBSD.org). | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -20,27 +20,27 @@ | @@ -20,27 +20,27 @@ | |||
20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | __KERNEL_RCSID(0, "$NetBSD: opl_cmpci.c,v 1.15 2008/04/28 20:23:55 martin Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: opl_cmpci.c,v 1.16 2011/12/07 17:38:50 jakllsch Exp $"); | |
34 | 34 | |||
35 | #include <sys/param.h> | 35 | #include <sys/param.h> | |
36 | #include <sys/systm.h> | 36 | #include <sys/systm.h> | |
37 | #include <sys/kernel.h> | 37 | #include <sys/kernel.h> | |
38 | #include <sys/errno.h> | 38 | #include <sys/errno.h> | |
39 | #include <sys/device.h> | 39 | #include <sys/device.h> | |
40 | #include <sys/malloc.h> | 40 | #include <sys/malloc.h> | |
41 | #include <sys/proc.h> | 41 | #include <sys/proc.h> | |
42 | #include <sys/conf.h> | 42 | #include <sys/conf.h> | |
43 | #include <sys/select.h> | 43 | #include <sys/select.h> | |
44 | #include <sys/audioio.h> | 44 | #include <sys/audioio.h> | |
45 | #include <sys/midiio.h> | 45 | #include <sys/midiio.h> | |
46 | 46 | |||
@@ -67,20 +67,21 @@ opl_cmpci_match(device_t parent, cfdata_ | @@ -67,20 +67,21 @@ opl_cmpci_match(device_t parent, cfdata_ | |||
67 | return opl_match(ssc->sc_iot, ssc->sc_ioh, CMPCI_REG_FM_BASE); | 67 | return opl_match(ssc->sc_iot, ssc->sc_ioh, CMPCI_REG_FM_BASE); | |
68 | } | 68 | } | |
69 | 69 | |||
70 | static void | 70 | static void | |
71 | opl_cmpci_attach(device_t parent, device_t self, void *aux) | 71 | opl_cmpci_attach(device_t parent, device_t self, void *aux) | |
72 | { | 72 | { | |
73 | struct cmpci_softc *ssc = device_private(parent); | 73 | struct cmpci_softc *ssc = device_private(parent); | |
74 | struct opl_softc *sc = device_private(self); | 74 | struct opl_softc *sc = device_private(self); | |
75 | 75 | |||
76 | sc->mididev.dev = self; | 76 | sc->mididev.dev = self; | |
77 | sc->ioh = ssc->sc_ioh; | 77 | sc->ioh = ssc->sc_ioh; | |
78 | sc->iot = ssc->sc_iot; | 78 | sc->iot = ssc->sc_iot; | |
79 | sc->offs = CMPCI_REG_FM_BASE; | 79 | sc->offs = CMPCI_REG_FM_BASE; | |
80 | sc->lock = &ssc->sc_intr_lock; | |||
80 | strcpy(sc->syn.name, "CMPCI "); | 81 | strcpy(sc->syn.name, "CMPCI "); | |
81 | 82 | |||
82 | opl_attach(sc); | 83 | opl_attach(sc); | |
83 | } | 84 | } | |
84 | 85 | |||
85 | CFATTACH_DECL_NEW(opl_cmpci, sizeof (struct opl_softc), | 86 | CFATTACH_DECL_NEW(opl_cmpci, sizeof (struct opl_softc), | |
86 | opl_cmpci_match, opl_cmpci_attach, NULL, NULL); | 87 | opl_cmpci_match, opl_cmpci_attach, NULL, NULL); |
--- src/sys/dev/pci/opl_fms.c 2008/04/28 20:23:55 1.15
+++ src/sys/dev/pci/opl_fms.c 2011/12/07 17:38:50 1.16
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: opl_fms.c,v 1.15 2008/04/28 20:23:55 martin Exp $ */ | 1 | /* $NetBSD: opl_fms.c,v 1.16 2011/12/07 17:38:50 jakllsch Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1998 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1998 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Lennart Augustsson (augustss@NetBSD.org). | 8 | * by Lennart Augustsson (augustss@NetBSD.org). | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -20,27 +20,27 @@ | @@ -20,27 +20,27 @@ | |||
20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | __KERNEL_RCSID(0, "$NetBSD: opl_fms.c,v 1.15 2008/04/28 20:23:55 martin Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: opl_fms.c,v 1.16 2011/12/07 17:38:50 jakllsch Exp $"); | |
34 | 34 | |||
35 | #include <sys/param.h> | 35 | #include <sys/param.h> | |
36 | #include <sys/systm.h> | 36 | #include <sys/systm.h> | |
37 | #include <sys/kernel.h> | 37 | #include <sys/kernel.h> | |
38 | #include <sys/errno.h> | 38 | #include <sys/errno.h> | |
39 | #include <sys/device.h> | 39 | #include <sys/device.h> | |
40 | #include <sys/malloc.h> | 40 | #include <sys/malloc.h> | |
41 | #include <sys/proc.h> | 41 | #include <sys/proc.h> | |
42 | #include <sys/conf.h> | 42 | #include <sys/conf.h> | |
43 | #include <sys/select.h> | 43 | #include <sys/select.h> | |
44 | #include <sys/audioio.h> | 44 | #include <sys/audioio.h> | |
45 | #include <sys/midiio.h> | 45 | #include <sys/midiio.h> | |
46 | 46 | |||
@@ -67,22 +67,23 @@ opl_fms_match(device_t parent, cfdata_t | @@ -67,22 +67,23 @@ opl_fms_match(device_t parent, cfdata_t | |||
67 | return (1); | 67 | return (1); | |
68 | } | 68 | } | |
69 | 69 | |||
70 | static void | 70 | static void | |
71 | opl_fms_attach(device_t parent, device_t self, void *aux) | 71 | opl_fms_attach(device_t parent, device_t self, void *aux) | |
72 | { | 72 | { | |
73 | struct fms_softc *ssc = device_private(parent); | 73 | struct fms_softc *ssc = device_private(parent); | |
74 | struct opl_softc *sc = device_private(self); | 74 | struct opl_softc *sc = device_private(self); | |
75 | 75 | |||
76 | sc->mididev.dev = self; | 76 | sc->mididev.dev = self; | |
77 | sc->ioh = ssc->sc_opl_ioh; | 77 | sc->ioh = ssc->sc_opl_ioh; | |
78 | sc->iot = ssc->sc_iot; | 78 | sc->iot = ssc->sc_iot; | |
79 | sc->offs = 0; | 79 | sc->offs = 0; | |
80 | sc->lock = &ssc->sc_intr_lock; | |||
80 | strcpy(sc->syn.name, "FMS "); | 81 | strcpy(sc->syn.name, "FMS "); | |
81 | /*sc->spkrctl = 0; | 82 | /*sc->spkrctl = 0; | |
82 | sc->spkrarg = 0;*/ | 83 | sc->spkrarg = 0;*/ | |
83 | 84 | |||
84 | opl_attach(sc); | 85 | opl_attach(sc); | |
85 | } | 86 | } | |
86 | 87 | |||
87 | CFATTACH_DECL_NEW(opl_fms, sizeof (struct opl_softc), | 88 | CFATTACH_DECL_NEW(opl_fms, sizeof (struct opl_softc), | |
88 | opl_fms_match, opl_fms_attach, NULL, NULL); | 89 | opl_fms_match, opl_fms_attach, NULL, NULL); |
--- src/sys/dev/pci/opl_yds.c 2008/04/28 20:23:55 1.15
+++ src/sys/dev/pci/opl_yds.c 2011/12/07 17:38:50 1.16
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: opl_yds.c,v 1.15 2008/04/28 20:23:55 martin Exp $ */ | 1 | /* $NetBSD: opl_yds.c,v 1.16 2011/12/07 17:38:50 jakllsch Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1998 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1998 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Lennart Augustsson (augustss@NetBSD.org). | 8 | * by Lennart Augustsson (augustss@NetBSD.org). | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -20,27 +20,27 @@ | @@ -20,27 +20,27 @@ | |||
20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | __KERNEL_RCSID(0, "$NetBSD: opl_yds.c,v 1.15 2008/04/28 20:23:55 martin Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: opl_yds.c,v 1.16 2011/12/07 17:38:50 jakllsch Exp $"); | |
34 | 34 | |||
35 | #include <sys/param.h> | 35 | #include <sys/param.h> | |
36 | #include <sys/systm.h> | 36 | #include <sys/systm.h> | |
37 | #include <sys/kernel.h> | 37 | #include <sys/kernel.h> | |
38 | #include <sys/errno.h> | 38 | #include <sys/errno.h> | |
39 | #include <sys/device.h> | 39 | #include <sys/device.h> | |
40 | #include <sys/malloc.h> | 40 | #include <sys/malloc.h> | |
41 | #include <sys/proc.h> | 41 | #include <sys/proc.h> | |
42 | #include <sys/conf.h> | 42 | #include <sys/conf.h> | |
43 | #include <sys/select.h> | 43 | #include <sys/select.h> | |
44 | #include <sys/audioio.h> | 44 | #include <sys/audioio.h> | |
45 | #include <sys/midiio.h> | 45 | #include <sys/midiio.h> | |
46 | 46 | |||
@@ -69,20 +69,21 @@ opl_yds_match(device_t parent, cfdata_t | @@ -69,20 +69,21 @@ opl_yds_match(device_t parent, cfdata_t | |||
69 | return opl_match(ssc->sc_opl_iot, ssc->sc_opl_ioh, 0); | 69 | return opl_match(ssc->sc_opl_iot, ssc->sc_opl_ioh, 0); | |
70 | } | 70 | } | |
71 | 71 | |||
72 | static void | 72 | static void | |
73 | opl_yds_attach(device_t parent, device_t self, void *aux) | 73 | opl_yds_attach(device_t parent, device_t self, void *aux) | |
74 | { | 74 | { | |
75 | struct yds_softc *ssc = device_private(parent); | 75 | struct yds_softc *ssc = device_private(parent); | |
76 | struct opl_softc *sc = device_private(self); | 76 | struct opl_softc *sc = device_private(self); | |
77 | 77 | |||
78 | sc->mididev.dev = self; | 78 | sc->mididev.dev = self; | |
79 | sc->ioh = ssc->sc_opl_ioh; | 79 | sc->ioh = ssc->sc_opl_ioh; | |
80 | sc->iot = ssc->sc_opl_iot; | 80 | sc->iot = ssc->sc_opl_iot; | |
81 | sc->offs = 0; | 81 | sc->offs = 0; | |
82 | sc->lock = &ssc->sc_intr_lock; | |||
82 | strcpy(sc->syn.name, "DS-1 integrated "); | 83 | strcpy(sc->syn.name, "DS-1 integrated "); | |
83 | 84 | |||
84 | opl_attach(sc); | 85 | opl_attach(sc); | |
85 | } | 86 | } | |
86 | 87 | |||
87 | CFATTACH_DECL_NEW(opl_yds, sizeof (struct opl_softc), | 88 | CFATTACH_DECL_NEW(opl_yds, sizeof (struct opl_softc), | |
88 | opl_yds_match, opl_yds_attach, NULL, NULL); | 89 | opl_yds_match, opl_yds_attach, NULL, NULL); |
--- src/sys/dev/pci/opl_sv.c 2008/04/28 20:23:55 1.14
+++ src/sys/dev/pci/opl_sv.c 2011/12/07 17:38:50 1.15
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: opl_sv.c,v 1.14 2008/04/28 20:23:55 martin Exp $ */ | 1 | /* $NetBSD: opl_sv.c,v 1.15 2011/12/07 17:38:50 jakllsch Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1998 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1998 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Lennart Augustsson (augustss@NetBSD.org). | 8 | * by Lennart Augustsson (augustss@NetBSD.org). | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -20,27 +20,27 @@ | @@ -20,27 +20,27 @@ | |||
20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | __KERNEL_RCSID(0, "$NetBSD: opl_sv.c,v 1.14 2008/04/28 20:23:55 martin Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: opl_sv.c,v 1.15 2011/12/07 17:38:50 jakllsch Exp $"); | |
34 | 34 | |||
35 | #include <sys/param.h> | 35 | #include <sys/param.h> | |
36 | #include <sys/systm.h> | 36 | #include <sys/systm.h> | |
37 | #include <sys/kernel.h> | 37 | #include <sys/kernel.h> | |
38 | #include <sys/errno.h> | 38 | #include <sys/errno.h> | |
39 | #include <sys/device.h> | 39 | #include <sys/device.h> | |
40 | #include <sys/malloc.h> | 40 | #include <sys/malloc.h> | |
41 | #include <sys/proc.h> | 41 | #include <sys/proc.h> | |
42 | #include <sys/conf.h> | 42 | #include <sys/conf.h> | |
43 | #include <sys/select.h> | 43 | #include <sys/select.h> | |
44 | #include <sys/audioio.h> | 44 | #include <sys/audioio.h> | |
45 | #include <sys/midiio.h> | 45 | #include <sys/midiio.h> | |
46 | 46 | |||
@@ -66,22 +66,23 @@ opl_sv_match(device_t parent, cfdata_t m | @@ -66,22 +66,23 @@ opl_sv_match(device_t parent, cfdata_t m | |||
66 | return (1); | 66 | return (1); | |
67 | } | 67 | } | |
68 | 68 | |||
69 | static void | 69 | static void | |
70 | opl_sv_attach(device_t parent, device_t self, void *aux) | 70 | opl_sv_attach(device_t parent, device_t self, void *aux) | |
71 | { | 71 | { | |
72 | struct sv_softc *ssc = device_private(parent); | 72 | struct sv_softc *ssc = device_private(parent); | |
73 | struct opl_softc *sc = device_private(self); | 73 | struct opl_softc *sc = device_private(self); | |
74 | 74 | |||
75 | sc->mididev.dev = self; | 75 | sc->mididev.dev = self; | |
76 | sc->ioh = ssc->sc_oplioh; | 76 | sc->ioh = ssc->sc_oplioh; | |
77 | sc->iot = ssc->sc_opliot; | 77 | sc->iot = ssc->sc_opliot; | |
78 | sc->offs = 0; | 78 | sc->offs = 0; | |
79 | sc->lock = &ssc->sc_intr_lock; | |||
79 | strcpy(sc->syn.name, "SV "); | 80 | strcpy(sc->syn.name, "SV "); | |
80 | /*sc->spkrctl = 0; | 81 | /*sc->spkrctl = 0; | |
81 | sc->spkrarg = 0;*/ | 82 | sc->spkrarg = 0;*/ | |
82 | 83 | |||
83 | opl_attach(sc); | 84 | opl_attach(sc); | |
84 | } | 85 | } | |
85 | 86 | |||
86 | CFATTACH_DECL_NEW(opl_sv, sizeof (struct opl_softc), | 87 | CFATTACH_DECL_NEW(opl_sv, sizeof (struct opl_softc), | |
87 | opl_sv_match, opl_sv_attach, NULL, NULL); | 88 | opl_sv_match, opl_sv_attach, NULL, NULL); |