File: del_timer_sync.patch

package info (click to toggle)
osmocom-dahdi-linux 0.0~git20250226.6dada77-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,060 kB
  • sloc: ansic: 116,364; perl: 2,391; sh: 977; makefile: 357
file content (358 lines) | stat: -rw-r--r-- 14,348 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
Description: kernel functions have been renamed
 del_timer_sync() has been replaced by timer_delete_sync()
 del_timer() has been replaced by timer_delete()
 from_timer() has been replaced by timer_container_of()
 symbols _binary_dahdi_fw_* are missing!? 
Index: osmocom-dahdi-linux/drivers/dahdi/dahdi-base.c
===================================================================
--- osmocom-dahdi-linux.orig/drivers/dahdi/dahdi-base.c	2025-10-25 13:14:04.479403476 +0200
+++ osmocom-dahdi-linux/drivers/dahdi/dahdi-base.c	2025-10-25 13:14:04.475403443 +0200
@@ -10178,7 +10178,7 @@
 static void coretimer_cleanup(void)
 {
 	atomic_set(&core_timer.shutdown, 1);
-	del_timer_sync(&core_timer.timer);
+	timer_delete_sync(&core_timer.timer);
 }
 
 #endif /* CONFIG_DAHDI_CORE_TIMER */
@@ -10483,7 +10483,7 @@
 
 static void __exit watchdog_cleanup(void)
 {
-	del_timer(&watchdogtimer);
+	timer_delete(&watchdogtimer);
 }
 
 #endif
Index: osmocom-dahdi-linux/drivers/dahdi/dahdi_dummy.c
===================================================================
--- osmocom-dahdi-linux.orig/drivers/dahdi/dahdi_dummy.c	2025-10-25 13:14:04.479403476 +0200
+++ osmocom-dahdi-linux/drivers/dahdi/dahdi_dummy.c	2025-10-25 13:14:04.475403443 +0200
@@ -258,7 +258,7 @@
 	hrtimer_cancel(&zaptimer);
 #else
 	atomic_set(&shutdown, 1);
-	del_timer_sync(&timer);
+	timer_delete_sync(&timer);
 #endif
 	dahdi_unregister_device(ztd->ddev);
 	dahdi_free_device(ztd->ddev);
Index: osmocom-dahdi-linux/drivers/dahdi/dahdi_dynamic.c
===================================================================
--- osmocom-dahdi-linux.orig/drivers/dahdi/dahdi_dynamic.c	2025-10-25 13:14:04.479403476 +0200
+++ osmocom-dahdi-linux/drivers/dahdi/dahdi_dynamic.c	2025-10-25 13:14:04.475403443 +0200
@@ -921,10 +921,10 @@
 	tasklet_disable(&dahdi_dynamic_flush_tlet);
 	tasklet_kill(&dahdi_dynamic_flush_tlet);
 #endif
-	del_timer_sync(&alarmcheck);
+	timer_delete_sync(&alarmcheck);
 	/* Must call again in case it was running before and rescheduled
 	 * itself. */
-	del_timer(&alarmcheck);
+	timer_delete(&alarmcheck);
 	printk(KERN_INFO "DAHDI Dynamic Span support unloaded\n");
 }
 
