summaryrefslogtreecommitdiff
blob: 66c9f82652373bf6d7038faf5a9bf4f6e3d9b9d1 (plain)
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
diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/app_plci.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/app_plci.c
--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/app_plci.c	2008-01-18 10:24:49.000000000 +0100
+++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/app_plci.c	2008-02-05 23:06:46.000000000 +0100
@@ -825,6 +825,7 @@
 			cmsg->LLC = &p[qi->llc.off + 1];
 		if (qi->hlc.off)
 			cmsg->HLC = &p[qi->hlc.off + 1];
+#ifdef CAPIUTIL_VERSION
 #if CAPIUTIL_VERSION > 1
 		/* ETS 300 092 Annex B */
 		if (qi->calling_nr.repeated) {
@@ -834,6 +835,7 @@
 				int_error();
 		}
 #endif
+#endif
 		// all else set to default
 	}
 	if (mISDN_FsmEvent(&aplci->plci_m, EV_PI_CONNECT_IND, cmsg))
diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/avm_fritz.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/avm_fritz.c
--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/avm_fritz.c	2008-01-18 10:24:49.000000000 +0100
+++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/avm_fritz.c	2008-02-05 23:06:46.000000000 +0100
@@ -689,7 +689,11 @@
 }
 
 static irqreturn_t
+#ifdef OLD_IRQ_CALL
 avm_fritz_interrupt(int intno, void *dev_id, struct pt_regs *regs)
+#else
+avm_fritz_interrupt(int intno, void *dev_id)
+#endif
 {
 	fritzpnppci	*fc = dev_id;
 	u_char val;
@@ -722,7 +726,11 @@
 }
 
 static irqreturn_t
+#ifdef OLD_IRQ_CALL
 avm_fritzv2_interrupt(int intno, void *dev_id, struct pt_regs *regs)
