diff options
author | Timo Teräs <timo.teras@iki.fi> | 2011-08-15 15:30:54 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2011-08-15 15:32:11 +0300 |
commit | bc0bf19e19e4ec722cb05da08f29f8493bb6248b (patch) | |
tree | 38b623f95752f3d18098151fb44906e75f82b45b | |
parent | 11233ac93b5354d5274c88f500d702426282ae16 (diff) | |
download | alpine_aports-bc0bf19e19e4ec722cb05da08f29f8493bb6248b.tar.bz2 alpine_aports-bc0bf19e19e4ec722cb05da08f29f8493bb6248b.tar.xz alpine_aports-bc0bf19e19e4ec722cb05da08f29f8493bb6248b.zip |
main/dahdi-*: upgrade to 2.5.0
-rw-r--r-- | main/dahdi-linux-grsec/APKBUILD | 14 | ||||
-rw-r--r-- | main/dahdi-linux-grsec/dahdi-2.5.0-bri-fixes.patch | 327 | ||||
-rw-r--r-- | main/dahdi-linux-grsec/dahdi-bri_dchan.patch | 70 | ||||
-rw-r--r-- | main/dahdi-linux-grsec/zaphfc-dahdi-2.5.0.patch | 36 | ||||
-rw-r--r-- | main/dahdi-linux-vserver/APKBUILD | 10 | ||||
-rw-r--r-- | main/dahdi-linux-vserver/dahdi-2.5.0-bri-fixes.patch | 327 | ||||
-rw-r--r-- | main/dahdi-linux-vserver/dahdi-bri_dchan.patch | 70 | ||||
-rw-r--r-- | main/dahdi-linux-vserver/dahdi-zaphfc.patch | 3 | ||||
-rw-r--r-- | main/dahdi-linux-vserver/zaphfc-dahdi-2.5.0.patch | 36 | ||||
-rw-r--r-- | main/dahdi-linux/APKBUILD | 6 | ||||
-rw-r--r-- | main/dahdi-tools/APKBUILD | 4 |
11 files changed, 822 insertions, 81 deletions
diff --git a/main/dahdi-linux-grsec/APKBUILD b/main/dahdi-linux-grsec/APKBUILD index 54516c5936..5ffa547701 100644 --- a/main/dahdi-linux-grsec/APKBUILD +++ b/main/dahdi-linux-grsec/APKBUILD | |||
@@ -16,8 +16,8 @@ _realname=dahdi-linux | |||
16 | pkgname=${_realname}-${_flavor} | 16 | pkgname=${_realname}-${_flavor} |
17 | pkgver=$pkgver | 17 | pkgver=$pkgver |
18 | # when chaning _dahdiver we *must* bump _mypkgrel | 18 | # when chaning _dahdiver we *must* bump _mypkgrel |
19 | _dahdiver=2.4.1.2 | 19 | _dahdiver=2.5.0 |
20 | _mypkgrel=2 | 20 | _mypkgrel=3 |
21 | pkgrel=$(( $_kpkgrel + $_mypkgrel )) | 21 | pkgrel=$(( $_kpkgrel + $_mypkgrel )) |
22 | pkgdesc="Digium Asterisk Hardware Device Interface drivers $_dahdiver" | 22 | pkgdesc="Digium Asterisk Hardware Device Interface drivers $_dahdiver" |
23 | url="http://www.asterisk.org" | 23 | url="http://www.asterisk.org" |
@@ -32,9 +32,11 @@ subpackages="$pkgname-dev" | |||
32 | source="http://downloads.digium.com/pub/telephony/dahdi-linux/releases/${_realname}-$_dahdiver.tar.gz | 32 | source="http://downloads.digium.com/pub/telephony/dahdi-linux/releases/${_realname}-$_dahdiver.tar.gz |
33 | dahdi-depmod.patch | 33 | dahdi-depmod.patch |
34 | dahdi-bri_dchan.patch | 34 | dahdi-bri_dchan.patch |
35 | dahdi-2.5.0-bri-fixes.patch | ||
35 | dahdi-zaphfc.patch | 36 | dahdi-zaphfc.patch |
36 | zaphfc-dahdi-flortz.diff | 37 | zaphfc-dahdi-flortz.diff |
37 | zaphfc-dahdi-2.4.0.patch | 38 | zaphfc-dahdi-2.4.0.patch |
39 | zaphfc-dahdi-2.5.0.patch | ||
38 | " | 40 | " |
39 | 41 | ||
40 | prepare() { | 42 | prepare() { |
@@ -75,9 +77,11 @@ dev() { | |||
75 | ln -s /usr/include "$dir"/include | 77 | ln -s /usr/include "$dir"/include |
76 | } | 78 | } |
77 | 79 | ||
78 | md5sums="81b232a47693f4adac90c569e446f88f dahdi-linux-2.4.1.2.tar.gz | 80 | md5sums="449f6591ccedb68937b5b30cbd37cea3 dahdi-linux-2.5.0.tar.gz |
79 | c78fb8d80f9efdffd950297c88ff9273 dahdi-depmod.patch | 81 | c78fb8d80f9efdffd950297c88ff9273 dahdi-depmod.patch |
80 | 4b41a82ff390ac64c08092c5a3eab6a8 dahdi-bri_dchan.patch | 82 | 3bb419ac598534cd4ad5248f23656001 dahdi-bri_dchan.patch |
83 | 9088ee5cd24f94b7f90c24e5ed6071e0 dahdi-2.5.0-bri-fixes.patch | ||
81 | a822c092f0548cd13f5e8d8cba053af6 dahdi-zaphfc.patch | 84 | a822c092f0548cd13f5e8d8cba053af6 dahdi-zaphfc.patch |
82 | 291c5c44c86ab02443a742415461ddca zaphfc-dahdi-flortz.diff | 85 | 291c5c44c86ab02443a742415461ddca zaphfc-dahdi-flortz.diff |
83 | 0fdcd8c8c93bc1fe33c0af12b6cc6b05 zaphfc-dahdi-2.4.0.patch" | 86 | 0fdcd8c8c93bc1fe33c0af12b6cc6b05 zaphfc-dahdi-2.4.0.patch |
87 | 9ed23321512274c6c5c5b76af0411e38 zaphfc-dahdi-2.5.0.patch" | ||
diff --git a/main/dahdi-linux-grsec/dahdi-2.5.0-bri-fixes.patch b/main/dahdi-linux-grsec/dahdi-2.5.0-bri-fixes.patch new file mode 100644 index 0000000000..01dcf646fb --- /dev/null +++ b/main/dahdi-linux-grsec/dahdi-2.5.0-bri-fixes.patch | |||
@@ -0,0 +1,327 @@ | |||
1 | Index: dahdi-linux-2.5.0/drivers/dahdi/xpp/card_bri.c | ||
2 | =================================================================== | ||
3 | --- dahdi-linux-2.5.0.orig/drivers/dahdi/xpp/card_bri.c 2011-08-15 14:42:29.000000000 +0300 | ||
4 | +++ dahdi-linux-2.5.0/drivers/dahdi/xpp/card_bri.c 2011-08-15 14:51:37.000000000 +0300 | ||
5 | @@ -274,7 +274,6 @@ | ||
6 | int frame_begin; | ||
7 | |||
8 | priv = xpd->priv; | ||
9 | - BUG_ON(!priv); | ||
10 | if(transmit) { | ||
11 | direction = "TX"; | ||
12 | frame_begin = priv->txframe_begin; | ||
13 | @@ -312,9 +311,7 @@ | ||
14 | { | ||
15 | struct BRI_priv_data *priv; | ||
16 | |||
17 | - BUG_ON(!xpd); | ||
18 | priv = xpd->priv; | ||
19 | - BUG_ON(!priv); | ||
20 | if(priv->dchan_alive == up) | ||
21 | return; | ||
22 | if(up) { | ||
23 | @@ -332,9 +329,7 @@ | ||
24 | { | ||
25 | struct BRI_priv_data *priv; | ||
26 | |||
27 | - BUG_ON(!xpd); | ||
28 | priv = xpd->priv; | ||
29 | - BUG_ON(!priv); | ||
30 | if(priv->layer1_up == up) | ||
31 | return; | ||
32 | priv->layer1_up = up; | ||
33 | @@ -348,9 +343,7 @@ | ||
34 | struct BRI_priv_data *priv; | ||
35 | byte curr_state; | ||
36 | |||
37 | - BUG_ON(!xpd); | ||
38 | priv = xpd->priv; | ||
39 | - BUG_ON(!priv); | ||
40 | curr_state = priv->state_register.bits.v_su_sta; | ||
41 | XPD_DBG(SIGNAL, xpd, "%s\n", (on)?"ON":"OFF"); | ||
42 | if(on) { | ||
43 | @@ -391,9 +384,7 @@ | ||
44 | struct BRI_priv_data *priv; | ||
45 | byte curr_state; | ||
46 | |||
47 | - BUG_ON(!xpd); | ||
48 | priv = xpd->priv; | ||
49 | - BUG_ON(!priv); | ||
50 | curr_state = priv->state_register.bits.v_su_sta; | ||
51 | XPD_DBG(SIGNAL, xpd, "%s\n", (on)?"ON":"OFF"); | ||
52 | if(on) { | ||
53 | @@ -443,7 +434,6 @@ | ||
54 | struct BRI_priv_data *priv; | ||
55 | |||
56 | priv = xpd->priv; | ||
57 | - BUG_ON(!priv); | ||
58 | #ifdef CONFIG_DAHDI_BRI_DCHANS | ||
59 | if(debug & DBG_COMMANDS) | ||
60 | dump_hex_buf(xpd, "D-Chan(abort) RX: dchan_rbuf", | ||
61 | @@ -460,7 +450,6 @@ | ||
62 | byte status; | ||
63 | |||
64 | priv = xpd->priv; | ||
65 | - BUG_ON(!priv); | ||
66 | #ifdef CONFIG_DAHDI_BRI_DCHANS | ||
67 | if(priv->dchan_r_idx < 4) { | ||
68 | XPD_NOTICE(xpd, "D-Chan RX short frame (dchan_r_idx=%d)\n", | ||
69 | @@ -503,7 +492,6 @@ | ||
70 | int idx; | ||
71 | |||
72 | priv = xpd->priv; | ||
73 | - BUG_ON(!priv); | ||
74 | dchan_buf = dchan->readchunk; | ||
75 | idx = priv->dchan_r_idx; | ||
76 | if(idx + len >= DCHAN_BUFSIZE) { | ||
77 | @@ -527,7 +515,6 @@ | ||
78 | struct BRI_priv_data *priv; | ||
79 | |||
80 | priv = xpd->priv; | ||
81 | - BUG_ON(!priv); | ||
82 | #ifdef CONFIG_DAHDI_BRI_DCHANS | ||
83 | dchan->bytes2receive = priv->dchan_r_idx - 1; | ||
84 | dchan->eofrx = 1; | ||
85 | @@ -556,10 +543,7 @@ | ||
86 | return 0; | ||
87 | if(!SPAN_REGISTERED(xpd)) /* Nowhere to copy data */ | ||
88 | return 0; | ||
89 | - BUG_ON(!xpd); | ||
90 | priv = xpd->priv; | ||
91 | - BUG_ON(!priv); | ||
92 | - xbus = xpd->xbus; | ||
93 | dchan = XPD_CHAN(xpd, 2); | ||
94 | if(!IS_OFFHOOK(xpd, 2)) { /* D-chan is used? */ | ||
95 | static int rate_limit; | ||
96 | @@ -629,9 +613,7 @@ | ||
97 | return 0; | ||
98 | if(!SPAN_REGISTERED(xpd)) /* Nowhere to copy data */ | ||
99 | return 0; | ||
100 | - BUG_ON(!xpd); | ||
101 | priv = xpd->priv; | ||
102 | - BUG_ON(!priv); | ||
103 | dchan = XPD_CHAN(xpd, 2); | ||
104 | if(!IS_OFFHOOK(xpd, 2)) { /* D-chan is used? */ | ||
105 | static int rate_limit; | ||
106 | @@ -677,7 +659,6 @@ | ||
107 | struct BRI_priv_data *priv; | ||
108 | |||
109 | priv = xpd->priv; | ||
110 | - BUG_ON(!priv); | ||
111 | dchan = XPD_CHAN(xpd, 2); | ||
112 | if (dchan == chan) { | ||
113 | atomic_inc(&priv->hdlc_pending); | ||
114 | @@ -716,7 +697,6 @@ | ||
115 | int ret; | ||
116 | |||
117 | priv = xpd->priv; | ||
118 | - BUG_ON(!priv); | ||
119 | #ifndef CONFIG_DAHDI_BRI_DCHANS | ||
120 | if(atomic_read(&priv->hdlc_pending) == 0) | ||
121 | return 0; | ||
122 | @@ -769,7 +749,6 @@ | ||
123 | { | ||
124 | struct BRI_priv_data *priv; | ||
125 | |||
126 | - BUG_ON(!xpd); | ||
127 | priv = xpd->priv; | ||
128 | XPD_DBG(PROC, xpd, "\n"); | ||
129 | #ifdef CONFIG_PROC_FS | ||
130 | @@ -784,7 +763,6 @@ | ||
131 | { | ||
132 | struct BRI_priv_data *priv; | ||
133 | |||
134 | - BUG_ON(!xpd); | ||
135 | priv = xpd->priv; | ||
136 | XPD_DBG(PROC, xpd, "\n"); | ||
137 | #ifdef CONFIG_PROC_FS | ||
138 | @@ -828,7 +806,6 @@ | ||
139 | { | ||
140 | struct BRI_priv_data *priv; | ||
141 | |||
142 | - BUG_ON(!xpd); | ||
143 | XPD_DBG(GENERAL, xpd, "\n"); | ||
144 | priv = xpd->priv; | ||
145 | DO_LED(xpd, GREEN_LED, BRI_LED_OFF); | ||
146 | @@ -841,7 +818,6 @@ | ||
147 | |||
148 | static int BRI_card_remove(xbus_t *xbus, xpd_t *xpd) | ||
149 | { | ||
150 | - BUG_ON(!xpd); | ||
151 | XPD_DBG(GENERAL, xpd, "\n"); | ||
152 | bri_proc_remove(xbus, xpd); | ||
153 | return 0; | ||
154 | @@ -877,10 +853,8 @@ | ||
155 | struct BRI_priv_data *priv; | ||
156 | int i; | ||
157 | |||
158 | - BUG_ON(!xpd); | ||
159 | xbus = xpd->xbus; | ||
160 | priv = xpd->priv; | ||
161 | - BUG_ON(!xbus); | ||
162 | XPD_DBG(GENERAL, xpd, "%s\n", (on)?"on":"off"); | ||
163 | if(!on) { | ||
164 | /* Nothing to do yet */ | ||
165 | @@ -927,11 +901,6 @@ | ||
166 | |||
167 | static int BRI_card_dahdi_postregistration(xpd_t *xpd, bool on) | ||
168 | { | ||
169 | - xbus_t *xbus; | ||
170 | - | ||
171 | - BUG_ON(!xpd); | ||
172 | - xbus = xpd->xbus; | ||
173 | - BUG_ON(!xbus); | ||
174 | XPD_DBG(GENERAL, xpd, "%s\n", (on)?"on":"off"); | ||
175 | return(0); | ||
176 | } | ||
177 | @@ -956,7 +925,6 @@ | ||
178 | int other_led; | ||
179 | int mod; | ||
180 | |||
181 | - BUG_ON(!xpd); | ||
182 | if(IS_NT(xpd)) { | ||
183 | which_led = RED_LED; | ||
184 | other_led = GREEN_LED; | ||
185 | @@ -965,7 +933,6 @@ | ||
186 | other_led = RED_LED; | ||
187 | } | ||
188 | priv = xpd->priv; | ||
189 | - BUG_ON(!priv); | ||
190 | timer_count = xpd->timer_count; | ||
191 | if(xpd->blink_mode) { | ||
192 | if((timer_count % DEFAULT_LED_PERIOD) == 0) { | ||
193 | @@ -1014,9 +981,7 @@ | ||
194 | { | ||
195 | struct BRI_priv_data *priv; | ||
196 | |||
197 | - BUG_ON(!xpd); | ||
198 | priv = xpd->priv; | ||
199 | - BUG_ON(!priv); | ||
200 | if(IS_NT(xpd)) { | ||
201 | if (priv->t1 > HFC_TIMER_OFF) { | ||
202 | if (--priv->t1 == 0) { | ||
203 | @@ -1053,9 +1018,7 @@ | ||
204 | { | ||
205 | struct BRI_priv_data *priv; | ||
206 | |||
207 | - BUG_ON(!xpd); | ||
208 | priv = xpd->priv; | ||
209 | - BUG_ON(!priv); | ||
210 | if(!priv->initialized || !xbus->self_ticking) | ||
211 | return 0; | ||
212 | if(poll_interval != 0 && (priv->tick_counter % poll_interval) == 0) { | ||
213 | @@ -1111,7 +1074,6 @@ | ||
214 | |||
215 | static int BRI_card_ioctl(xpd_t *xpd, int pos, unsigned int cmd, unsigned long arg) | ||
216 | { | ||
217 | - BUG_ON(!xpd); | ||
218 | if(!XBUS_IS(xpd->xbus, READY)) | ||
219 | return -ENODEV; | ||
220 | switch (cmd) { | ||
221 | @@ -1131,7 +1093,6 @@ | ||
222 | |||
223 | static int BRI_card_open(xpd_t *xpd, lineno_t pos) | ||
224 | { | ||
225 | - BUG_ON(!xpd); | ||
226 | if(pos == 2) { | ||
227 | LINE_DBG(SIGNAL, xpd, pos, "OFFHOOK the whole span\n"); | ||
228 | BIT_SET(PHONEDEV(xpd).offhook_state, 0); | ||
229 | @@ -1230,12 +1191,8 @@ | ||
230 | { | ||
231 | struct phonedev *phonedev = container_of(span, struct phonedev, span); | ||
232 | xpd_t *xpd = container_of(phonedev, struct xpd, phonedev); | ||
233 | - struct BRI_priv_data *priv; | ||
234 | struct dahdi_chan *dchan; | ||
235 | |||
236 | - BUG_ON(!xpd); | ||
237 | - priv = xpd->priv; | ||
238 | - BUG_ON(!priv); | ||
239 | if(!XBUS_IS(xpd->xbus, READY)) { | ||
240 | XPD_DBG(GENERAL, xpd, "Startup called by dahdi. No Hardware. Ignored\n"); | ||
241 | return -ENODEV; | ||
242 | @@ -1267,11 +1224,7 @@ | ||
243 | { | ||
244 | struct phonedev *phonedev = container_of(span, struct phonedev, span); | ||
245 | xpd_t *xpd = container_of(phonedev, struct xpd, phonedev); | ||
246 | - struct BRI_priv_data *priv; | ||
247 | |||
248 | - BUG_ON(!xpd); | ||
249 | - priv = xpd->priv; | ||
250 | - BUG_ON(!priv); | ||
251 | if(!XBUS_IS(xpd->xbus, READY)) { | ||
252 | XPD_DBG(GENERAL, xpd, "Shutdown called by dahdi. No Hardware. Ignored\n"); | ||
253 | return -ENODEV; | ||
254 | @@ -1292,7 +1245,6 @@ | ||
255 | xpd_t *main_xpd; | ||
256 | unsigned long flags; | ||
257 | |||
258 | - BUG_ON(!xpd); | ||
259 | main_xpd = xpd_byaddr(xpd->xbus, xpd->addr.unit, 0); | ||
260 | if(!main_xpd) { | ||
261 | XPD_DBG(DEVICES, xpd, "Unit 0 is already gone. Ignore request\n"); | ||
262 | @@ -1350,8 +1302,6 @@ | ||
263 | xpp_line_t wanted_lines; | ||
264 | |||
265 | |||
266 | - BUG_ON(!xpd); | ||
267 | - BUG_ON(!pack); | ||
268 | pcm = RPACKET_FIELD(pack, GLOBAL, PCM_WRITE, pcm); | ||
269 | for(subunit = 0; subunit < MAX_SUBUNIT; subunit++) { | ||
270 | xpd_t *tmp_xpd; | ||
271 | @@ -1435,12 +1385,8 @@ | ||
272 | |||
273 | static int BRI_echocancel_setmask(xpd_t *xpd, xpp_line_t ec_mask) | ||
274 | { | ||
275 | - struct BRI_priv_data *priv; | ||
276 | int i; | ||
277 | |||
278 | - BUG_ON(!xpd); | ||
279 | - priv = xpd->priv; | ||
280 | - BUG_ON(!priv); | ||
281 | XPD_DBG(GENERAL, xpd, "0x%8X\n", ec_mask); | ||
282 | if (!ECHOOPS(xpd->xbus)) { | ||
283 | XPD_DBG(GENERAL, xpd, | ||
284 | @@ -1466,9 +1412,7 @@ | ||
285 | struct bri_leds *bri_leds; | ||
286 | struct BRI_priv_data *priv; | ||
287 | |||
288 | - BUG_ON(!xbus); | ||
289 | priv = xpd->priv; | ||
290 | - BUG_ON(!priv); | ||
291 | XPD_DBG(LEDS, xpd, "%s -> %d\n", | ||
292 | (which_led)?"RED":"GREEN", | ||
293 | to_led_state); | ||
294 | @@ -1507,9 +1451,7 @@ | ||
295 | struct BRI_priv_data *priv; | ||
296 | su_rd_sta_t new_state; | ||
297 | |||
298 | - BUG_ON(!xpd); | ||
299 | priv = xpd->priv; | ||
300 | - BUG_ON(!priv); | ||
301 | if(!priv->initialized) { | ||
302 | XPD_ERR(xpd, "%s called on uninitialized AB\n", __FUNCTION__); | ||
303 | return; | ||
304 | @@ -1621,7 +1563,6 @@ | ||
305 | } | ||
306 | spin_lock_irqsave(&xpd->lock, flags); | ||
307 | priv = xpd->priv; | ||
308 | - BUG_ON(!priv); | ||
309 | if(REG_FIELD(info, do_subreg)) { | ||
310 | XPD_DBG(REGS, xpd, "RI %02X %02X %02X\n", | ||
311 | REG_FIELD(info, regnum), REG_FIELD(info, subreg), REG_FIELD(info, data_low)); | ||
312 | @@ -1665,7 +1606,6 @@ | ||
313 | { | ||
314 | struct BRI_priv_data *priv; | ||
315 | |||
316 | - BUG_ON(!xpd); | ||
317 | priv = xpd->priv; | ||
318 | XPD_DBG(GENERAL, xpd, "%s\n", (on)?"ON":"OFF"); | ||
319 | if(on) { | ||
320 | @@ -1745,7 +1685,6 @@ | ||
321 | return -ENODEV; | ||
322 | spin_lock_irqsave(&xpd->lock, flags); | ||
323 | priv = xpd->priv; | ||
324 | - BUG_ON(!priv); | ||
325 | len += sprintf(page + len, "%05d Layer 1: ", priv->poll_counter); | ||
326 | if(priv->reg30_good) { | ||
327 | len += sprintf(page + len, "%-5s ", (priv->layer1_up) ? "UP" : "DOWN"); | ||
diff --git a/main/dahdi-linux-grsec/dahdi-bri_dchan.patch b/main/dahdi-linux-grsec/dahdi-bri_dchan.patch index d7a3fe859b..8d2ba97fd1 100644 --- a/main/dahdi-linux-grsec/dahdi-bri_dchan.patch +++ b/main/dahdi-linux-grsec/dahdi-bri_dchan.patch | |||
@@ -3,11 +3,13 @@ | |||
3 | # Zaptel expects it as a standard channel with 1000 samples | 3 | # Zaptel expects it as a standard channel with 1000 samples |
4 | # per second. | 4 | # per second. |
5 | 5 | ||
6 | --- a/include/dahdi/kernel.h | 6 | Index: dahdi-linux-2.5.0/include/dahdi/kernel.h |
7 | +++ b/include/dahdi/kernel.h | 7 | =================================================================== |
8 | @@ -132,6 +132,13 @@ struct dahdi_chan { | 8 | --- dahdi-linux-2.5.0.orig/include/dahdi/kernel.h 2011-06-29 18:32:40.000000000 +0300 |
9 | int do_ppp_error; | 9 | +++ dahdi-linux-2.5.0/include/dahdi/kernel.h 2011-08-15 14:14:26.000000000 +0300 |
10 | struct sk_buff_head ppp_rq; | 10 | @@ -413,6 +413,13 @@ |
11 | int statcount; | ||
12 | int lastnumbufs; | ||
11 | #endif | 13 | #endif |
12 | +#ifdef CONFIG_DAHDI_BRI_DCHANS | 14 | +#ifdef CONFIG_DAHDI_BRI_DCHANS |
13 | + int bytes2receive; | 15 | + int bytes2receive; |
@@ -19,29 +21,31 @@ | |||
19 | spinlock_t lock; | 21 | spinlock_t lock; |
20 | char name[40]; | 22 | char name[40]; |
21 | /* Specified by DAHDI */ | 23 | /* Specified by DAHDI */ |
22 | @@ -462,6 +469,9 @@ enum { | 24 | @@ -723,6 +730,9 @@ |
23 | DAHDI_FLAGBIT_LOOPED = 18, /*!< Loopback the receive data from the channel to the transmit */ | 25 | DAHDI_FLAGBIT_TXUNDERRUN = 22, /*!< Transmit underrun condition */ |
24 | DAHDI_FLAGBIT_MTP2 = 19, /*!< Repeats last message in buffer and also discards repeating messages sent to us */ | 26 | DAHDI_FLAGBIT_RXOVERRUN = 23, /*!< Receive overrun condition */ |
25 | DAHDI_FLAGBIT_HDLC56 = 20, /*!< Sets the given channel (if in HDLC mode) to use 56K HDLC instead of 64K */ | 27 | DAHDI_FLAGBIT_DEVFILE = 25, /*!< Channel has a sysfs dev file */ |
26 | +#if defined(CONFIG_DAHDI_BRI_DCHANS) | 28 | +#if defined(CONFIG_DAHDI_BRI_DCHANS) |
27 | + DAHDI_FLAGBIT_BRIDCHAN = 21, /*!< hardhdlc-like handling of the D channel */ | 29 | + DAHDI_FLAGBIT_BRIDCHAN = 26, /*!< hardhdlc-like handling of the D channel */ |
28 | +#endif | 30 | +#endif |
29 | }; | 31 | }; |
30 | 32 | ||
31 | /* map flagbits to flag masks */ | 33 | #ifdef CONFIG_DAHDI_NET |
32 | @@ -500,6 +510,7 @@ enum { | 34 | @@ -789,6 +799,7 @@ |
33 | #define DAHDI_FLAG_LOOPED DAHDI_FLAG(LOOPED) | 35 | #define DAHDI_FLAG_BUFEVENTS DAHDI_FLAG(BUFEVENTS) |
34 | #define DAHDI_FLAG_MTP2 DAHDI_FLAG(MTP2) | 36 | #define DAHDI_FLAG_TXUNDERRUN DAHDI_FLAG(TXUNDERRUN) |
35 | #define DAHDI_FLAG_HDLC56 DAHDI_FLAG(HDLC56) | 37 | #define DAHDI_FLAG_RXOVERRUN DAHDI_FLAG(RXOVERRUN) |
36 | +#define DAHDI_FLAG_BRIDCHAN DAHDI_FLAG(BRIDCHAN) | 38 | +#define DAHDI_FLAG_BRIDCHAN DAHDI_FLAG(BRIDCHAN) |
37 | 39 | ||
38 | struct dahdi_span { | 40 | struct file; |
39 | spinlock_t lock; | 41 | |
40 | --- a/include/dahdi/dahdi_config.h | 42 | Index: dahdi-linux-2.5.0/include/dahdi/dahdi_config.h |
41 | +++ b/include/dahdi/dahdi_config.h | 43 | =================================================================== |
42 | @@ -174,4 +174,10 @@ | 44 | --- dahdi-linux-2.5.0.orig/include/dahdi/dahdi_config.h 2011-01-05 17:52:03.000000000 +0200 |
45 | +++ dahdi-linux-2.5.0/include/dahdi/dahdi_config.h 2011-08-15 14:13:01.000000000 +0300 | ||
46 | @@ -195,4 +195,10 @@ | ||
43 | */ | 47 | */ |
44 | /* #define OPTIMIZE_CHANMUTE */ | 48 | /* #define CONFIG_DAHDI_MIRROR */ |
45 | 49 | ||
46 | +/* | 50 | +/* |
47 | + * Uncomment the following for BRI D channels | 51 | + * Uncomment the following for BRI D channels |
@@ -50,9 +54,11 @@ | |||
50 | +#define CONFIG_DAHDI_BRI_DCHANS | 54 | +#define CONFIG_DAHDI_BRI_DCHANS |
51 | + | 55 | + |
52 | #endif | 56 | #endif |
53 | --- a/drivers/dahdi/dahdi-base.c | 57 | Index: dahdi-linux-2.5.0/drivers/dahdi/dahdi-base.c |
54 | +++ b/drivers/dahdi/dahdi-base.c | 58 | =================================================================== |
55 | @@ -5907,11 +5907,40 @@ static inline void __dahdi_getbuf_chunk( | 59 | --- dahdi-linux-2.5.0.orig/drivers/dahdi/dahdi-base.c 2011-07-21 19:26:31.000000000 +0300 |
60 | +++ dahdi-linux-2.5.0/drivers/dahdi/dahdi-base.c 2011-08-15 14:13:01.000000000 +0300 | ||
61 | @@ -7224,11 +7224,40 @@ | ||
56 | *(txb++) = fasthdlc_tx_run_nocheck(&ms->txhdlc); | 62 | *(txb++) = fasthdlc_tx_run_nocheck(&ms->txhdlc); |
57 | } | 63 | } |
58 | bytes -= left; | 64 | bytes -= left; |
@@ -93,7 +99,7 @@ | |||
93 | } | 99 | } |
94 | /* Check buffer status */ | 100 | /* Check buffer status */ |
95 | if (ms->writeidx[ms->outwritebuf] >= ms->writen[ms->outwritebuf]) { | 101 | if (ms->writeidx[ms->outwritebuf] >= ms->writen[ms->outwritebuf]) { |
96 | @@ -5968,6 +5997,17 @@ out in the later versions, and is put ba | 102 | @@ -7285,6 +7314,17 @@ |
97 | /* Transmit a flag if this is an HDLC channel */ | 103 | /* Transmit a flag if this is an HDLC channel */ |
98 | if (ms->flags & DAHDI_FLAG_HDLC) | 104 | if (ms->flags & DAHDI_FLAG_HDLC) |
99 | fasthdlc_tx_frame_nocheck(&ms->txhdlc); | 105 | fasthdlc_tx_frame_nocheck(&ms->txhdlc); |
@@ -109,11 +115,11 @@ | |||
109 | + } | 115 | + } |
110 | +#endif | 116 | +#endif |
111 | #ifdef CONFIG_DAHDI_NET | 117 | #ifdef CONFIG_DAHDI_NET |
112 | if (ms->flags & DAHDI_FLAG_NETDEV) | 118 | if (dahdi_have_netdev(ms)) |
113 | netif_wake_queue(ztchan_to_dev(ms)); | 119 | netif_wake_queue(chan_to_netdev(ms)); |
114 | @@ -6028,6 +6068,12 @@ out in the later versions, and is put ba | 120 | @@ -7346,6 +7386,12 @@ |
115 | memset(txb, 0xFF, bytes); | ||
116 | } | 121 | } |
122 | needtxunderrun += bytes; | ||
117 | bytes = 0; | 123 | bytes = 0; |
118 | +#if defined(CONFIG_DAHDI_BRI_DCHANS) | 124 | +#if defined(CONFIG_DAHDI_BRI_DCHANS) |
119 | + } else if (test_bit(DAHDI_FLAGBIT_BRIDCHAN, &ms->flags)) { | 125 | + } else if (test_bit(DAHDI_FLAGBIT_BRIDCHAN, &ms->flags)) { |
@@ -123,8 +129,8 @@ | |||
123 | +#endif | 129 | +#endif |
124 | } else { | 130 | } else { |
125 | memset(txb, DAHDI_LIN2X(0, ms), bytes); /* Lastly we use silence on telephony channels */ | 131 | memset(txb, DAHDI_LIN2X(0, ms), bytes); /* Lastly we use silence on telephony channels */ |
126 | bytes = 0; | 132 | needtxunderrun += bytes; |
127 | @@ -6840,6 +6886,14 @@ static inline void __putbuf_chunk(struct | 133 | @@ -8267,6 +8313,14 @@ |
128 | int res; | 134 | int res; |
129 | int left, x; | 135 | int left, x; |
130 | 136 | ||
@@ -139,7 +145,7 @@ | |||
139 | while(bytes) { | 145 | while(bytes) { |
140 | #if defined(CONFIG_DAHDI_NET) || defined(CONFIG_DAHDI_PPP) | 146 | #if defined(CONFIG_DAHDI_NET) || defined(CONFIG_DAHDI_PPP) |
141 | skb = NULL; | 147 | skb = NULL; |
142 | @@ -6897,6 +6951,19 @@ static inline void __putbuf_chunk(struct | 148 | @@ -8324,6 +8378,19 @@ |
143 | } | 149 | } |
144 | } | 150 | } |
145 | } | 151 | } |
diff --git a/main/dahdi-linux-grsec/zaphfc-dahdi-2.5.0.patch b/main/dahdi-linux-grsec/zaphfc-dahdi-2.5.0.patch new file mode 100644 index 0000000000..37a1e76ba8 --- /dev/null +++ b/main/dahdi-linux-grsec/zaphfc-dahdi-2.5.0.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | Index: dahdi-linux-2.5.0/drivers/dahdi/zaphfc.c | ||
2 | =================================================================== | ||
3 | --- dahdi-linux-2.5.0.orig/drivers/dahdi/zaphfc.c 2011-08-15 14:29:51.000000000 +0300 | ||
4 | +++ dahdi-linux-2.5.0/drivers/dahdi/zaphfc.c 2011-08-15 14:30:11.000000000 +0300 | ||
5 | @@ -616,7 +616,7 @@ | ||
6 | return 0; | ||
7 | } | ||
8 | |||
9 | -static int zthfc_startup(struct dahdi_span *span) { | ||
10 | +static int zthfc_startup(struct file *file, struct dahdi_span *span) { | ||
11 | struct dahdi_hfc *zthfc = container_of(span, struct dahdi_hfc, span); | ||
12 | struct hfc_card *hfctmp = zthfc->card; | ||
13 | int alreadyrunning; | ||
14 | @@ -653,12 +653,12 @@ | ||
15 | return 0; | ||
16 | } | ||
17 | |||
18 | -static int zthfc_chanconfig(struct dahdi_chan *chan, int sigtype) { | ||
19 | +static int zthfc_chanconfig(struct file *file, struct dahdi_chan *chan, int sigtype) { | ||
20 | // printk(KERN_CRIT "chan_config sigtype=%d\n", sigtype); | ||
21 | return 0; | ||
22 | } | ||
23 | |||
24 | -static int zthfc_spanconfig(struct dahdi_span *span, struct dahdi_lineconfig *lc) { | ||
25 | +static int zthfc_spanconfig(struct file *file, struct dahdi_span *span, struct dahdi_lineconfig *lc) { | ||
26 | span->lineconfig = lc->lineconfig; | ||
27 | return 0; | ||
28 | } | ||
29 | @@ -699,7 +699,6 @@ | ||
30 | zthfc->span.deflaw = DAHDI_LAW_ALAW; | ||
31 | zthfc->span.linecompat = DAHDI_CONFIG_AMI | DAHDI_CONFIG_CCS; // <--- this is really BS | ||
32 | zthfc->span.offset = 0; | ||
33 | - init_waitqueue_head(&zthfc->span.maintq); | ||
34 | |||
35 | for (i = 0; i < zthfc->span.channels; i++) { | ||
36 | memset(&(zthfc->chans[i]), 0x0, sizeof(struct dahdi_chan)); | ||
diff --git a/main/dahdi-linux-vserver/APKBUILD b/main/dahdi-linux-vserver/APKBUILD index 8b1611b279..6e52ce9ff8 100644 --- a/main/dahdi-linux-vserver/APKBUILD +++ b/main/dahdi-linux-vserver/APKBUILD | |||
@@ -15,8 +15,8 @@ _realname=dahdi-linux | |||
15 | pkgname=${_realname}-${_flavor} | 15 | pkgname=${_realname}-${_flavor} |
16 | pkgver=$pkgver | 16 | pkgver=$pkgver |
17 | # when bumping _dahdiver we *must* bump _mypkgrel | 17 | # when bumping _dahdiver we *must* bump _mypkgrel |
18 | _dahdiver=2.4.1.2 | 18 | _dahdiver=2.5.0 |
19 | _mypkgrel=0 | 19 | _mypkgrel=1 |
20 | pkgrel=$(( $_kpkgrel + $_mypkgrel )) | 20 | pkgrel=$(( $_kpkgrel + $_mypkgrel )) |
21 | pkgdesc="Digium Asterisk Hardware Device Interface drivers $_dahdiver" | 21 | pkgdesc="Digium Asterisk Hardware Device Interface drivers $_dahdiver" |
22 | url="http://www.asterisk.org" | 22 | url="http://www.asterisk.org" |
@@ -74,9 +74,9 @@ dev() { | |||
74 | ln -s /usr/include "$dir"/include | 74 | ln -s /usr/include "$dir"/include |
75 | } | 75 | } |
76 | 76 | ||
77 | md5sums="81b232a47693f4adac90c569e446f88f dahdi-linux-2.4.1.2.tar.gz | 77 | md5sums="449f6591ccedb68937b5b30cbd37cea3 dahdi-linux-2.5.0.tar.gz |
78 | c78fb8d80f9efdffd950297c88ff9273 dahdi-depmod.patch | 78 | c78fb8d80f9efdffd950297c88ff9273 dahdi-depmod.patch |
79 | 4b41a82ff390ac64c08092c5a3eab6a8 dahdi-bri_dchan.patch | 79 | 3bb419ac598534cd4ad5248f23656001 dahdi-bri_dchan.patch |
80 | 3be420539f5e2e2b94a1bf3d711ec630 dahdi-zaphfc.patch | 80 | a822c092f0548cd13f5e8d8cba053af6 dahdi-zaphfc.patch |
81 | 291c5c44c86ab02443a742415461ddca zaphfc-dahdi-flortz.diff | 81 | 291c5c44c86ab02443a742415461ddca zaphfc-dahdi-flortz.diff |
82 | 0fdcd8c8c93bc1fe33c0af12b6cc6b05 zaphfc-dahdi-2.4.0.patch" | 82 | 0fdcd8c8c93bc1fe33c0af12b6cc6b05 zaphfc-dahdi-2.4.0.patch" |
diff --git a/main/dahdi-linux-vserver/dahdi-2.5.0-bri-fixes.patch b/main/dahdi-linux-vserver/dahdi-2.5.0-bri-fixes.patch new file mode 100644 index 0000000000..01dcf646fb --- /dev/null +++ b/main/dahdi-linux-vserver/dahdi-2.5.0-bri-fixes.patch | |||
@@ -0,0 +1,327 @@ | |||
1 | Index: dahdi-linux-2.5.0/drivers/dahdi/xpp/card_bri.c | ||
2 | =================================================================== | ||
3 | --- dahdi-linux-2.5.0.orig/drivers/dahdi/xpp/card_bri.c 2011-08-15 14:42:29.000000000 +0300 | ||
4 | +++ dahdi-linux-2.5.0/drivers/dahdi/xpp/card_bri.c 2011-08-15 14:51:37.000000000 +0300 | ||
5 | @@ -274,7 +274,6 @@ | ||
6 | int frame_begin; | ||
7 | |||
8 | priv = xpd->priv; | ||
9 | - BUG_ON(!priv); | ||
10 | if(transmit) { | ||
11 | direction = "TX"; | ||
12 | frame_begin = priv->txframe_begin; | ||
13 | @@ -312,9 +311,7 @@ | ||
14 | { | ||
15 | struct BRI_priv_data *priv; | ||
16 | |||
17 | - BUG_ON(!xpd); | ||
18 | priv = xpd->priv; | ||
19 | - BUG_ON(!priv); | ||
20 | if(priv->dchan_alive == up) | ||
21 | return; | ||
22 | if(up) { | ||
23 | @@ -332,9 +329,7 @@ | ||
24 | { | ||
25 | struct BRI_priv_data *priv; | ||
26 | |||
27 | - BUG_ON(!xpd); | ||
28 | priv = xpd->priv; | ||
29 | - BUG_ON(!priv); | ||
30 | if(priv->layer1_up == up) | ||
31 | return; | ||
32 | priv->layer1_up = up; | ||
33 | @@ -348,9 +343,7 @@ | ||
34 | struct BRI_priv_data *priv; | ||
35 | byte curr_state; | ||
36 | |||
37 | - BUG_ON(!xpd); | ||
38 | priv = xpd->priv; | ||
39 | - BUG_ON(!priv); | ||
40 | curr_state = priv->state_register.bits.v_su_sta; | ||
41 | XPD_DBG(SIGNAL, xpd, "%s\n", (on)?"ON":"OFF"); | ||
42 | if(on) { | ||
43 | @@ -391,9 +384,7 @@ | ||
44 | struct BRI_priv_data *priv; | ||
45 | byte curr_state; | ||
46 | |||
47 | - BUG_ON(!xpd); | ||
48 | priv = xpd->priv; | ||
49 | - BUG_ON(!priv); | ||
50 | curr_state = priv->state_register.bits.v_su_sta; | ||
51 | XPD_DBG(SIGNAL, xpd, "%s\n", (on)?"ON":"OFF"); | ||
52 | if(on) { | ||
53 | @@ -443,7 +434,6 @@ | ||
54 | struct BRI_priv_data *priv; | ||
55 | |||
56 | priv = xpd->priv; | ||
57 | - BUG_ON(!priv); | ||
58 | #ifdef CONFIG_DAHDI_BRI_DCHANS | ||
59 | if(debug & DBG_COMMANDS) | ||
60 | dump_hex_buf(xpd, "D-Chan(abort) RX: dchan_rbuf", | ||
61 | @@ -460,7 +450,6 @@ | ||
62 | byte status; | ||
63 | |||
64 | priv = xpd->priv; | ||
65 | - BUG_ON(!priv); | ||
66 | #ifdef CONFIG_DAHDI_BRI_DCHANS | ||
67 | if(priv->dchan_r_idx < 4) { | ||
68 | XPD_NOTICE(xpd, "D-Chan RX short frame (dchan_r_idx=%d)\n", | ||
69 | @@ -503,7 +492,6 @@ | ||
70 | int idx; | ||
71 | |||
72 | priv = xpd->priv; | ||
73 | - BUG_ON(!priv); | ||
74 | dchan_buf = dchan->readchunk; | ||
75 | idx = priv->dchan_r_idx; | ||
76 | if(idx + len >= DCHAN_BUFSIZE) { | ||
77 | @@ -527,7 +515,6 @@ | ||
78 | struct BRI_priv_data *priv; | ||
79 | |||
80 | priv = xpd->priv; | ||
81 | - BUG_ON(!priv); | ||
82 | #ifdef CONFIG_DAHDI_BRI_DCHANS | ||
83 | dchan->bytes2receive = priv->dchan_r_idx - 1; | ||
84 | dchan->eofrx = 1; | ||
85 | @@ -556,10 +543,7 @@ | ||
86 | return 0; | ||
87 | if(!SPAN_REGISTERED(xpd)) /* Nowhere to copy data */ | ||
88 | return 0; | ||
89 | - BUG_ON(!xpd); | ||
90 | priv = xpd->priv; | ||
91 | - BUG_ON(!priv); | ||
92 | - xbus = xpd->xbus; | ||
93 | dchan = XPD_CHAN(xpd, 2); | ||
94 | if(!IS_OFFHOOK(xpd, 2)) { /* D-chan is used? */ | ||
95 | static int rate_limit; | ||
96 | @@ -629,9 +613,7 @@ | ||
97 | return 0; | ||
98 | if(!SPAN_REGISTERED(xpd)) /* Nowhere to copy data */ | ||
99 | return 0; | ||
100 | - BUG_ON(!xpd); | ||
101 | priv = xpd->priv; | ||
102 | - BUG_ON(!priv); | ||
103 | dchan = XPD_CHAN(xpd, 2); | ||
104 | if(!IS_OFFHOOK(xpd, 2)) { /* D-chan is used? */ | ||
105 | static int rate_limit; | ||
106 | @@ -677,7 +659,6 @@ | ||
107 | struct BRI_priv_data *priv; | ||
108 | |||
109 | priv = xpd->priv; | ||
110 | - BUG_ON(!priv); | ||
111 | dchan = XPD_CHAN(xpd, 2); | ||
112 | if (dchan == chan) { | ||
113 | atomic_inc(&priv->hdlc_pending); | ||
114 | @@ -716,7 +697,6 @@ | ||
115 | int ret; | ||
116 | |||
117 | priv = xpd->priv; | ||
118 | - BUG_ON(!priv); | ||
119 | #ifndef CONFIG_DAHDI_BRI_DCHANS | ||
120 | if(atomic_read(&priv->hdlc_pending) == 0) | ||
121 | return 0; | ||
122 | @@ -769,7 +749,6 @@ | ||
123 | { | ||
124 | struct BRI_priv_data *priv; | ||
125 | |||
126 | - BUG_ON(!xpd); | ||
127 | priv = xpd->priv; | ||
128 | XPD_DBG(PROC, xpd, "\n"); | ||
129 | #ifdef CONFIG_PROC_FS | ||
130 | @@ -784,7 +763,6 @@ | ||
131 | { | ||
132 | struct BRI_priv_data *priv; | ||
133 | |||
134 | - BUG_ON(!xpd); | ||
135 | priv = xpd->priv; | ||
136 | XPD_DBG(PROC, xpd, "\n"); | ||
137 | #ifdef CONFIG_PROC_FS | ||
138 | @@ -828,7 +806,6 @@ | ||
139 | { | ||
140 | struct BRI_priv_data *priv; | ||
141 | |||
142 | - BUG_ON(!xpd); | ||
143 | XPD_DBG(GENERAL, xpd, "\n"); | ||
144 | priv = xpd->priv; | ||
145 | DO_LED(xpd, GREEN_LED, BRI_LED_OFF); | ||
146 | @@ -841,7 +818,6 @@ | ||
147 | |||
148 | static int BRI_card_remove(xbus_t *xbus, xpd_t *xpd) | ||
149 | { | ||
150 | - BUG_ON(!xpd); | ||
151 | XPD_DBG(GENERAL, xpd, "\n"); | ||
152 | bri_proc_remove(xbus, xpd); | ||
153 | return 0; | ||
154 | @@ -877,10 +853,8 @@ | ||
155 | struct BRI_priv_data *priv; | ||
156 | int i; | ||
157 | |||
158 | - BUG_ON(!xpd); | ||
159 | xbus = xpd->xbus; | ||
160 | priv = xpd->priv; | ||
161 | - BUG_ON(!xbus); | ||
162 | XPD_DBG(GENERAL, xpd, "%s\n", (on)?"on":"off"); | ||
163 | if(!on) { | ||
164 | /* Nothing to do yet */ | ||
165 | @@ -927,11 +901,6 @@ | ||
166 | |||
167 | static int BRI_card_dahdi_postregistration(xpd_t *xpd, bool on) | ||
168 | { | ||
169 | - xbus_t *xbus; | ||
170 | - | ||
171 | - BUG_ON(!xpd); | ||
172 | - xbus = xpd->xbus; | ||
173 | - BUG_ON(!xbus); | ||
174 | XPD_DBG(GENERAL, xpd, "%s\n", (on)?"on":"off"); | ||
175 | return(0); | ||
176 | } | ||
177 | @@ -956,7 +925,6 @@ | ||
178 | int other_led; | ||
179 | int mod; | ||
180 | |||
181 | - BUG_ON(!xpd); | ||
182 | if(IS_NT(xpd)) { | ||
183 | which_led = RED_LED; | ||
184 | other_led = GREEN_LED; | ||
185 | @@ -965,7 +933,6 @@ | ||
186 | other_led = RED_LED; | ||
187 | } | ||
188 | priv = xpd->priv; | ||
189 | - BUG_ON(!priv); | ||
190 | timer_count = xpd->timer_count; | ||
191 | if(xpd->blink_mode) { | ||
192 | if((timer_count % DEFAULT_LED_PERIOD) == 0) { | ||
193 | @@ -1014,9 +981,7 @@ | ||
194 | { | ||
195 | struct BRI_priv_data *priv; | ||
196 | |||
197 | - BUG_ON(!xpd); | ||
198 | priv = xpd->priv; | ||
199 | - BUG_ON(!priv); | ||
200 | if(IS_NT(xpd)) { | ||
201 | if (priv->t1 > HFC_TIMER_OFF) { | ||
202 | if (--priv->t1 == 0) { | ||
203 | @@ -1053,9 +1018,7 @@ | ||
204 | { | ||
205 | struct BRI_priv_data *priv; | ||
206 | |||
207 | - BUG_ON(!xpd); | ||
208 | priv = xpd->priv; | ||
209 | - BUG_ON(!priv); | ||
210 | if(!priv->initialized || !xbus->self_ticking) | ||
211 | return 0; | ||
212 | if(poll_interval != 0 && (priv->tick_counter % poll_interval) == 0) { | ||
213 | @@ -1111,7 +1074,6 @@ | ||
214 | |||
215 | static int BRI_card_ioctl(xpd_t *xpd, int pos, unsigned int cmd, unsigned long arg) | ||
216 | { | ||
217 | - BUG_ON(!xpd); | ||
218 | if(!XBUS_IS(xpd->xbus, READY)) | ||
219 | return -ENODEV; | ||
220 | switch (cmd) { | ||
221 | @@ -1131,7 +1093,6 @@ | ||
222 | |||
223 | static int BRI_card_open(xpd_t *xpd, lineno_t pos) | ||
224 | { | ||
225 | - BUG_ON(!xpd); | ||
226 | if(pos == 2) { | ||
227 | LINE_DBG(SIGNAL, xpd, pos, "OFFHOOK the whole span\n"); | ||
228 | BIT_SET(PHONEDEV(xpd).offhook_state, 0); | ||
229 | @@ -1230,12 +1191,8 @@ | ||
230 | { | ||
231 | struct phonedev *phonedev = container_of(span, struct phonedev, span); | ||
232 | xpd_t *xpd = container_of(phonedev, struct xpd, phonedev); | ||
233 | - struct BRI_priv_data *priv; | ||
234 | struct dahdi_chan *dchan; | ||
235 | |||
236 | - BUG_ON(!xpd); | ||
237 | - priv = xpd->priv; | ||
238 | - BUG_ON(!priv); | ||
239 | if(!XBUS_IS(xpd->xbus, READY)) { | ||
240 | XPD_DBG(GENERAL, xpd, "Startup called by dahdi. No Hardware. Ignored\n"); | ||
241 | return -ENODEV; | ||
242 | @@ -1267,11 +1224,7 @@ | ||
243 | { | ||
244 | struct phonedev *phonedev = container_of(span, struct phonedev, span); | ||
245 | xpd_t *xpd = container_of(phonedev, struct xpd, phonedev); | ||
246 | - struct BRI_priv_data *priv; | ||
247 | |||
248 | - BUG_ON(!xpd); | ||
249 | - priv = xpd->priv; | ||
250 | - BUG_ON(!priv); | ||
251 | if(!XBUS_IS(xpd->xbus, READY)) { | ||
252 | XPD_DBG(GENERAL, xpd, "Shutdown called by dahdi. No Hardware. Ignored\n"); | ||
253 | return -ENODEV; | ||
254 | @@ -1292,7 +1245,6 @@ | ||
255 | xpd_t *main_xpd; | ||
256 | unsigned long flags; | ||
257 | |||
258 | - BUG_ON(!xpd); | ||
259 | main_xpd = xpd_byaddr(xpd->xbus, xpd->addr.unit, 0); | ||
260 | if(!main_xpd) { | ||
261 | XPD_DBG(DEVICES, xpd, "Unit 0 is already gone. Ignore request\n"); | ||
262 | @@ -1350,8 +1302,6 @@ | ||
263 | xpp_line_t wanted_lines; | ||
264 | |||
265 | |||
266 | - BUG_ON(!xpd); | ||
267 | - BUG_ON(!pack); | ||
268 | pcm = RPACKET_FIELD(pack, GLOBAL, PCM_WRITE, pcm); | ||
269 | for(subunit = 0; subunit < MAX_SUBUNIT; subunit++) { | ||
270 | xpd_t *tmp_xpd; | ||
271 | @@ -1435,12 +1385,8 @@ | ||
272 | |||
273 | static int BRI_echocancel_setmask(xpd_t *xpd, xpp_line_t ec_mask) | ||
274 | { | ||
275 | - struct BRI_priv_data *priv; | ||
276 | int i; | ||
277 | |||
278 | - BUG_ON(!xpd); | ||
279 | - priv = xpd->priv; | ||
280 | - BUG_ON(!priv); | ||
281 | XPD_DBG(GENERAL, xpd, "0x%8X\n", ec_mask); | ||
282 | if (!ECHOOPS(xpd->xbus)) { | ||
283 | XPD_DBG(GENERAL, xpd, | ||
284 | @@ -1466,9 +1412,7 @@ | ||
285 | struct bri_leds *bri_leds; | ||
286 | struct BRI_priv_data *priv; | ||
287 | |||
288 | - BUG_ON(!xbus); | ||
289 | priv = xpd->priv; | ||
290 | - BUG_ON(!priv); | ||
291 | XPD_DBG(LEDS, xpd, "%s -> %d\n", | ||
292 | (which_led)?"RED":"GREEN", | ||
293 | to_led_state); | ||
294 | @@ -1507,9 +1451,7 @@ | ||
295 | struct BRI_priv_data *priv; | ||
296 | su_rd_sta_t new_state; | ||
297 | |||
298 | - BUG_ON(!xpd); | ||
299 | priv = xpd->priv; | ||
300 | - BUG_ON(!priv); | ||
301 | if(!priv->initialized) { | ||
302 | XPD_ERR(xpd, "%s called on uninitialized AB\n", __FUNCTION__); | ||
303 | return; | ||
304 | @@ -1621,7 +1563,6 @@ | ||
305 | } | ||
306 | spin_lock_irqsave(&xpd->lock, flags); | ||
307 | priv = xpd->priv; | ||
308 | - BUG_ON(!priv); | ||
309 | if(REG_FIELD(info, do_subreg)) { | ||
310 | XPD_DBG(REGS, xpd, "RI %02X %02X %02X\n", | ||
311 | REG_FIELD(info, regnum), REG_FIELD(info, subreg), REG_FIELD(info, data_low)); | ||
312 | @@ -1665,7 +1606,6 @@ | ||
313 | { | ||
314 | struct BRI_priv_data *priv; | ||
315 | |||
316 | - BUG_ON(!xpd); | ||
317 | priv = xpd->priv; | ||
318 | XPD_DBG(GENERAL, xpd, "%s\n", (on)?"ON":"OFF"); | ||
319 | if(on) { | ||
320 | @@ -1745,7 +1685,6 @@ | ||
321 | return -ENODEV; | ||
322 | spin_lock_irqsave(&xpd->lock, flags); | ||
323 | priv = xpd->priv; | ||
324 | - BUG_ON(!priv); | ||
325 | len += sprintf(page + len, "%05d Layer 1: ", priv->poll_counter); | ||
326 | if(priv->reg30_good) { | ||
327 | len += sprintf(page + len, "%-5s ", (priv->layer1_up) ? "UP" : "DOWN"); | ||
diff --git a/main/dahdi-linux-vserver/dahdi-bri_dchan.patch b/main/dahdi-linux-vserver/dahdi-bri_dchan.patch index d7a3fe859b..8d2ba97fd1 100644 --- a/main/dahdi-linux-vserver/dahdi-bri_dchan.patch +++ b/main/dahdi-linux-vserver/dahdi-bri_dchan.patch | |||
@@ -3,11 +3,13 @@ | |||
3 | # Zaptel expects it as a standard channel with 1000 samples | 3 | # Zaptel expects it as a standard channel with 1000 samples |
4 | # per second. | 4 | # per second. |
5 | 5 | ||
6 | --- a/include/dahdi/kernel.h | 6 | Index: dahdi-linux-2.5.0/include/dahdi/kernel.h |
7 | +++ b/include/dahdi/kernel.h | 7 | =================================================================== |
8 | @@ -132,6 +132,13 @@ struct dahdi_chan { | 8 | --- dahdi-linux-2.5.0.orig/include/dahdi/kernel.h 2011-06-29 18:32:40.000000000 +0300 |
9 | int do_ppp_error; | 9 | +++ dahdi-linux-2.5.0/include/dahdi/kernel.h 2011-08-15 14:14:26.000000000 +0300 |
10 | struct sk_buff_head ppp_rq; | 10 | @@ -413,6 +413,13 @@ |
11 | int statcount; | ||
12 | int lastnumbufs; | ||
11 | #endif | 13 | #endif |
12 | +#ifdef CONFIG_DAHDI_BRI_DCHANS | 14 | +#ifdef CONFIG_DAHDI_BRI_DCHANS |
13 | + int bytes2receive; | 15 | + int bytes2receive; |
@@ -19,29 +21,31 @@ | |||
19 | spinlock_t lock; | 21 | spinlock_t lock; |
20 | char name[40]; | 22 | char name[40]; |
21 | /* Specified by DAHDI */ | 23 | /* Specified by DAHDI */ |
22 | @@ -462,6 +469,9 @@ enum { | 24 | @@ -723,6 +730,9 @@ |
23 | DAHDI_FLAGBIT_LOOPED = 18, /*!< Loopback the receive data from the channel to the transmit */ | 25 | DAHDI_FLAGBIT_TXUNDERRUN = 22, /*!< Transmit underrun condition */ |
24 | DAHDI_FLAGBIT_MTP2 = 19, /*!< Repeats last message in buffer and also discards repeating messages sent to us */ | 26 | DAHDI_FLAGBIT_RXOVERRUN = 23, /*!< Receive overrun condition */ |
25 | DAHDI_FLAGBIT_HDLC56 = 20, /*!< Sets the given channel (if in HDLC mode) to use 56K HDLC instead of 64K */ | 27 | DAHDI_FLAGBIT_DEVFILE = 25, /*!< Channel has a sysfs dev file */ |
26 | +#if defined(CONFIG_DAHDI_BRI_DCHANS) | 28 | +#if defined(CONFIG_DAHDI_BRI_DCHANS) |
27 | + DAHDI_FLAGBIT_BRIDCHAN = 21, /*!< hardhdlc-like handling of the D channel */ | 29 | + DAHDI_FLAGBIT_BRIDCHAN = 26, /*!< hardhdlc-like handling of the D channel */ |
28 | +#endif | 30 | +#endif |
29 | }; | 31 | }; |
30 | 32 | ||
31 | /* map flagbits to flag masks */ | 33 | #ifdef CONFIG_DAHDI_NET |
32 | @@ -500,6 +510,7 @@ enum { | 34 | @@ -789,6 +799,7 @@ |
33 | #define DAHDI_FLAG_LOOPED DAHDI_FLAG(LOOPED) | 35 | #define DAHDI_FLAG_BUFEVENTS DAHDI_FLAG(BUFEVENTS) |
34 | #define DAHDI_FLAG_MTP2 DAHDI_FLAG(MTP2) | 36 | #define DAHDI_FLAG_TXUNDERRUN DAHDI_FLAG(TXUNDERRUN) |
35 | #define DAHDI_FLAG_HDLC56 DAHDI_FLAG(HDLC56) | 37 | #define DAHDI_FLAG_RXOVERRUN DAHDI_FLAG(RXOVERRUN) |
36 | +#define DAHDI_FLAG_BRIDCHAN DAHDI_FLAG(BRIDCHAN) | 38 | +#define DAHDI_FLAG_BRIDCHAN DAHDI_FLAG(BRIDCHAN) |
37 | 39 | ||
38 | struct dahdi_span { | 40 | struct file; |
39 | spinlock_t lock; | 41 | |
40 | --- a/include/dahdi/dahdi_config.h | 42 | Index: dahdi-linux-2.5.0/include/dahdi/dahdi_config.h |
41 | +++ b/include/dahdi/dahdi_config.h | 43 | =================================================================== |
42 | @@ -174,4 +174,10 @@ | 44 | --- dahdi-linux-2.5.0.orig/include/dahdi/dahdi_config.h 2011-01-05 17:52:03.000000000 +0200 |
45 | +++ dahdi-linux-2.5.0/include/dahdi/dahdi_config.h 2011-08-15 14:13:01.000000000 +0300 | ||
46 | @@ -195,4 +195,10 @@ | ||
43 | */ | 47 | */ |
44 | /* #define OPTIMIZE_CHANMUTE */ | 48 | /* #define CONFIG_DAHDI_MIRROR */ |
45 | 49 | ||
46 | +/* | 50 | +/* |
47 | + * Uncomment the following for BRI D channels | 51 | + * Uncomment the following for BRI D channels |
@@ -50,9 +54,11 @@ | |||
50 | +#define CONFIG_DAHDI_BRI_DCHANS | 54 | +#define CONFIG_DAHDI_BRI_DCHANS |
51 | + | 55 | + |
52 | #endif | 56 | #endif |
53 | --- a/drivers/dahdi/dahdi-base.c | 57 | Index: dahdi-linux-2.5.0/drivers/dahdi/dahdi-base.c |
54 | +++ b/drivers/dahdi/dahdi-base.c | 58 | =================================================================== |
55 | @@ -5907,11 +5907,40 @@ static inline void __dahdi_getbuf_chunk( | 59 | --- dahdi-linux-2.5.0.orig/drivers/dahdi/dahdi-base.c 2011-07-21 19:26:31.000000000 +0300 |
60 | +++ dahdi-linux-2.5.0/drivers/dahdi/dahdi-base.c 2011-08-15 14:13:01.000000000 +0300 | ||
61 | @@ -7224,11 +7224,40 @@ | ||
56 | *(txb++) = fasthdlc_tx_run_nocheck(&ms->txhdlc); | 62 | *(txb++) = fasthdlc_tx_run_nocheck(&ms->txhdlc); |
57 | } | 63 | } |
58 | bytes -= left; | 64 | bytes -= left; |
@@ -93,7 +99,7 @@ | |||
93 | } | 99 | } |
94 | /* Check buffer status */ | 100 | /* Check buffer status */ |
95 | if (ms->writeidx[ms->outwritebuf] >= ms->writen[ms->outwritebuf]) { | 101 | if (ms->writeidx[ms->outwritebuf] >= ms->writen[ms->outwritebuf]) { |
96 | @@ -5968,6 +5997,17 @@ out in the later versions, and is put ba | 102 | @@ -7285,6 +7314,17 @@ |
97 | /* Transmit a flag if this is an HDLC channel */ | 103 | /* Transmit a flag if this is an HDLC channel */ |
98 | if (ms->flags & DAHDI_FLAG_HDLC) | 104 | if (ms->flags & DAHDI_FLAG_HDLC) |
99 | fasthdlc_tx_frame_nocheck(&ms->txhdlc); | 105 | fasthdlc_tx_frame_nocheck(&ms->txhdlc); |
@@ -109,11 +115,11 @@ | |||
109 | + } | 115 | + } |
110 | +#endif | 116 | +#endif |
111 | #ifdef CONFIG_DAHDI_NET | 117 | #ifdef CONFIG_DAHDI_NET |
112 | if (ms->flags & DAHDI_FLAG_NETDEV) | 118 | if (dahdi_have_netdev(ms)) |
113 | netif_wake_queue(ztchan_to_dev(ms)); | 119 | netif_wake_queue(chan_to_netdev(ms)); |
114 | @@ -6028,6 +6068,12 @@ out in the later versions, and is put ba | 120 | @@ -7346,6 +7386,12 @@ |
115 | memset(txb, 0xFF, bytes); | ||
116 | } | 121 | } |
122 | needtxunderrun += bytes; | ||
117 | bytes = 0; | 123 | bytes = 0; |
118 | +#if defined(CONFIG_DAHDI_BRI_DCHANS) | 124 | +#if defined(CONFIG_DAHDI_BRI_DCHANS) |
119 | + } else if (test_bit(DAHDI_FLAGBIT_BRIDCHAN, &ms->flags)) { | 125 | + } else if (test_bit(DAHDI_FLAGBIT_BRIDCHAN, &ms->flags)) { |
@@ -123,8 +129,8 @@ | |||
123 | +#endif | 129 | +#endif |
124 | } else { | 130 | } else { |
125 | memset(txb, DAHDI_LIN2X(0, ms), bytes); /* Lastly we use silence on telephony channels */ | 131 | memset(txb, DAHDI_LIN2X(0, ms), bytes); /* Lastly we use silence on telephony channels */ |
126 | bytes = 0; | 132 | needtxunderrun += bytes; |
127 | @@ -6840,6 +6886,14 @@ static inline void __putbuf_chunk(struct | 133 | @@ -8267,6 +8313,14 @@ |
128 | int res; | 134 | int res; |
129 | int left, x; | 135 | int left, x; |
130 | 136 | ||
@@ -139,7 +145,7 @@ | |||
139 | while(bytes) { | 145 | while(bytes) { |
140 | #if defined(CONFIG_DAHDI_NET) || defined(CONFIG_DAHDI_PPP) | 146 | #if defined(CONFIG_DAHDI_NET) || defined(CONFIG_DAHDI_PPP) |
141 | skb = NULL; | 147 | skb = NULL; |
142 | @@ -6897,6 +6951,19 @@ static inline void __putbuf_chunk(struct | 148 | @@ -8324,6 +8378,19 @@ |
143 | } | 149 | } |
144 | } | 150 | } |
145 | } | 151 | } |
diff --git a/main/dahdi-linux-vserver/dahdi-zaphfc.patch b/main/dahdi-linux-vserver/dahdi-zaphfc.patch index 735d1c5a3f..b711c07ff9 100644 --- a/main/dahdi-linux-vserver/dahdi-zaphfc.patch +++ b/main/dahdi-linux-vserver/dahdi-zaphfc.patch | |||
@@ -2,7 +2,7 @@ Index: dahdi-linux-2.1.0/drivers/dahdi/zaphfc.c | |||
2 | =================================================================== | 2 | =================================================================== |
3 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 3 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 |
4 | +++ dahdi-linux-2.1.0/drivers/dahdi/zaphfc.c 2008-12-10 12:46:14.000000000 +0200 | 4 | +++ dahdi-linux-2.1.0/drivers/dahdi/zaphfc.c 2008-12-10 12:46:14.000000000 +0200 |
5 | @@ -0,0 +1,1130 @@ | 5 | @@ -0,0 +1,1129 @@ |
6 | +/* | 6 | +/* |
7 | + * zaphfc.c - Zaptel driver for HFC-S PCI A based ISDN BRI cards | 7 | + * zaphfc.c - Zaptel driver for HFC-S PCI A based ISDN BRI cards |
8 | + * | 8 | + * |
@@ -29,7 +29,6 @@ Index: dahdi-linux-2.1.0/drivers/dahdi/zaphfc.c | |||
29 | +#include <linux/init.h> | 29 | +#include <linux/init.h> |
30 | +#include <linux/interrupt.h> | 30 | +#include <linux/interrupt.h> |
31 | +#include <linux/delay.h> | 31 | +#include <linux/delay.h> |
32 | +#include <linux/sched.h> | ||
33 | +#include <dahdi/kernel.h> | 32 | +#include <dahdi/kernel.h> |
34 | +#include "zaphfc.h" | 33 | +#include "zaphfc.h" |
35 | + | 34 | + |
diff --git a/main/dahdi-linux-vserver/zaphfc-dahdi-2.5.0.patch b/main/dahdi-linux-vserver/zaphfc-dahdi-2.5.0.patch new file mode 100644 index 0000000000..37a1e76ba8 --- /dev/null +++ b/main/dahdi-linux-vserver/zaphfc-dahdi-2.5.0.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | Index: dahdi-linux-2.5.0/drivers/dahdi/zaphfc.c | ||
2 | =================================================================== | ||
3 | --- dahdi-linux-2.5.0.orig/drivers/dahdi/zaphfc.c 2011-08-15 14:29:51.000000000 +0300 | ||
4 | +++ dahdi-linux-2.5.0/drivers/dahdi/zaphfc.c 2011-08-15 14:30:11.000000000 +0300 | ||
5 | @@ -616,7 +616,7 @@ | ||
6 | return 0; | ||
7 | } | ||
8 | |||
9 | -static int zthfc_startup(struct dahdi_span *span) { | ||
10 | +static int zthfc_startup(struct file *file, struct dahdi_span *span) { | ||
11 | struct dahdi_hfc *zthfc = container_of(span, struct dahdi_hfc, span); | ||
12 | struct hfc_card *hfctmp = zthfc->card; | ||
13 | int alreadyrunning; | ||
14 | @@ -653,12 +653,12 @@ | ||
15 | return 0; | ||
16 | } | ||
17 | |||
18 | -static int zthfc_chanconfig(struct dahdi_chan *chan, int sigtype) { | ||
19 | +static int zthfc_chanconfig(struct file *file, struct dahdi_chan *chan, int sigtype) { | ||
20 | // printk(KERN_CRIT "chan_config sigtype=%d\n", sigtype); | ||
21 | return 0; | ||
22 | } | ||
23 | |||
24 | -static int zthfc_spanconfig(struct dahdi_span *span, struct dahdi_lineconfig *lc) { | ||
25 | +static int zthfc_spanconfig(struct file *file, struct dahdi_span *span, struct dahdi_lineconfig *lc) { | ||
26 | span->lineconfig = lc->lineconfig; | ||
27 | return 0; | ||
28 | } | ||
29 | @@ -699,7 +699,6 @@ | ||
30 | zthfc->span.deflaw = DAHDI_LAW_ALAW; | ||
31 | zthfc->span.linecompat = DAHDI_CONFIG_AMI | DAHDI_CONFIG_CCS; // <--- this is really BS | ||
32 | zthfc->span.offset = 0; | ||
33 | - init_waitqueue_head(&zthfc->span.maintq); | ||
34 | |||
35 | for (i = 0; i < zthfc->span.channels; i++) { | ||
36 | memset(&(zthfc->chans[i]), 0x0, sizeof(struct dahdi_chan)); | ||
diff --git a/main/dahdi-linux/APKBUILD b/main/dahdi-linux/APKBUILD index 632851ee13..e0beed4407 100644 --- a/main/dahdi-linux/APKBUILD +++ b/main/dahdi-linux/APKBUILD | |||
@@ -2,11 +2,11 @@ | |||
2 | # Maintainer: Timo Teras <timo.teras@iki.fi> | 2 | # Maintainer: Timo Teras <timo.teras@iki.fi> |
3 | 3 | ||
4 | pkgname=dahdi-linux | 4 | pkgname=dahdi-linux |
5 | pkgver=2.4.1.2 | 5 | pkgver=2.5.0 |
6 | pkgrel=0 | 6 | pkgrel=0 |
7 | pkgdesc="Firmware for Digium Asterisk Hardware Device Interface drivers" | 7 | pkgdesc="Firmware for Digium Asterisk Hardware Device Interface drivers" |
8 | url="http://www.asterisk.org" | 8 | url="http://www.asterisk.org" |
9 | arch="all" | 9 | arch="noarch" |
10 | license="GPL" | 10 | license="GPL" |
11 | depends= | 11 | depends= |
12 | # we need wget and tar because make install downloads firmware and uses fancy | 12 | # we need wget and tar because make install downloads firmware and uses fancy |
@@ -39,4 +39,4 @@ package() { | |||
39 | install-include install-firmware | 39 | install-include install-firmware |
40 | } | 40 | } |
41 | 41 | ||
42 | md5sums="81b232a47693f4adac90c569e446f88f dahdi-linux-2.4.1.2.tar.gz" | 42 | md5sums="449f6591ccedb68937b5b30cbd37cea3 dahdi-linux-2.5.0.tar.gz" |
diff --git a/main/dahdi-tools/APKBUILD b/main/dahdi-tools/APKBUILD index 6770d78e4b..87fc95f8cb 100644 --- a/main/dahdi-tools/APKBUILD +++ b/main/dahdi-tools/APKBUILD | |||
@@ -1,7 +1,7 @@ | |||
1 | # Contributor: Timo Teras <timo.teras@iki.fi> | 1 | # Contributor: Timo Teras <timo.teras@iki.fi> |
2 | # Maintainer: Timo Teras <timo.teras@iki.fi> | 2 | # Maintainer: Timo Teras <timo.teras@iki.fi> |
3 | pkgname=dahdi-tools | 3 | pkgname=dahdi-tools |
4 | pkgver=2.4.1 | 4 | pkgver=2.5.0 |
5 | pkgrel=0 | 5 | pkgrel=0 |
6 | pkgdesc="Digium Asterisk Hardware Device Interface management utilities" | 6 | pkgdesc="Digium Asterisk Hardware Device Interface management utilities" |
7 | url="http://www.asterisk.org" | 7 | url="http://www.asterisk.org" |
@@ -35,5 +35,5 @@ package() { | |||
35 | install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/dahdi | 35 | install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/dahdi |
36 | } | 36 | } |
37 | 37 | ||
38 | md5sums="a06cf7c68b0b9fbb61f5804abd1a05e9 dahdi-tools-2.4.1.tar.gz | 38 | md5sums="a44f71c6eadd02830f48b3e73998767d dahdi-tools-2.5.0.tar.gz |
39 | d9702271dba6ff250f4d9a252f4dbf4c dahdi-tools.initd" | 39 | d9702271dba6ff250f4d9a252f4dbf4c dahdi-tools.initd" |