Index: osmocom-dahdi-linux/drivers/dahdi/dahdi_dynamic_ethmf.c
===================================================================
--- osmocom-dahdi-linux.orig/drivers/dahdi/dahdi_dynamic_ethmf.c	2025-10-25 13:14:04.479403476 +0200
+++ osmocom-dahdi-linux/drivers/dahdi/dahdi_dynamic_ethmf.c	2025-10-25 13:14:04.475403443 +0200
@@ -775,7 +775,7 @@
 static void __exit ztdethmf_exit(void)
 {
 	atomic_set(&timer_deleted, 1);
-	del_timer_sync(&timer);
+	timer_delete_sync(&timer);
 
 	dev_remove_pack(&ztdethmf_ptype);
 	unregister_netdevice_notifier(&ztdethmf_nblock);
Index: osmocom-dahdi-linux/drivers/dahdi/datamods/hdlc_cisco.c
===================================================================
--- osmocom-dahdi-linux.orig/drivers/dahdi/datamods/hdlc_cisco.c	2025-10-25 13:14:04.479403476 +0200
+++ osmocom-dahdi-linux/drivers/dahdi/datamods/hdlc_cisco.c	2025-10-25 13:14:04.475403443 +0200
@@ -264,7 +264,7 @@
 static void cisco_stop(struct net_device *dev)
 {
 	hdlc_device *hdlc = dev_to_hdlc(dev);
-	del_timer_sync(&hdlc->state.cisco.timer);
+	timer_delete_sync(&hdlc->state.cisco.timer);
 #if 0
 	if (netif_carrier_ok(dev))
 		netif_carrier_off(dev);
Index: osmocom-dahdi-linux/drivers/dahdi/datamods/hdlc_fr.c
===================================================================
--- osmocom-dahdi-linux.orig/drivers/dahdi/datamods/hdlc_fr.c	2025-10-25 13:14:04.479403476 +0200
+++ osmocom-dahdi-linux/drivers/dahdi/datamods/hdlc_fr.c	2025-10-25 13:14:04.475403443 +0200
@@ -1013,7 +1013,7 @@
 	printk(KERN_DEBUG "fr_stop\n");
 #endif
 	if (hdlc->state.fr.settings.lmi != LMI_NONE)
-		del_timer_sync(&hdlc->state.fr.timer);
+		timer_delete_sync(&hdlc->state.fr.timer);
 	fr_set_link_state(0, dev);
 }
 
Index: osmocom-dahdi-linux/drivers/dahdi/voicebus/voicebus.c
===================================================================
--- osmocom-dahdi-linux.orig/drivers/dahdi/voicebus/voicebus.c	2025-10-25 13:14:04.479403476 +0200
+++ osmocom-dahdi-linux/drivers/dahdi/voicebus/voicebus.c	2025-10-25 13:14:04.475403443 +0200
@@ -1151,7 +1151,7 @@
 	set_bit(VOICEBUS_STOPPED, &vb->flags);
 
 #if defined(CONFIG_VOICEBUS_TIMER)
-	del_timer_sync(&vb->timer);
+	timer_delete_sync(&vb->timer);
 #endif
 	vb_disable_interrupts(vb);
 	up(&stop);
@@ -1729,7 +1729,7 @@
 vb_timer(TIMER_DATA_TYPE timer)
 {
 	unsigned long start = jiffies;
-	struct voicebus *vb = from_timer(vb, timer, timer);
+	struct voicebus *vb = timer_container_of(vb, timer, timer);
 	vb_isr(0, vb);
 	if (!test_bit(VOICEBUS_STOPPED, &vb->flags)) {
 		mod_timer(&vb->timer, start + HZ/1000);
Index: osmocom-dahdi-linux/drivers/dahdi/wctc4xxp/base.c
===================================================================
--- osmocom-dahdi-linux.orig/drivers/dahdi/wctc4xxp/base.c	2025-10-25 13:14:04.479403476 +0200
+++ osmocom-dahdi-linux/drivers/dahdi/wctc4xxp/base.c	2025-10-25 13:14:04.475403443 +0200
@@ -3653,7 +3653,7 @@
 static void
 wctc4xxp_watchdog(TIMER_DATA_TYPE timer)
 {
-	struct wcdte *wc = from_timer(wc, timer, watchdog);
+	struct wcdte *wc = timer_container_of(wc, timer, watchdog);
 	struct tcb *cmd, *temp;
 	LIST_HEAD(cmds_to_retry);
 	const int MAX_RETRIES = 5;
@@ -4164,8 +4164,8 @@
 	wctc4xxp_remove_from_device_list(wc);
 
 	set_bit(DTE_SHUTDOWN, &wc->flags);
-	if (del_timer_sync(&wc->watchdog))
-		del_timer_sync(&wc->watchdog);
+	if (timer_delete_sync(&wc->watchdog))
+		timer_delete_sync(&wc->watchdog);
 
 	/* This should already be stopped, but it doesn't hurt to make sure. */
 	clear_bit(DTE_POLLING, &wc->flags);
Index: osmocom-dahdi-linux/drivers/dahdi/wcte12xp/base.c
===================================================================
--- osmocom-dahdi-linux.orig/drivers/dahdi/wcte12xp/base.c	2025-10-25 13:14:04.479403476 +0200
+++ osmocom-dahdi-linux/drivers/dahdi/wcte12xp/base.c	2025-10-25 13:14:04.475403443 +0200
@@ -2116,7 +2116,7 @@
 	clear_bit(INITIALIZED, &wc->bit_flags);
 	synchronize_irq(wc->vb.pdev->irq);
 	smp_mb__after_atomic();
-	del_timer_sync(&wc->timer);
+	timer_delete_sync(&wc->timer);
 	flush_workqueue(wc->wq);
 
 	t1_reset_registers(wc);
@@ -2769,7 +2769,7 @@
 static void te12xp_timer(TIMER_DATA_TYPE timer)
 {
 	unsigned long flags;
-	struct t1 *wc = from_timer(wc, timer, timer);
+	struct t1 *wc = timer_container_of(wc, timer, timer);
 
 	if (unlikely(!test_bit(INITIALIZED, &wc->bit_flags)))
 		return;
@@ -3084,7 +3084,7 @@
 	clear_bit(INITIALIZED, &wc->bit_flags);
 	smp_mb__after_atomic();
 
-	del_timer_sync(&wc->timer);
+	timer_delete_sync(&wc->timer);
 	flush_workqueue(wc->wq);
 #ifdef VPM_SUPPORT
 	if (vpmadt) {
@@ -3095,7 +3095,7 @@
 			schedule();
 	}
 #endif
-	del_timer_sync(&wc->timer);
+	timer_delete_sync(&wc->timer);
 
 	voicebus_release(&wc->vb);
 
Index: osmocom-dahdi-linux/drivers/dahdi/wcte13xp-base.c
===================================================================
--- osmocom-dahdi-linux.orig/drivers/dahdi/wcte13xp-base.c	2025-10-25 13:14:04.479403476 +0200
+++ osmocom-dahdi-linux/drivers/dahdi/wcte13xp-base.c	2025-10-25 13:14:04.475403443 +0200
@@ -1850,7 +1850,7 @@
 	disable_irq(wc->xb.pdev->irq);
 
 	smp_mb__after_atomic();
-	del_timer_sync(&wc->timer);
+	timer_delete_sync(&wc->timer);
 	flush_workqueue(wc->wq);
 
 	t13x_framer_reset(wc);
@@ -2378,7 +2378,7 @@
 
 static void te13xp_timer(TIMER_DATA_TYPE timer)
 {
-	struct t13x *wc = from_timer(wc, timer, timer);
+	struct t13x *wc = timer_container_of(wc, timer, timer);
 
 	if (unlikely(!test_bit(INITIALIZED, &wc->bit_flags)))
 		return;
@@ -2723,9 +2723,9 @@
 	/* Leave framer in reset so it no longer transmits */
 	wcxb_gpio_clear(&wc->xb, FALC_CPU_RESET);
 
-	del_timer_sync(&wc->timer);
+	timer_delete_sync(&wc->timer);
 	flush_workqueue(wc->wq);
-	del_timer_sync(&wc->timer);
+	timer_delete_sync(&wc->timer);
 
 	/* Turn off status LED */
 	t13x_setleds(wc, 0);
Index: osmocom-dahdi-linux/drivers/dahdi/wcte43x-base.c
===================================================================
--- osmocom-dahdi-linux.orig/drivers/dahdi/wcte43x-base.c	2025-10-25 13:14:04.479403476 +0200
+++ osmocom-dahdi-linux/drivers/dahdi/wcte43x-base.c	2025-10-25 13:14:04.475403443 +0200
@@ -3166,7 +3166,7 @@
 
 static void t43x_timer(TIMER_DATA_TYPE timer)
 {
-	struct t43x *wc = from_timer(wc, timer, timer);
+	struct t43x *wc = timer_container_of(wc, timer, timer);
 
 	if (!is_initialized(wc))
 		return;
@@ -3552,9 +3552,9 @@
 
 	cancel_delayed_work_sync(&wc->clksrc_work.work);
 
-	del_timer_sync(&wc->timer);
+	timer_delete_sync(&wc->timer);
 	flush_workqueue(wc->wq);
-	del_timer_sync(&wc->timer);
+	timer_delete_sync(&wc->timer);
 
 	dahdi_unregister_device(wc->ddev);
 
Index: osmocom-dahdi-linux/drivers/dahdi/xpp/xbus-core.c
===================================================================
--- osmocom-dahdi-linux.orig/drivers/dahdi/xpp/xbus-core.c	2025-10-25 13:14:04.479403476 +0200
+++ osmocom-dahdi-linux/drivers/dahdi/xpp/xbus-core.c	2025-10-25 13:14:04.475403443 +0200
@@ -1508,7 +1508,7 @@
 	xframe_queue_clear(&xbus->send_pool);
 	xframe_queue_clear(&xbus->receive_pool);
 	xframe_queue_clear(&xbus->pcm_tospan);
-	del_timer_sync(&xbus->command_timer);
+	timer_delete_sync(&xbus->command_timer);
 	transportops_put(xbus);
 	transport_destroy(xbus);
 	/* worker_reset(xbus) was called in xbus_deactivate(xbus) */
Index: osmocom-dahdi-linux/drivers/dahdi/datamods/syncppp.c
===================================================================
--- osmocom-dahdi-linux.orig/drivers/dahdi/datamods/syncppp.c	2025-10-25 13:14:04.479403476 +0200
+++ osmocom-dahdi-linux/drivers/dahdi/datamods/syncppp.c	2025-10-25 13:14:04.475403443 +0200
@@ -199,7 +199,7 @@
 {
 	if (p->pp_flags & PP_TIMO) 
 	{
-		del_timer(&p->pp_timer);
+		timer_delete(&p->pp_timer);
 		p->pp_flags &= ~PP_TIMO; 
 	}
 }
@@ -1144,7 +1144,7 @@
 
 	/* Stop keepalive handler. */
 	if (! spppq)
-		del_timer(&sppp_keepalive_timer);
+		timer_delete(&sppp_keepalive_timer);
 	sppp_clear_timeout (sp);
 	spin_unlock_irqrestore(&spppq_lock, flags);
 }
Index: osmocom-dahdi-linux/drivers/dahdi/xpp/xbus-pcm.c
===================================================================
--- osmocom-dahdi-linux.orig/drivers/dahdi/xpp/xbus-pcm.c	2025-10-25 13:14:04.479403476 +0200
+++ osmocom-dahdi-linux/drivers/dahdi/xpp/xbus-pcm.c	2025-10-25 13:14:04.475403443 +0200
@@ -352,7 +352,7 @@
 
 static void xbus_command_timer(TIMER_DATA_TYPE timer)
 {
-	xbus_t *xbus = from_timer(xbus, timer, command_timer);
+	xbus_t *xbus = timer_container_of(xbus, timer, command_timer);
 
 	BUG_ON(!xbus);
 	xbus_command_queue_tick(xbus);
@@ -372,7 +372,7 @@
 		}
 	} else if (timer_pending(&xbus->command_timer)) {
 		XBUS_DBG(SYNC, xbus, "del_timer\n");
-		del_timer(&xbus->command_timer);
+		timer_delete(&xbus->command_timer);
 	}
 	xbus->self_ticking = !on;
 }
Index: osmocom-dahdi-linux/drivers/dahdi/oct612x/Kbuild
===================================================================
--- osmocom-dahdi-linux.orig/drivers/dahdi/oct612x/Kbuild	2025-10-25 13:14:04.479403476 +0200
+++ osmocom-dahdi-linux/drivers/dahdi/oct612x/Kbuild	2025-10-25 13:14:04.475403443 +0200
@@ -27,6 +27,6 @@
 # TODO: ccflags was added in 2.6.24 in commit f77bf01425b11947eeb3b5b54. This
 # should be changed to a conditional compilation based on the Kernel Version.
 # ccflags-y := -I$(src)/.. -Wno-undef -I$(src)/include -I$(src)/octdeviceapi -I$(src)/octdeviceapi/oct6100api
-EXTRA_CFLAGS = -I$(src)/.. -Wno-undef -I$(src)/include -I$(src)/octdeviceapi -I$(src)/octdeviceapi/oct6100api
+EXTRA_CFLAGS += -I$(src)/.. -Wno-undef -I$(src)/include -I$(src)/octdeviceapi -I$(src)/octdeviceapi/oct6100api
 obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_OCT612X) := oct612x.o
 oct612x-objs := $(octapi_files)
Index: osmocom-dahdi-linux/drivers/dahdi/oct612x/Makefile
===================================================================
--- osmocom-dahdi-linux.orig/drivers/dahdi/oct612x/Makefile	2025-10-25 13:14:04.479403476 +0200
+++ osmocom-dahdi-linux/drivers/dahdi/oct612x/Makefile	2025-10-25 13:14:04.475403443 +0200
@@ -26,5 +26,5 @@
 # TODO: ccflags was added in 2.6.24 in commit f77bf01425b11947eeb3b5b54. This
 # should be changed to a conditional compilation based on the Kernel Version.
 # ccflags-y := -I$(src)/.. -Wno-undef -I$(src)/include -I$(src)/octdeviceapi -I$(src)/octdeviceapi/oct6100api
-EXTRA_CFLAGS = -I$(src)/.. -Wno-undef -I$(src)/include -I$(src)/octdeviceapi -I$(src)/octdeviceapi/oct6100api
+EXTRA_CFLAGS += -I$(src)/.. -Wno-undef -I$(src)/include -I$(src)/octdeviceapi -I$(src)/octdeviceapi/oct6100api
 lib-y := $(octapi_files)
Index: osmocom-dahdi-linux/drivers/dahdi/Kbuild
===================================================================
--- osmocom-dahdi-linux.orig/drivers/dahdi/Kbuild	2025-10-25 13:14:04.479403476 +0200
+++ osmocom-dahdi-linux/drivers/dahdi/Kbuild	2025-10-25 13:30:51.599769085 +0200
@@ -14,10 +14,10 @@
 
 ifdef CONFIG_PCI
 obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_OCT612X)		+= oct612x/
-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCT4XXP)		+= wct4xxp/
-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTC4XXP)		+= wctc4xxp/
-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTDM24XXP)	+= wctdm24xxp/
-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTE12XP)		+= wcte12xp/
+#XXX obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCT4XXP)		+= wct4xxp/
+#XXX obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTC4XXP)		+= wctc4xxp/
+#XXX obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTDM24XXP)	+= wctdm24xxp/
+#XXX obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTE12XP)		+= wcte12xp/
 obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTE13XP)		+= wcte13xp.o
 
 wcte13xp-objs := wcte13xp-base.o wcxb_spi.o wcxb.o wcxb_flash.o
@@ -42,7 +42,7 @@
   CFLAGS_wcaxx-base.o += -DHOTPLUG_FIRMWARE
 endif
 
-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_VOICEBUS)		+= voicebus/
+#XXX obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_VOICEBUS)		+= voicebus/
 obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCB4XXP)		+= wcb4xxp/
 
 obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTE11XP)		+= wcte11xp.o
@@ -71,7 +71,7 @@
 obj-m += ../staging/echo/echo.o
 endif
 
-CFLAGS_MODULE += -I$(DAHDI_INCLUDE) -I$(src) -Wno-format-truncation
+CFLAGS_MODULE += -I$(DAHDI_INCLUDE) -I$(src) -Wno-format-truncation -I$(src)/oct612x/include -I$(src)/oct612x/octdeviceapi/oct6100api -I$(src)/oct612x
 
 ifndef HOTPLUG_FIRMWARE
 ifneq (,$(filter y m,$(CONFIG_FW_LOADER)))