+#else
+avm_fritzv2_interrupt(int intno, void *dev_id)
+#endif
 {
 	fritzpnppci	*fc = dev_id;
 	u_char val;
@@ -876,7 +884,7 @@
 static int init_card(fritzpnppci *fc)
 {
 	int		cnt = 3;
-	u_int		shared = SA_SHIRQ;
+	u_int		shared = __IRQF_SHARED;
 	u_long		flags;
 	u_char		*id = "AVM Fritz!PCI";
 
diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/core.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/core.c
--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/core.c	2007-12-17 16:29:59.000000000 +0100
+++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/core.c	2008-02-05 23:06:46.000000000 +0100
@@ -759,9 +759,11 @@
 int
 mISDNInit(void)
 {
-	DECLARE_MUTEX_LOCKED(sem);
+	struct semaphore sem;
 	int err;
 
+	init_MUTEX_LOCKED(&sem);
+
 	printk(KERN_INFO "Modular ISDN Stack core version (%s) revision (%s)\n", mISDN_core_version, mISDN_core_revision);
 	core_debug = debug;
 #ifdef MISDN_MEMDEBUG
@@ -801,7 +803,8 @@
 }
 
 void mISDN_cleanup(void) {
-	DECLARE_MUTEX_LOCKED(sem);
+	struct semaphore sem;
+	init_MUTEX_LOCKED(&sem);
 
 	free_mISDNdev();
 	if (!list_empty(&mISDN_objectlist)) {
diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/dsp_core.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/dsp_core.c
--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/dsp_core.c	2008-01-18 10:24:50.000000000 +0100
+++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/dsp_core.c	2008-02-05 23:10:32.000000000 +0100
@@ -1005,8 +1005,10 @@
 	/* fill mISDN object (dsp_obj) */
 	memset(&dsp_obj, 0, sizeof(dsp_obj));
 #ifdef MODULE
+#ifdef SET_MODULE_OWNER
 	SET_MODULE_OWNER(&dsp_obj);
 #endif
+#endif
 	spin_lock_init(&dsp_obj.lock);
 	dsp_obj.name = DSPName;
 	dsp_obj.BPROTO.protocol[3] = ISDN_PID_L3_B_DSP;
diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/hfc_multi.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/hfc_multi.c
--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/hfc_multi.c	2008-01-18 10:24:50.000000000 +0100
+++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/hfc_multi.c	2008-02-05 23:06:46.000000000 +0100
@@ -119,7 +119,7 @@
 #define bugtest \
 	if (hc->irq) free_irq(hc->irq, hc); \
 	hc->irq = 0; \
-	if (request_irq(hc->pci_dev->irq, hfcmulti_interrupt, SA_SHIRQ, "HFC-multi", hc)) { \
+	if (request_irq(hc->pci_dev->irq, hfcmulti_interrupt, __IRQF_SHARED, "HFC-multi", hc)) { \
 		printk(KERN_WARNING "mISDN: Could not get interrupt %d.\n", hc->pci_dev->irq); \
 	hc->irq = hc->pci_dev->irq; }
 #endif
@@ -1930,7 +1930,11 @@
 }
 
 static irqreturn_t
+#ifdef OLD_IRQ_CALL
 hfcmulti_interrupt(int intno, void *dev_id, struct pt_regs *regs)
+#else
+hfcmulti_interrupt(int intno, void *dev_id)
+#endif
 {
 #ifdef IRQCOUNT_DEBUG
 	static int iq1=0,iq2=0,iq3=0,iq4=0,iq5=0,iq6=0,iqcnt=0;
@@ -3294,7 +3298,7 @@
 	disable_hwirq(hc);
 	spin_unlock_irqrestore(&hc->lock, flags);
 
-	if (request_irq(hc->pci_dev->irq, hfcmulti_interrupt, SA_SHIRQ, "HFC-multi", hc)) {
+	if (request_irq(hc->pci_dev->irq, hfcmulti_interrupt, __IRQF_SHARED, "HFC-multi", hc)) {
 		printk(KERN_WARNING "mISDN: Could not get interrupt %d.\n", hc->pci_dev->irq);
 		return(-EIO);
 	}
diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/hfc_pci.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/hfc_pci.c
--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/hfc_pci.c	2008-01-18 10:24:50.000000000 +0100
+++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/hfc_pci.c	2008-02-05 23:06:46.000000000 +0100
@@ -1034,7 +1034,11 @@
 }
 
 static irqreturn_t
+#ifdef OLD_IRQ_CALL
 hfcpci_interrupt(int intno, void *dev_id, struct pt_regs *regs)
+#else
+hfcpci_interrupt(int intno, void *dev_id)
+#endif
 {
 	hfc_pci_t	*hc = dev_id;
 	u_char		exval;
@@ -1693,7 +1697,7 @@
 	spin_lock_irqsave(&hc->lock, flags);
 	disable_hwirq(hc);
 	spin_unlock_irqrestore(&hc->lock, flags);
-	if (request_irq(hc->irq, hfcpci_interrupt, SA_SHIRQ, "HFC PCI", hc)) {
+	if (request_irq(hc->irq, hfcpci_interrupt, __IRQF_SHARED, "HFC PCI", hc)) {
 		printk(KERN_WARNING "mISDN: couldn't get interrupt %d\n", hc->irq);
 		return(-EIO);
 	}
diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/hfcs_mini.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/hfcs_mini.c
--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/hfcs_mini.c	2008-01-18 10:24:50.000000000 +0100
+++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/hfcs_mini.c	2008-02-05 23:06:46.000000000 +0100
@@ -983,7 +983,11 @@
 /* Interrupt handler */
 /*********************/
 static irqreturn_t
+#ifdef OLD_IRQ_CALL
 hfcsmini_interrupt(int intno, void *dev_id, struct pt_regs *regs)
+#else
+hfcsmini_interrupt(int intno, void *dev_id)
+#endif
 {
 	__u8 fifo_irq, misc_irq;
 	hfcsmini_hw *hw = dev_id;
@@ -1587,7 +1591,7 @@
 		printk(KERN_WARNING "%s %s: requesting IRQ %d\n",
 		       hw->card_name, __FUNCTION__, hw->irq);
 		       
-	if (request_irq(hw->irq, hfcsmini_interrupt, SA_SHIRQ, "HFC-S mini", hw)) {
+	if (request_irq(hw->irq, hfcsmini_interrupt, __IRQF_SHARED, "HFC-S mini", hw)) {
 		printk(KERN_WARNING "%s %s: couldn't get interrupt %d\n",
 		       hw->card_name, __FUNCTION__, hw->irq);
 		       
diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/hfcs_usb.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/hfcs_usb.c
--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/hfcs_usb.c	2008-01-18 10:24:50.000000000 +0100
+++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/hfcs_usb.c	2008-02-05 23:06:46.000000000 +0100
@@ -1109,17 +1109,13 @@
 {
 	int k;
 
-	spin_lock_init(&urb->lock);
-	urb->dev = dev;
-	urb->pipe = pipe;
-	urb->complete = complete;
+	usb_fill_bulk_urb(urb, dev, pipe, buf, packet_size * num_packets, complete, context);
+	
 	urb->number_of_packets = num_packets;
-	urb->transfer_buffer_length = packet_size * num_packets;
-	urb->context = context;
-	urb->transfer_buffer = buf;
 	urb->transfer_flags = URB_ISO_ASAP;
 	urb->actual_length = 0;
 	urb->interval = interval;
+
 	for (k = 0; k < num_packets; k++) {
 		urb->iso_frame_desc[k].offset = packet_size * k;
 		urb->iso_frame_desc[k].length = packet_size;
diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/netjet.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/netjet.c
--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/netjet.c	2008-01-18 10:24:50.000000000 +0100
+++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/netjet.c	2008-02-05 23:06:46.000000000 +0100
@@ -1463,7 +1463,11 @@
 }
 
 static irqreturn_t
+#ifdef OLD_IRQ_CALL
 nj_interrupt(int intno, void *dev_id, struct pt_regs *regs)
+#else
+nj_interrupt(int intno, void *dev_id)
+#endif
 {
 	netjet_t *card = dev_id;
 	u_int8_t val, s1val, s0val;
@@ -1544,7 +1548,7 @@
 	nj_disable_hwirq(card);
 	spin_unlock_irqrestore(&card->lock, flags);
 
-	if (request_irq(card->irq, nj_interrupt, SA_SHIRQ, "NETjet", card)) {
+	if (request_irq(card->irq, nj_interrupt, __IRQF_SHARED, "NETjet", card)) {
 		printk(KERN_WARNING "mISDN: couldn't get interrupt %d\n",
 		       card->irq);
 		return (-EIO);
diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/sedl_fax.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/sedl_fax.c
--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/sedl_fax.c	2008-01-18 10:24:50.000000000 +0100
+++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/sedl_fax.c	2008-02-05 23:06:46.000000000 +0100
@@ -338,7 +338,7 @@
 {
 	int	cnt = 3;
 	u_long	flags;
-	u_int	shared = SA_SHIRQ;
+	u_int	shared = __IRQF_SHARED;
 	void	*irq_func = speedfax_pci_interrupt;
 
 	if (sf->subtyp == SEDL_SPEEDFAX_ISA) {
diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/stack.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/stack.c
--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/stack.c	2008-01-18 10:24:50.000000000 +0100
+++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/stack.c	2008-02-05 23:06:46.000000000 +0100
@@ -786,9 +786,11 @@
 static int
 delete_stack(mISDNstack_t *st)
 {
-	DECLARE_MUTEX_LOCKED(sem);
+	struct semaphore sem;
 	u_long	flags;
 
+	init_MUTEX_LOCKED(&sem);
+
 	if (core_debug & DEBUG_CORE_FUNC)
 		printk(KERN_DEBUG "%s: st(%p:%08x)\n", __FUNCTION__, st, st->id);
 	mISDN_unregister_sysfs_st(st);
@@ -1198,7 +1200,8 @@
 	hhe->addr = st->id;
 
 	if (wait) {
-		DECLARE_MUTEX_LOCKED(sem);
+		struct semaphore sem;
+		init_MUTEX_LOCKED(&sem);
 
 		hhe->data[0] = &sem;
 		_queue_message(st, skb);
diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/w6692.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/w6692.c
--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/w6692.c	2008-01-18 10:24:50.000000000 +0100
+++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/w6692.c	2008-02-05 23:06:46.000000000 +0100
@@ -855,7 +855,11 @@
 }
 
 static irqreturn_t
+#ifdef OLD_IRQ_CALL
 w6692_interrupt(int intno, void *dev_id, struct pt_regs *regs)
+#else
+w6692_interrupt(int intno, void *dev_id)
+#endif
 {
 	w6692pci	*card = dev_id;
 	u_char		ista;
@@ -994,7 +998,7 @@
 	spin_lock_irqsave(&card->lock, flags);
 	disable_hwirq(card);
 	spin_unlock_irqrestore(&card->lock, flags);
-	if (request_irq(card->irq, w6692_interrupt, SA_SHIRQ, "w6692", card)) {
+	if (request_irq(card->irq, w6692_interrupt, __IRQF_SHARED, "w6692", card)) {
 		printk(KERN_WARNING "mISDN: couldn't get interrupt %d\n", card->irq);
 		return(-EIO);
 	}
diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/xhfc_su.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/xhfc_su.c
--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/xhfc_su.c	2008-01-18 10:24:50.000000000 +0100
+++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/xhfc_su.c	2008-02-05 23:06:46.000000000 +0100
@@ -1103,7 +1103,11 @@
 /* Interrupt handler */
 /*********************/
 static irqreturn_t
+#ifdef OLD_IRQ_CALL
 xhfc_interrupt(int intno, void *dev_id, struct pt_regs *regs)
+#else
+xhfc_interrupt(int intno, void *dev_id)
+#endif
 {
 	xhfc_pi *pi = dev_id;
 	xhfc_t * xhfc = NULL;
@@ -2031,7 +2035,7 @@
 	}
 
 	/* init interrupt engine */
-	if (request_irq(pi->irq, xhfc_interrupt, SA_SHIRQ, "XHFC", pi)) {
+	if (request_irq(pi->irq, xhfc_interrupt, __IRQF_SHARED, "XHFC", pi)) {
 		printk(KERN_WARNING "%s %s: couldn't get interrupt %d\n",
 		       pi->name, __FUNCTION__, pi->irq);
 		pi->irq = 0;
diff -Naur mISDN-1_1_7_2.orig/include/linux/isdn_compat.h mISDN-1_1_7_2/include/linux/isdn_compat.h
--- mISDN-1_1_7_2.orig/include/linux/isdn_compat.h	2008-01-18 10:25:33.000000000 +0100
+++ mISDN-1_1_7_2/include/linux/isdn_compat.h	2008-02-05 23:06:46.000000000 +0100
@@ -128,6 +128,17 @@
 #define MISDN_COMPAT_KMEMCACHE
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
+#define OLD_IRQ_CALL
+#else
+#undef  OLD_IRQ_CALL
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
+#define __IRQF_SHARED SA_SHIRQ
+#else
+#define __IRQF_SHARED IRQF_SHARED
+#endif
 
 
 #endif /* __KERNEL__ */