Pull up following revision(s) (requested by martin in ticket #896): sys/dev/ic/iavc.c: revision 1.10 sys/netisdn/i4b_capi_llif.c: revision 1.6 sys/netisdn/i4b_capi.h: revision 1.6 Fix signature of capi_ll_control. From Wolfgang Stukenbrock in PR kern/47863.diff -r1.8 -r1.8.20.1 src/sys/dev/ic/iavc.c
(msaitoh)
--- src/sys/dev/ic/Attic/iavc.c 2009/01/23 19:49:16 1.8
+++ src/sys/dev/ic/Attic/iavc.c 2013/06/13 07:22:44 1.8.20.1
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: iavc.c,v 1.8 2009/01/23 19:49:16 christos Exp $ */ | 1 | /* $NetBSD: iavc.c,v 1.8.20.1 2013/06/13 07:22:44 msaitoh Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2001-2003 Cubical Solutions Ltd. All rights reserved. | 4 | * Copyright (c) 2001-2003 Cubical Solutions Ltd. All rights reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * | 14 | * | |
@@ -20,27 +20,27 @@ | @@ -20,27 +20,27 @@ | |||
20 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 20 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
21 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 21 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
22 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 22 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
23 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 23 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
24 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 24 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
25 | * SUCH DAMAGE. | 25 | * SUCH DAMAGE. | |
26 | * | 26 | * | |
27 | * The AVM ISDN controllers' card specific support routines. | 27 | * The AVM ISDN controllers' card specific support routines. | |
28 | * | 28 | * | |
29 | * $FreeBSD: src/sys/i4b/capi/iavc/iavc_card.c,v 1.1.2.1 2001/08/10 14:08:34 obrien Exp $ | 29 | * $FreeBSD: src/sys/i4b/capi/iavc/iavc_card.c,v 1.1.2.1 2001/08/10 14:08:34 obrien Exp $ | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | __KERNEL_RCSID(0, "$NetBSD: iavc.c,v 1.8 2009/01/23 19:49:16 christos Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: iavc.c,v 1.8.20.1 2013/06/13 07:22:44 msaitoh Exp $"); | |
34 | 34 | |||
35 | #include <sys/param.h> | 35 | #include <sys/param.h> | |
36 | #include <sys/kernel.h> | 36 | #include <sys/kernel.h> | |
37 | #include <sys/systm.h> | 37 | #include <sys/systm.h> | |
38 | #include <sys/mbuf.h> | 38 | #include <sys/mbuf.h> | |
39 | #include <sys/socket.h> | 39 | #include <sys/socket.h> | |
40 | #include <sys/device.h> | 40 | #include <sys/device.h> | |
41 | #include <sys/callout.h> | 41 | #include <sys/callout.h> | |
42 | #include <sys/reboot.h> | 42 | #include <sys/reboot.h> | |
43 | #include <net/if.h> | 43 | #include <net/if.h> | |
44 | 44 | |||
45 | #include <sys/bus.h> | 45 | #include <sys/bus.h> | |
46 | 46 | |||
@@ -611,27 +611,27 @@ static int iavc_receive_init(iavc_softc_ | @@ -611,27 +611,27 @@ static int iavc_receive_init(iavc_softc_ | |||
611 | caps = (p + 1); | 611 | caps = (p + 1); | |
612 | p += (*p + 1); /* supported options */ | 612 | p += (*p + 1); /* supported options */ | |
613 | prot = (p + 1); | 613 | prot = (p + 1); | |
614 | p += (*p + 1); /* supported protocols */ | 614 | p += (*p + 1); /* supported protocols */ | |
615 | profile = (p + 1); | 615 | profile = (p + 1); | |
616 | 616 | |||
617 | if (cardtype && serial && profile) { | 617 | if (cardtype && serial && profile) { | |
618 | int nbch = ((profile[3]<<8) | profile[2]); | 618 | int nbch = ((profile[3]<<8) | profile[2]); | |
619 | 619 | |||
620 | aprint_normal_dev(&sc->sc_dev, "AVM %s, s/n %s, %d chans, f/w rev %s, prot %s\n", | 620 | aprint_normal_dev(&sc->sc_dev, "AVM %s, s/n %s, %d chans, f/w rev %s, prot %s\n", | |
621 | cardtype, serial, nbch, vers, prot); | 621 | cardtype, serial, nbch, vers, prot); | |
622 | aprint_verbose_dev(&sc->sc_dev, "%s\n", caps); | 622 | aprint_verbose_dev(&sc->sc_dev, "%s\n", caps); | |
623 | 623 | |||
624 | capi_ll_control(&sc->sc_capi, CAPI_CTRL_PROFILE, (int) profile); | 624 | capi_ll_control(&sc->sc_capi, CAPI_CTRL_PROFILE, (intptr_t) profile); | |
625 | 625 | |||
626 | } else { | 626 | } else { | |
627 | printf("%s: no profile data in info response?\n", device_xname(&sc->sc_dev)); | 627 | printf("%s: no profile data in info response?\n", device_xname(&sc->sc_dev)); | |
628 | } | 628 | } | |
629 | 629 | |||
630 | sc->sc_blocked = 1; /* controller will send START when ready */ | 630 | sc->sc_blocked = 1; /* controller will send START when ready */ | |
631 | return 0; | 631 | return 0; | |
632 | } | 632 | } | |
633 | 633 | |||
634 | static int iavc_receive_start(iavc_softc_t *sc) | 634 | static int iavc_receive_start(iavc_softc_t *sc) | |
635 | { | 635 | { | |
636 | struct mbuf *m = i4b_Dgetmbuf(3); | 636 | struct mbuf *m = i4b_Dgetmbuf(3); | |
637 | u_int8_t *p; | 637 | u_int8_t *p; |
--- src/sys/netisdn/Attic/i4b_capi.h 2006/10/16 13:03:03 1.5
+++ src/sys/netisdn/Attic/i4b_capi.h 2013/06/13 07:22:44 1.5.94.1
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: i4b_capi.h,v 1.5 2006/10/16 13:03:03 pooka Exp $ */ | 1 | /* $NetBSD: i4b_capi.h,v 1.5.94.1 2013/06/13 07:22:44 msaitoh Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2001-2003 Cubical Solutions Ltd. All rights reserved. | 4 | * Copyright (c) 2001-2003 Cubical Solutions Ltd. All rights reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * | 14 | * | |
@@ -109,26 +109,26 @@ typedef struct capi_softc { | @@ -109,26 +109,26 @@ typedef struct capi_softc { | |||
109 | 109 | |||
110 | #define CARD_TYPEC_CAPI_UNK 0 | 110 | #define CARD_TYPEC_CAPI_UNK 0 | |
111 | #define CARD_TYPEC_AVM_T1_PCI 1 | 111 | #define CARD_TYPEC_AVM_T1_PCI 1 | |
112 | #define CARD_TYPEC_AVM_B1_PCI 2 | 112 | #define CARD_TYPEC_AVM_B1_PCI 2 | |
113 | #define CARD_TYPEC_AVM_B1_ISA 3 | 113 | #define CARD_TYPEC_AVM_B1_ISA 3 | |
114 | 114 | |||
115 | /* | 115 | /* | |
116 | // CAPI upcalls for the link layer. | 116 | // CAPI upcalls for the link layer. | |
117 | */ | 117 | */ | |
118 | 118 | |||
119 | #define I4BCAPI_APPLID 1 | 119 | #define I4BCAPI_APPLID 1 | |
120 | 120 | |||
121 | extern int capi_ll_attach(capi_softc_t *, const char *, const char *); | 121 | extern int capi_ll_attach(capi_softc_t *, const char *, const char *); | |
122 | extern int capi_ll_control(capi_softc_t *, int op, int arg); | 122 | extern int capi_ll_control(capi_softc_t *, int op, intptr_t arg); | |
123 | extern int capi_ll_detach(capi_softc_t *); | 123 | extern int capi_ll_detach(capi_softc_t *); | |
124 | 124 | |||
125 | #define CAPI_CTRL_READY 0 /* ctrl ready, value=TRUE/FALSE */ | 125 | #define CAPI_CTRL_READY 0 /* ctrl ready, value=TRUE/FALSE */ | |
126 | #define CAPI_CTRL_PROFILE 1 /* set CAPI profile */ | 126 | #define CAPI_CTRL_PROFILE 1 /* set CAPI profile */ | |
127 | #define CAPI_CTRL_NEW_NCCI 2 /* new ncci value, assign bchan */ | 127 | #define CAPI_CTRL_NEW_NCCI 2 /* new ncci value, assign bchan */ | |
128 | #define CAPI_CTRL_FREE_NCCI 3 /* free ncci value, clear bchan */ | 128 | #define CAPI_CTRL_FREE_NCCI 3 /* free ncci value, clear bchan */ | |
129 | 129 | |||
130 | extern int capi_ll_receive(capi_softc_t *, struct mbuf *); | 130 | extern int capi_ll_receive(capi_softc_t *, struct mbuf *); | |
131 | 131 | |||
132 | extern int capi_start_tx(void *, int bchan); | 132 | extern int capi_start_tx(void *, int bchan); | |
133 | 133 | |||
134 | #endif /* !_NETISDN_I4B_CAPI_H_ */ | 134 | #endif /* !_NETISDN_I4B_CAPI_H_ */ |
--- src/sys/netisdn/Attic/i4b_capi_llif.c 2009/04/18 14:58:06 1.5
+++ src/sys/netisdn/Attic/i4b_capi_llif.c 2013/06/13 07:22:44 1.5.18.1
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: i4b_capi_llif.c,v 1.5 2009/04/18 14:58:06 tsutsui Exp $ */ | 1 | /* $NetBSD: i4b_capi_llif.c,v 1.5.18.1 2013/06/13 07:22:44 msaitoh Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2001 Cubical Solutions Ltd. All rights reserved. | 4 | * Copyright (c) 2001 Cubical Solutions Ltd. All rights reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * | 14 | * | |
@@ -20,54 +20,54 @@ | @@ -20,54 +20,54 @@ | |||
20 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 20 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
21 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 21 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
22 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 22 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
23 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 23 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
24 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 24 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
25 | * SUCH DAMAGE. | 25 | * SUCH DAMAGE. | |
26 | * | 26 | * | |
27 | * capi/capi_llif.c The i4b CAPI link layer interface. | 27 | * capi/capi_llif.c The i4b CAPI link layer interface. | |
28 | * | 28 | * | |
29 | * $FreeBSD: src/sys/i4b/capi/capi_llif.c,v 1.1 2001/05/25 08:39:31 hm Exp $ | 29 | * $FreeBSD: src/sys/i4b/capi/capi_llif.c,v 1.1 2001/05/25 08:39:31 hm Exp $ | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | __KERNEL_RCSID(0, "$NetBSD: i4b_capi_llif.c,v 1.5 2009/04/18 14:58:06 tsutsui Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: i4b_capi_llif.c,v 1.5.18.1 2013/06/13 07:22:44 msaitoh Exp $"); | |
34 | 34 | |||
35 | #include <sys/param.h> | 35 | #include <sys/param.h> | |
36 | #include <sys/kernel.h> | 36 | #include <sys/kernel.h> | |
37 | #include <sys/systm.h> | 37 | #include <sys/systm.h> | |
38 | #include <sys/mbuf.h> | 38 | #include <sys/mbuf.h> | |
39 | #include <sys/socket.h> | 39 | #include <sys/socket.h> | |
40 | #include <sys/callout.h> | 40 | #include <sys/callout.h> | |
41 | #include <net/if.h> | 41 | #include <net/if.h> | |
42 | 42 | |||
43 | #include <netisdn/i4b_debug.h> | 43 | #include <netisdn/i4b_debug.h> | |
44 | #include <netisdn/i4b_ioctl.h> | 44 | #include <netisdn/i4b_ioctl.h> | |
45 | #include <netisdn/i4b_cause.h> | 45 | #include <netisdn/i4b_cause.h> | |
46 | #include <netisdn/i4b_l3l4.h> | 46 | #include <netisdn/i4b_l3l4.h> | |
47 | #include <netisdn/i4b_mbuf.h> | 47 | #include <netisdn/i4b_mbuf.h> | |
48 | #include <netisdn/i4b_global.h> | 48 | #include <netisdn/i4b_global.h> | |
49 | #include <netisdn/i4b_l4.h> | 49 | #include <netisdn/i4b_l4.h> | |
50 | #include <netisdn/i4b_capi.h> | 50 | #include <netisdn/i4b_capi.h> | |
51 | #include <netisdn/i4b_capi_msgs.h> | 51 | #include <netisdn/i4b_capi_msgs.h> | |
52 | 52 | |||
53 | /* | 53 | /* | |
54 | // capi_ll_control | 54 | // capi_ll_control | |
55 | // CAPI link layer control routine. Called by a link layer | 55 | // CAPI link layer control routine. Called by a link layer | |
56 | // driver when its state changes. | 56 | // driver when its state changes. | |
57 | */ | 57 | */ | |
58 | 58 | |||
59 | int | 59 | int | |
60 | capi_ll_control(capi_softc_t *sc, int op, int arg) | 60 | capi_ll_control(capi_softc_t *sc, int op, intptr_t arg) | |
61 | { | 61 | { | |
62 | switch (op) { | 62 | switch (op) { | |
63 | case CAPI_CTRL_READY: | 63 | case CAPI_CTRL_READY: | |
64 | if (arg) { | 64 | if (arg) { | |
65 | sc->sc_state = C_READY; | 65 | sc->sc_state = C_READY; | |
66 | 66 | |||
67 | /* | 67 | /* | |
68 | * Register our CAPI ApplId and send CAPI_LISTEN_REQ | 68 | * Register our CAPI ApplId and send CAPI_LISTEN_REQ | |
69 | * with CIP Mask value 1 (match all). | 69 | * with CIP Mask value 1 (match all). | |
70 | */ | 70 | */ | |
71 | 71 | |||
72 | sc->reg_appl(sc, I4BCAPI_APPLID, sc->sc_nbch); | 72 | sc->reg_appl(sc, I4BCAPI_APPLID, sc->sc_nbch); | |
73 | capi_listen_req(sc, 0x10007); | 73 | capi_listen_req(sc, 0x10007); |