if_ct.c (193813) | if_ct.c (199407) |
---|---|
1/*- 2 * Cronyx-Tau adapter driver for FreeBSD. 3 * Supports PPP/HDLC and Cisco/HDLC protocol in synchronous mode, 4 * and asyncronous channels with full modem control. 5 * Keepalive protocol implemented in both Cisco and PPP modes. 6 * 7 * Copyright (C) 1994-2002 Cronyx Engineering. 8 * Author: Serge Vakulenko, <vak@cronyx.ru> --- 8 unchanged lines hidden (view full) --- 17 * modify and redistribute this software in source and binary forms, 18 * as long as this message is kept with the software, all derivative 19 * works or modified versions. 20 * 21 * Cronyx Id: if_ct.c,v 1.1.2.31 2004/06/23 17:09:13 rik Exp $ 22 */ 23 24#include <sys/cdefs.h> | 1/*- 2 * Cronyx-Tau adapter driver for FreeBSD. 3 * Supports PPP/HDLC and Cisco/HDLC protocol in synchronous mode, 4 * and asyncronous channels with full modem control. 5 * Keepalive protocol implemented in both Cisco and PPP modes. 6 * 7 * Copyright (C) 1994-2002 Cronyx Engineering. 8 * Author: Serge Vakulenko, <vak@cronyx.ru> --- 8 unchanged lines hidden (view full) --- 17 * modify and redistribute this software in source and binary forms, 18 * as long as this message is kept with the software, all derivative 19 * works or modified versions. 20 * 21 * Cronyx Id: if_ct.c,v 1.1.2.31 2004/06/23 17:09:13 rik Exp $ 22 */ 23 24#include <sys/cdefs.h> |
25__FBSDID("$FreeBSD: head/sys/dev/ctau/if_ct.c 193813 2009-06-09 07:14:32Z imp $"); | 25__FBSDID("$FreeBSD: head/sys/dev/ctau/if_ct.c 199407 2009-11-17 16:43:02Z jhb $"); |
26 27#include <sys/param.h> 28#include <sys/proc.h> 29#include <sys/systm.h> 30#include <sys/kernel.h> 31#include <sys/module.h> 32#include <sys/mbuf.h> 33#include <sys/sockio.h> --- 79 unchanged lines hidden (view full) --- 113 int running; 114#ifdef NETGRAPH 115 char nodename [NG_NODESIZ]; 116 hook_p hook; 117 hook_p debug_hook; 118 node_p node; 119 struct ifqueue queue; 120 struct ifqueue hi_queue; | 26 27#include <sys/param.h> 28#include <sys/proc.h> 29#include <sys/systm.h> 30#include <sys/kernel.h> 31#include <sys/module.h> 32#include <sys/mbuf.h> 33#include <sys/sockio.h> --- 79 unchanged lines hidden (view full) --- 113 int running; 114#ifdef NETGRAPH 115 char nodename [NG_NODESIZ]; 116 hook_p hook; 117 hook_p debug_hook; 118 node_p node; 119 struct ifqueue queue; 120 struct ifqueue hi_queue; |
121 short timeout; 122 struct callout timeout_handle; | |
123#else 124 struct ifqueue queue; 125 struct ifnet *ifp; 126#endif | 121#else 122 struct ifqueue queue; 123 struct ifnet *ifp; 124#endif |
125 short timeout; 126 struct callout timeout_handle; |
|
127 struct cdev *devt; 128} drv_t; 129 130typedef struct _bdrv_t { 131 ct_board_t *board; 132 struct resource *base_res; 133 struct resource *drq_res; 134 struct resource *irq_res; --- 15 unchanged lines hidden (view full) --- 150 151static void ct_receive (ct_chan_t *c, char *data, int len); 152static void ct_transmit (ct_chan_t *c, void *attachment, int len); 153static void ct_error (ct_chan_t *c, int data); 154static void ct_up (drv_t *d); 155static void ct_start (drv_t *d); 156static void ct_down (drv_t *d); 157static void ct_watchdog (drv_t *d); | 127 struct cdev *devt; 128} drv_t; 129 130typedef struct _bdrv_t { 131 ct_board_t *board; 132 struct resource *base_res; 133 struct resource *drq_res; 134 struct resource *irq_res; --- 15 unchanged lines hidden (view full) --- 150 151static void ct_receive (ct_chan_t *c, char *data, int len); 152static void ct_transmit (ct_chan_t *c, void *attachment, int len); 153static void ct_error (ct_chan_t *c, int data); 154static void ct_up (drv_t *d); 155static void ct_start (drv_t *d); 156static void ct_down (drv_t *d); 157static void ct_watchdog (drv_t *d); |
158static void ct_watchdog_timer (void *arg); |
|
158#ifdef NETGRAPH 159extern struct ng_type typestruct; 160#else 161static void ct_ifstart (struct ifnet *ifp); 162static void ct_tlf (struct sppp *sp); 163static void ct_tls (struct sppp *sp); | 159#ifdef NETGRAPH 160extern struct ng_type typestruct; 161#else 162static void ct_ifstart (struct ifnet *ifp); 163static void ct_tlf (struct sppp *sp); 164static void ct_tls (struct sppp *sp); |
164static void ct_ifwatchdog (struct ifnet *ifp); | |
165static int ct_sioctl (struct ifnet *ifp, u_long cmd, caddr_t data); 166static void ct_initialize (void *softc); 167#endif 168 169static ct_board_t *adapter [NCTAU]; 170static drv_t *channel [NCTAU*NCHAN]; 171static struct callout led_timo [NCTAU]; 172static struct callout timeout_handle; --- 523 unchanged lines hidden (view full) --- 696 if (! ct_bus_dma_mem_alloc (unit, c->num, &d->dmamem)) 697 continue; 698 d->board = b; 699 d->chan = c; 700 d->bd = bd; 701 c->sys = d; 702 channel [b->num*NCHAN + c->num] = d; 703 sprintf (d->name, "ct%d.%d", b->num, c->num); | 165static int ct_sioctl (struct ifnet *ifp, u_long cmd, caddr_t data); 166static void ct_initialize (void *softc); 167#endif 168 169static ct_board_t *adapter [NCTAU]; 170static drv_t *channel [NCTAU*NCHAN]; 171static struct callout led_timo [NCTAU]; 172static struct callout timeout_handle; --- 523 unchanged lines hidden (view full) --- 696 if (! ct_bus_dma_mem_alloc (unit, c->num, &d->dmamem)) 697 continue; 698 d->board = b; 699 d->chan = c; 700 d->bd = bd; 701 c->sys = d; 702 channel [b->num*NCHAN + c->num] = d; 703 sprintf (d->name, "ct%d.%d", b->num, c->num); |
704 callout_init (&d->timeout_handle, CALLOUT_MPSAFE); |
|
704 705#ifdef NETGRAPH 706 if (ng_make_node_common (&typestruct, &d->node) != 0) { 707 printf ("%s: cannot make common node\n", d->name); 708 channel [b->num*NCHAN + c->num] = 0; 709 c->sys = 0; 710 ct_bus_dma_mem_free (&d->dmamem); 711 continue; --- 7 unchanged lines hidden (view full) --- 719 channel [b->num*NCHAN + c->num] = 0; 720 c->sys = 0; 721 ct_bus_dma_mem_free (&d->dmamem); 722 continue; 723 } 724 d->queue.ifq_maxlen = IFQ_MAXLEN; 725 d->hi_queue.ifq_maxlen = IFQ_MAXLEN; 726 mtx_init (&d->queue.ifq_mtx, "ct_queue", NULL, MTX_DEF); | 705 706#ifdef NETGRAPH 707 if (ng_make_node_common (&typestruct, &d->node) != 0) { 708 printf ("%s: cannot make common node\n", d->name); 709 channel [b->num*NCHAN + c->num] = 0; 710 c->sys = 0; 711 ct_bus_dma_mem_free (&d->dmamem); 712 continue; --- 7 unchanged lines hidden (view full) --- 720 channel [b->num*NCHAN + c->num] = 0; 721 c->sys = 0; 722 ct_bus_dma_mem_free (&d->dmamem); 723 continue; 724 } 725 d->queue.ifq_maxlen = IFQ_MAXLEN; 726 d->hi_queue.ifq_maxlen = IFQ_MAXLEN; 727 mtx_init (&d->queue.ifq_mtx, "ct_queue", NULL, MTX_DEF); |
727 mtx_init (&d->hi_queue.ifq_mtx, "ct_queue_hi", NULL, MTX_DEF); 728 callout_init (&d->timeout_handle, CALLOUT_MPSAFE); | 728 mtx_init (&d->hi_queue.ifq_mtx, "ct_queue_hi", NULL, MTX_DEF); |
729#else /*NETGRAPH*/ 730 d->ifp = if_alloc(IFT_PPP); 731 if (d->ifp == NULL) { 732 printf ("%s: cannot if_alloc common interface\n", 733 d->name); 734 channel [b->num*NCHAN + c->num] = 0; 735 c->sys = 0; 736 ct_bus_dma_mem_free (&d->dmamem); 737 continue; 738 } 739 d->ifp->if_softc = d; 740 if_initname (d->ifp, "ct", b->num * NCHAN + c->num); 741 d->ifp->if_mtu = PP_MTU; 742 d->ifp->if_flags = IFF_POINTOPOINT | IFF_MULTICAST; 743 d->ifp->if_ioctl = ct_sioctl; 744 d->ifp->if_start = ct_ifstart; | 729#else /*NETGRAPH*/ 730 d->ifp = if_alloc(IFT_PPP); 731 if (d->ifp == NULL) { 732 printf ("%s: cannot if_alloc common interface\n", 733 d->name); 734 channel [b->num*NCHAN + c->num] = 0; 735 c->sys = 0; 736 ct_bus_dma_mem_free (&d->dmamem); 737 continue; 738 } 739 d->ifp->if_softc = d; 740 if_initname (d->ifp, "ct", b->num * NCHAN + c->num); 741 d->ifp->if_mtu = PP_MTU; 742 d->ifp->if_flags = IFF_POINTOPOINT | IFF_MULTICAST; 743 d->ifp->if_ioctl = ct_sioctl; 744 d->ifp->if_start = ct_ifstart; |
745 d->ifp->if_watchdog = ct_ifwatchdog; | |
746 d->ifp->if_init = ct_initialize; 747 d->queue.ifq_maxlen = NBUF; 748 mtx_init (&d->queue.ifq_mtx, "ct_queue", NULL, MTX_DEF); 749 sppp_attach (d->ifp); 750 if_attach (d->ifp); 751 IFP2SP(d->ifp)->pp_tlf = ct_tlf; 752 IFP2SP(d->ifp)->pp_tls = ct_tls; 753 /* If BPF is in the kernel, call the attach for it. --- 57 unchanged lines hidden (view full) --- 811 812 /* Detach the interfaces, free buffer memory. */ 813 for (c = b->chan; c < b->chan + NCHAN; ++c) { 814 drv_t *d = (drv_t*) c->sys; 815 816 if (!d || !d->chan->type) 817 continue; 818 | 745 d->ifp->if_init = ct_initialize; 746 d->queue.ifq_maxlen = NBUF; 747 mtx_init (&d->queue.ifq_mtx, "ct_queue", NULL, MTX_DEF); 748 sppp_attach (d->ifp); 749 if_attach (d->ifp); 750 IFP2SP(d->ifp)->pp_tlf = ct_tlf; 751 IFP2SP(d->ifp)->pp_tls = ct_tls; 752 /* If BPF is in the kernel, call the attach for it. --- 57 unchanged lines hidden (view full) --- 810 811 /* Detach the interfaces, free buffer memory. */ 812 for (c = b->chan; c < b->chan + NCHAN; ++c) { 813 drv_t *d = (drv_t*) c->sys; 814 815 if (!d || !d->chan->type) 816 continue; 817 |
818 callout_stop (&d->timeout_handle); |
|
819#ifdef NETGRAPH 820 if (d->node) { 821 ng_rmnode_self (d->node); 822 NG_NODE_UNREF (d->node); 823 d->node = NULL; 824 } 825 mtx_destroy (&d->queue.ifq_mtx); 826 mtx_destroy (&d->hi_queue.ifq_mtx); --- 13 unchanged lines hidden (view full) --- 840 } 841 842 CT_LOCK (bd); 843 ct_led_off (b); 844 CT_UNLOCK (bd); 845 callout_drain (&led_timo[b->num]); 846 splx (s); 847 | 819#ifdef NETGRAPH 820 if (d->node) { 821 ng_rmnode_self (d->node); 822 NG_NODE_UNREF (d->node); 823 d->node = NULL; 824 } 825 mtx_destroy (&d->queue.ifq_mtx); 826 mtx_destroy (&d->hi_queue.ifq_mtx); --- 13 unchanged lines hidden (view full) --- 840 } 841 842 CT_LOCK (bd); 843 ct_led_off (b); 844 CT_UNLOCK (bd); 845 callout_drain (&led_timo[b->num]); 846 splx (s); 847 |
848 s = splimp (); | |
849 for (c = b->chan; c < b->chan + NCHAN; ++c) { 850 drv_t *d = (drv_t*) c->sys; 851 852 if (!d || !d->chan->type) 853 continue; | 848 for (c = b->chan; c < b->chan + NCHAN; ++c) { 849 drv_t *d = (drv_t*) c->sys; 850 851 if (!d || !d->chan->type) 852 continue; |
853 callout_drain(&d->timeout_handle); |
|
854 855 /* Deallocate buffers. */ 856 ct_bus_dma_mem_free (&d->dmamem); 857 } 858 bd->board = 0; 859 adapter [b->num] = 0; 860 free (b, M_DEVBUF); | 854 855 /* Deallocate buffers. */ 856 ct_bus_dma_mem_free (&d->dmamem); 857 } 858 bd->board = 0; 859 adapter [b->num] = 0; 860 free (b, M_DEVBUF); |
861 splx (s); | |
862 863 mtx_destroy (&bd->ct_mtx); 864 865 return 0; 866} 867 868#ifndef NETGRAPH 869static void ct_ifstart (struct ifnet *ifp) 870{ 871 drv_t *d = ifp->if_softc; 872 bdrv_t *bd = d->bd; 873 874 CT_LOCK (bd); 875 ct_start (d); 876 CT_UNLOCK (bd); 877} 878 | 861 862 mtx_destroy (&bd->ct_mtx); 863 864 return 0; 865} 866 867#ifndef NETGRAPH 868static void ct_ifstart (struct ifnet *ifp) 869{ 870 drv_t *d = ifp->if_softc; 871 bdrv_t *bd = d->bd; 872 873 CT_LOCK (bd); 874 ct_start (d); 875 CT_UNLOCK (bd); 876} 877 |
879static void ct_ifwatchdog (struct ifnet *ifp) 880{ 881 drv_t *d = ifp->if_softc; 882 883 ct_watchdog (d); 884} 885 | |
886static void ct_tlf (struct sppp *sp) 887{ 888 drv_t *d = SP2IFP(sp)->if_softc; 889 890 CT_DEBUG (d, ("ct_tlf\n")); 891/* ct_set_dtr (d->chan, 0);*/ 892/* ct_set_rts (d->chan, 0);*/ 893 if (!(sp->pp_flags & PP_FR) && !(d->ifp->if_flags & PP_CISCO)) --- 71 unchanged lines hidden (view full) --- 965 */ 966static void ct_down (drv_t *d) 967{ 968 int s = splimp (); 969 CT_DEBUG (d, ("ct_down\n")); 970 ct_set_dtr (d->chan, 0); 971 ct_set_rts (d->chan, 0); 972 d->running = 0; | 878static void ct_tlf (struct sppp *sp) 879{ 880 drv_t *d = SP2IFP(sp)->if_softc; 881 882 CT_DEBUG (d, ("ct_tlf\n")); 883/* ct_set_dtr (d->chan, 0);*/ 884/* ct_set_rts (d->chan, 0);*/ 885 if (!(sp->pp_flags & PP_FR) && !(d->ifp->if_flags & PP_CISCO)) --- 71 unchanged lines hidden (view full) --- 957 */ 958static void ct_down (drv_t *d) 959{ 960 int s = splimp (); 961 CT_DEBUG (d, ("ct_down\n")); 962 ct_set_dtr (d->chan, 0); 963 ct_set_rts (d->chan, 0); 964 d->running = 0; |
965 callout_stop (&d->timeout_handle); |
|
973 splx (s); 974} 975 976/* 977 * Start the interface. Called on splimp(). 978 */ 979static void ct_up (drv_t *d) 980{ --- 47 unchanged lines hidden (view full) --- 1028 m_copydata (m, 0, len, d->chan->tbuf[d->chan->te]); 1029 ct_send_packet (d->chan, d->chan->tbuf[d->chan->te], 1030 len, 0); 1031 } 1032 m_freem (m); 1033 1034 /* Set up transmit timeout, if the transmit ring is not empty. 1035 * Transmit timeout is 10 seconds. */ | 966 splx (s); 967} 968 969/* 970 * Start the interface. Called on splimp(). 971 */ 972static void ct_up (drv_t *d) 973{ --- 47 unchanged lines hidden (view full) --- 1021 m_copydata (m, 0, len, d->chan->tbuf[d->chan->te]); 1022 ct_send_packet (d->chan, d->chan->tbuf[d->chan->te], 1023 len, 0); 1024 } 1025 m_freem (m); 1026 1027 /* Set up transmit timeout, if the transmit ring is not empty. 1028 * Transmit timeout is 10 seconds. */ |
1036#ifdef NETGRAPH | |
1037 d->timeout = 10; | 1029 d->timeout = 10; |
1038#else 1039 d->ifp->if_timer = 10; 1040#endif | |
1041 } 1042#ifndef NETGRAPH 1043 d->ifp->if_drv_flags |= IFF_DRV_OACTIVE; 1044#endif 1045} 1046 1047/* 1048 * Start output on the interface. --- 4 unchanged lines hidden (view full) --- 1053 int s = splimp (); 1054 1055 if (d->running) { 1056 if (! d->chan->dtr) 1057 ct_set_dtr (d->chan, 1); 1058 if (! d->chan->rts) 1059 ct_set_rts (d->chan, 1); 1060 ct_send (d); | 1030 } 1031#ifndef NETGRAPH 1032 d->ifp->if_drv_flags |= IFF_DRV_OACTIVE; 1033#endif 1034} 1035 1036/* 1037 * Start output on the interface. --- 4 unchanged lines hidden (view full) --- 1042 int s = splimp (); 1043 1044 if (d->running) { 1045 if (! d->chan->dtr) 1046 ct_set_dtr (d->chan, 1); 1047 if (! d->chan->rts) 1048 ct_set_rts (d->chan, 1); 1049 ct_send (d); |
1050 callout_reset (&d->timeout_handle, hz, ct_watchdog_timer, d); |
|
1061 } 1062 1063 splx (s); 1064} 1065 1066/* 1067 * Handle transmit timeouts. 1068 * Recover after lost transmit interrupts. 1069 * Always called on splimp(). 1070 */ 1071static void ct_watchdog (drv_t *d) 1072{ | 1051 } 1052 1053 splx (s); 1054} 1055 1056/* 1057 * Handle transmit timeouts. 1058 * Recover after lost transmit interrupts. 1059 * Always called on splimp(). 1060 */ 1061static void ct_watchdog (drv_t *d) 1062{ |
1073 bdrv_t *bd = d->bd; 1074 int s; | |
1075 | 1063 |
1076 s = splimp (); 1077 CT_LOCK (bd); | |
1078 CT_DEBUG (d, ("device timeout\n")); 1079 if (d->running) { 1080 ct_setup_chan (d->chan); 1081 ct_start_chan (d->chan, 0, 0); 1082 ct_set_dtr (d->chan, 1); 1083 ct_set_rts (d->chan, 1); 1084 ct_start (d); 1085 } | 1064 CT_DEBUG (d, ("device timeout\n")); 1065 if (d->running) { 1066 ct_setup_chan (d->chan); 1067 ct_start_chan (d->chan, 0, 0); 1068 ct_set_dtr (d->chan, 1); 1069 ct_set_rts (d->chan, 1); 1070 ct_start (d); 1071 } |
1072} 1073 1074static void ct_watchdog_timer (void *arg) 1075{ 1076 drv_t *d = arg; 1077 bdrv_t *bd = d->bd; 1078 1079 CT_LOCK (bd); 1080 if (d->timeout == 1) 1081 ct_watchdog (d); 1082 if (d->timeout) 1083 d->timeout--; 1084 callout_reset (&d->timeout_handle, hz, ct_watchdog_timer, d); |
|
1086 CT_UNLOCK (bd); | 1085 CT_UNLOCK (bd); |
1087 splx (s); | |
1088} 1089 1090/* 1091 * Transmit callback function. 1092 */ 1093static void ct_transmit (ct_chan_t *c, void *attachment, int len) 1094{ 1095 drv_t *d = c->sys; 1096 1097 if (!d) 1098 return; | 1086} 1087 1088/* 1089 * Transmit callback function. 1090 */ 1091static void ct_transmit (ct_chan_t *c, void *attachment, int len) 1092{ 1093 drv_t *d = c->sys; 1094 1095 if (!d) 1096 return; |
1099#ifdef NETGRAPH | |
1100 d->timeout = 0; | 1097 d->timeout = 0; |
1101#else | 1098#ifndef NETGRAPH |
1102 ++d->ifp->if_opackets; 1103 d->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; | 1099 ++d->ifp->if_opackets; 1100 d->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; |
1104 d->ifp->if_timer = 0; | |
1105#endif 1106 ct_start (d); 1107} 1108 1109/* 1110 * Process the received packet. 1111 */ 1112static void ct_receive (ct_chan_t *c, char *data, int len) --- 63 unchanged lines hidden (view full) --- 1176 case CT_OVERFLOW: 1177 CT_DEBUG (d, ("overflow error\n")); 1178#ifndef NETGRAPH 1179 ++d->ifp->if_ierrors; 1180#endif 1181 break; 1182 case CT_UNDERRUN: 1183 CT_DEBUG (d, ("underrun error\n")); | 1101#endif 1102 ct_start (d); 1103} 1104 1105/* 1106 * Process the received packet. 1107 */ 1108static void ct_receive (ct_chan_t *c, char *data, int len) --- 63 unchanged lines hidden (view full) --- 1172 case CT_OVERFLOW: 1173 CT_DEBUG (d, ("overflow error\n")); 1174#ifndef NETGRAPH 1175 ++d->ifp->if_ierrors; 1176#endif 1177 break; 1178 case CT_UNDERRUN: 1179 CT_DEBUG (d, ("underrun error\n")); |
1184#ifdef NETGRAPH | |
1185 d->timeout = 0; | 1180 d->timeout = 0; |
1186#else | 1181#ifndef NETGRAPH |
1187 ++d->ifp->if_oerrors; 1188 d->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; | 1182 ++d->ifp->if_oerrors; 1183 d->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; |
1189 d->ifp->if_timer = 0; | |
1190#endif 1191 ct_start (d); 1192 break; 1193 default: 1194 CT_DEBUG (d, ("error #%d\n", data)); 1195 } 1196} 1197 --- 939 unchanged lines hidden (view full) --- 2137 NG_NODE_SET_PRIVATE (node, NULL); 2138 NG_NODE_UNREF (node); 2139 } 2140 NG_NODE_REVIVE(node); /* Persistant node */ 2141#endif 2142 return 0; 2143} 2144 | 1184#endif 1185 ct_start (d); 1186 break; 1187 default: 1188 CT_DEBUG (d, ("error #%d\n", data)); 1189 } 1190} 1191 --- 939 unchanged lines hidden (view full) --- 2131 NG_NODE_SET_PRIVATE (node, NULL); 2132 NG_NODE_UNREF (node); 2133 } 2134 NG_NODE_REVIVE(node); /* Persistant node */ 2135#endif 2136 return 0; 2137} 2138 |
2145static void ng_ct_watchdog (void *arg) 2146{ 2147 drv_t *d = arg; 2148 2149 if (!d) 2150 return; 2151 2152 if (d->timeout == 1) 2153 ct_watchdog (d); 2154 if (d->timeout) 2155 d->timeout--; 2156 callout_reset (&d->timeout_handle, hz, ng_ct_watchdog, d); 2157} 2158 | |
2159static int ng_ct_connect (hook_p hook) 2160{ 2161 drv_t *d = NG_NODE_PRIVATE (NG_HOOK_NODE (hook)); 2162 2163 if (!d) 2164 return 0; 2165 | 2139static int ng_ct_connect (hook_p hook) 2140{ 2141 drv_t *d = NG_NODE_PRIVATE (NG_HOOK_NODE (hook)); 2142 2143 if (!d) 2144 return 0; 2145 |
2166 callout_reset (&d->timeout_handle, hz, ng_ct_watchdog, d); | 2146 callout_reset (&d->timeout_handle, hz, ct_watchdog_timer, d); |
2167 return 0; 2168} 2169 2170static int ng_ct_disconnect (hook_p hook) 2171{ 2172 drv_t *d = NG_NODE_PRIVATE (NG_HOOK_NODE (hook)); 2173 bdrv_t *bd; 2174 --- 69 unchanged lines hidden --- | 2147 return 0; 2148} 2149 2150static int ng_ct_disconnect (hook_p hook) 2151{ 2152 drv_t *d = NG_NODE_PRIVATE (NG_HOOK_NODE (hook)); 2153 bdrv_t *bd; 2154 --- 69 unchanged lines hidden --- |