]>
Commit | Line | Data |
---|---|---|
d4ac3c45 | 1 | --- AdiUsbAdslDriver.c.orig 2003-09-11 19:48:46.000000000 +0200 |
2 | +++ AdiUsbAdslDriver.c 2003-09-12 12:40:54.000000000 +0200 | |
3 | @@ -34,6 +34,7 @@ | |
4 | #include <linux/init.h> | |
5 | #include <linux/proc_fs.h> | |
6 | #include <linux/list.h> | |
7 | +#include <linux/interrupt.h> | |
8 | #include <asm/uaccess.h> | |
9 | #include <linux/if_arp.h> | |
10 | #include "AdiUsbAdslDriver.h" | |
11 | @@ -275,7 +276,7 @@ | |
12 | } | |
13 | ||
14 | /* Try to select the first USB configuration: */ | |
15 | - if (usb_set_configuration(usb, usb->config[0].bConfigurationValue) < 0) | |
16 | + if (usb_set_configuration(usb, usb->config[0].desc.bConfigurationValue) < 0) | |
17 | { | |
18 | adi_err ("adi_probe : set_configuration failed.\n"); | |
19 | ||
20 | @@ -419,7 +420,7 @@ | |
21 | #ifdef USEBULK | |
22 | pHw->pIncomingData[i] = GET_KBUFFER(INCOMING_DATA_SIZE); | |
23 | #else | |
24 | - pHw->pUrbReadIso[i] = usb_alloc_urb(pHw->IsoFramesPerUrb); | |
25 | + pHw->pUrbReadIso[i] = usb_alloc_urb(pHw->IsoFramesPerUrb,in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); | |
26 | pHw->pIncomingData[i] = GET_KBUFFER((pHw->IsoPipeSize * pHw->IsoFramesPerUrb)); | |
27 | #endif | |
28 | if (!pHw->pIncomingData[i]) | |
29 | @@ -534,10 +535,10 @@ | |
30 | usb_driver_claim_interface(&adi_driver, &(usb->actconfig->interface[1]), pHw); | |
31 | usb_driver_claim_interface(&adi_driver, &(usb->actconfig->interface[2]), pHw); | |
32 | /* Get information about our endpoints*/ | |
33 | - epoutidma = usb->actconfig->interface[1].altsetting[0].endpoint + 0; | |
34 | - epoutdata = usb->actconfig->interface[1].altsetting[0].endpoint + 1; | |
35 | + epoutidma = &usb->actconfig->interface[1]->altsetting[0].endpoint->desc; | |
36 | + epoutdata = &usb->actconfig->interface[1]->altsetting[0].endpoint->desc; | |
37 | #ifdef USEBULK | |
38 | - epindata = usb->actconfig->interface[2].altsetting[0].endpoint + 0; | |
39 | + epindata = &usb->actconfig->interface[2]->altsetting[0].endpoint->desc; | |
40 | #else /*ifdef USEBULK*/ | |
41 | /*******************************************************************************/ | |
42 | /* Need to eventually choose the alternate interface based on the train ds rate*/ | |
43 | @@ -552,7 +553,7 @@ | |
44 | } | |
45 | else | |
46 | { | |
47 | - epindata=usb->actconfig->interface[kUSB_INTF_IN].altsetting[kFASTEST_ISO_INTF].endpoint+0; | |
48 | + epindata=usb->actconfig->interface[kUSB_INTF_IN]->altsetting[kFASTEST_ISO_INTF].endpoint+0; | |
49 | } | |
50 | #endif /*ifdef USEBULK else*/ | |
51 | ||
52 | @@ -694,7 +695,7 @@ | |
53 | /* Unlink pending interrupt URBs: */ | |
54 | if (pHw->HasIntURB) | |
55 | { | |
56 | - pHw->urbInt.transfer_flags &= ~USB_ASYNC_UNLINK; | |
57 | + pHw->urbInt.transfer_flags &= ~URB_ASYNC_UNLINK; | |
58 | usb_unlink_urb(&pHw->urbInt); | |
59 | pHw->HasIntURB = FALSE; | |
60 | } | |
61 | @@ -1231,13 +1232,13 @@ | |
62 | { | |
63 | /* Get the USB endpoint for IDMA uploading: */ | |
64 | struct usb_endpoint_descriptor *epint = | |
65 | - dev->actconfig->interface[0].altsetting[0].endpoint + 0; | |
66 | + &dev->actconfig->interface[0]->altsetting[0].endpoint->desc; | |
67 | /* Install the interrupt handler to send IDMA pages to the modem | |
68 | and handle further incoming data: */ | |
69 | usb_fill_int_urb(&pHw->urbInt, dev, pHw->pipeIntIn, pHw->pInterruptData, | |
70 | sizeof(CDC_NOTIFY), adi_irq, pHw, epint->bInterval); | |
71 | pHw->HasIntURB = TRUE; | |
72 | - if (usb_submit_urb(&pHw->urbInt) < 0) | |
73 | + if (usb_submit_urb(&pHw->urbInt,0) < 0) | |
74 | { | |
75 | adi_err ("Unable to submit interrupt URB!\n"); | |
76 | ||
77 | @@ -1573,7 +1574,7 @@ | |
78 | /* Stop our outgoing data urbs */ | |
79 | if (pHw->IsWriting) | |
80 | { | |
81 | - pHw->urbWrite.transfer_flags &= ~USB_ASYNC_UNLINK; | |
82 | + pHw->urbWrite.transfer_flags &= ~URB_ASYNC_UNLINK; | |
83 | usb_unlink_urb(&pHw->urbWrite); | |
84 | } | |
85 | ||
86 | @@ -1787,10 +1788,10 @@ | |
87 | URB. This will call WriteCompletion, which will call | |
88 | netif_wakequeue: | |
89 | */ | |
90 | - pHw->urbWrite.transfer_flags |= USB_ASYNC_UNLINK; | |
91 | + pHw->urbWrite.transfer_flags |= URB_ASYNC_UNLINK; | |
92 | usb_unlink_urb(&pHw->urbWrite); | |
93 | ||
94 | - pHw->urbOAMWrite.transfer_flags |= USB_ASYNC_UNLINK; | |
95 | + pHw->urbOAMWrite.transfer_flags |= URB_ASYNC_UNLINK; | |
96 | usb_unlink_urb(&pHw->urbOAMWrite); | |
97 | ||
98 | /* We must reset the transaction time to keep the watchdog quiet: */ | |
99 | --- Boot.c.orig 2003-09-12 12:43:26.000000000 +0200 | |
100 | +++ Boot.c 2003-09-12 14:22:12.000000000 +0200 | |
101 | @@ -29,7 +29,8 @@ | |
102 | #include "Util.h" | |
103 | #include "Me.h" | |
104 | #include "debug.h" | |
105 | - | |
106 | +#define USB_ST_NOERROR 0 | |
107 | +#define USB_QUEUE_BULK 0x0010 | |
108 | /*********************************************************************************/ | |
109 | /* Local only prototypes */ | |
110 | /*********************************************************************************/ | |
111 | @@ -465,14 +466,14 @@ | |
112 | memcpy(xfer_buf, pData, Size); | |
113 | ||
114 | /* Get an URB and prepare it for submission*/ | |
115 | - urb = usb_alloc_urb(0); | |
116 | + urb = usb_alloc_urb(0,0); | |
117 | ||
118 | usb_fill_bulk_urb(urb, pHw->usbdev, pHw->pipeBulkIdmaOut, xfer_buf, Size, IDMACompletion, pHw); | |
119 | urb->transfer_flags |= USB_QUEUE_BULK; | |
120 | ||
121 | adi_dbg (DBG_BOOT,"Submitting BULK URB %p\n", urb); | |
122 | ||
123 | - ret = usb_submit_urb(urb); | |
124 | + ret = usb_submit_urb(urb,0); | |
125 | ||
126 | IDMA_exit: | |
127 | adi_leaves (DBG_BOOT); | |
128 | --- Me.c.orig 2003-09-12 14:56:03.000000000 +0200 | |
129 | +++ Me.c 2003-09-12 14:55:47.000000000 +0200 | |
130 | @@ -126,7 +126,7 @@ | |
131 | #include "Sm.h" | |
132 | #include "Msg.h" | |
133 | #include "debug.h" | |
134 | - | |
135 | +#define USB_ST_NOERROR 0 | |
136 | /***************************************************************************************/ | |
137 | /* ProcessIncomingCmv */ | |
138 | /* */ | |
139 | --- Oam.c.orig 2003-09-12 14:56:41.000000000 +0200 | |
140 | +++ Oam.c 2003-09-12 14:57:11.000000000 +0200 | |
141 | @@ -19,6 +19,7 @@ | |
142 | ||
143 | #include "Adiutil.h" | |
144 | #include "debug.h" | |
145 | +#define USB_ST_NOERROR 0 | |
146 | ||
147 | //--------------------------------------------------------------------------- | |
148 | // Some sample OAM cells from Dennis Chan ... | |
149 | @@ -547,7 +548,7 @@ | |
150 | FILL_BULK_URB(&pHw->urbOAMWrite, pHw->usbdev, pHw->pipeBulkDataOut, | |
151 | pCell,uiTotalBytes , AmoebaCompletion, pHw); | |
152 | ||
153 | - result = usb_submit_urb(&pHw->urbOAMWrite); | |
154 | + result = usb_submit_urb(&pHw->urbOAMWrite,0); | |
155 | ||
156 | adi_dbg (DBG_OAM,"usb_submit_urb result=%d \n",result); | |
157 | adi_leaves (DBG_OAM); | |
158 | --- Pipes.c.orig 2003-09-12 14:27:57.000000000 +0200 | |
159 | +++ Pipes.c 2003-09-12 15:42:29.091320528 +0200 | |
160 | @@ -49,6 +49,8 @@ | |
161 | /* the DMA of an incoming packet could be happening while the CPU is doing the */ | |
162 | /* reassembly of another packet. */ | |
163 | /**********************************************************************************/ | |
164 | +#define USB_ST_NOERROR 0 | |
165 | +#define USB_QUEUE_BULK 0x0010 | |
166 | void StartReadPipe(Hardware *pHw) | |
167 | { | |
168 | int result; | |
169 | @@ -92,7 +94,7 @@ | |
170 | memset(pUrb, 0, sizeof(*pUrb)); | |
171 | spin_lock_init(&pUrb->lock); | |
172 | /*Init the URB fields per the spec*/ | |
173 | - pUrb->next = pHw->pUrbReadIso[(i+1) % INCOMING_Q_SIZE]; | |
174 | +// pUrb->next = pHw->pUrbReadIso[(i+1) % INCOMING_Q_SIZE]; | |
175 | pUrb->dev = pHw->usbdev; | |
176 | pUrb->pipe = pHw->pipeIsoDataIn; | |
177 | pUrb->context = pHw; | |
178 | @@ -100,7 +102,7 @@ | |
179 | pUrb->transfer_buffer = pHw->pIncomingData[i]; | |
180 | pUrb->transfer_buffer_length = pHw->IsoPipeSize * pHw->IsoFramesPerUrb; | |
181 | pUrb->number_of_packets = pHw->IsoFramesPerUrb; | |
182 | - pUrb->transfer_flags = USB_ISO_ASAP; | |
183 | + pUrb->transfer_flags = URB_ISO_ASAP; | |
184 | /* | |
185 | CC - FIXME : Voir ce que ces flags signifient avant de les activer : | |
186 | pUrb->transfer_flags &= ~USB_DISABLE_SPD; // Curieux: cela suppose que ISO_ASAP contiendrait DISABLE_SPD ? | |
187 | @@ -119,7 +121,7 @@ | |
188 | for (i=0; i<INCOMING_Q_SIZE; i++) | |
189 | { | |
190 | /*Ok, data is initialized, fire off the ISO URB ring*/ | |
191 | - if ((result = usb_submit_urb(pHw->pUrbReadIso[i]))) | |
192 | + if ((result = usb_submit_urb(pHw->pUrbReadIso[i],0))) | |
193 | { | |
194 | adi_dbg (DBG_READ,"Error %d on ISO read URB submit.\n", result); | |
195 | ||
196 | @@ -232,7 +234,7 @@ | |
197 | memset(urb, 0, sizeof(*urb)); | |
198 | usb_fill_bulk_urb(urb, pHw->usbdev, pHw->pipeBulkDataIn, | |
199 | urb->transfer_buffer, INCOMING_DATA_SIZE, ReadBulkCompletion, pHw); | |
200 | - if ((result = usb_submit_urb(urb))) | |
201 | + if ((result = usb_submit_urb(urb,0))) | |
202 | { | |
203 | adi_dbg (DBG_READ,"Error %d on read URB submit.\n", result); | |
204 | ||
205 | @@ -374,10 +376,10 @@ | |
206 | for (i=0; i<INCOMING_Q_SIZE; i++) | |
207 | { | |
208 | #ifdef USEBULK | |
209 | - pHw->urbRead[i].transfer_flags &= ~USB_ASYNC_UNLINK; | |
210 | + pHw->urbRead[i].transfer_flags &= ~URB_ASYNC_UNLINK; | |
211 | usb_unlink_urb(&pHw->urbRead[i]); | |
212 | #else | |
213 | - pHw->pUrbReadIso[i]->transfer_flags &= ~USB_ASYNC_UNLINK; | |
214 | + pHw->pUrbReadIso[i]->transfer_flags &= ~URB_ASYNC_UNLINK; | |
215 | usb_unlink_urb(pHw->pUrbReadIso[i]); | |
216 | #endif | |
217 | } | |
218 | @@ -526,7 +528,7 @@ | |
219 | pHw->urbWrite.transfer_flags |= USB_QUEUE_BULK; | |
220 | ||
221 | /* Send it: */ | |
222 | - result = usb_submit_urb(&pHw->urbWrite); | |
223 | + result = usb_submit_urb(&pHw->urbWrite,0); | |
224 | } | |
225 | else | |
226 | { | |
227 | @@ -593,7 +595,7 @@ | |
228 | -EINVAL. | |
229 | */ | |
230 | urb->status = 0; | |
231 | - urb->transfer_flags &= ~USB_ASYNC_UNLINK; | |
232 | + urb->transfer_flags &= ~URB_ASYNC_UNLINK; | |
233 | } | |
234 | else | |
235 | { | |
236 | --- Sm.c.orig 2003-09-12 14:56:18.000000000 +0200 | |
237 | +++ Sm.c 2003-09-12 14:56:29.000000000 +0200 | |
238 | @@ -58,6 +58,7 @@ | |
239 | /* Rewrite for MAC OS, 09/2001 */ | |
240 | /* */ | |
241 | /************************************************************************************/ | |
242 | +#define USB_ST_NOERROR 0 | |
243 | void ModemSM(UInt16 uEventCode, Hardware *pHw, void *pData) | |
244 | { | |
245 | UInt32 DspStatus; | |
246 | --- Util.c.niedakh 2003-06-04 00:52:10.000000000 +0200 | |
247 | +++ Util.c 2003-09-12 15:53:46.430349344 +0200 | |
248 | @@ -29,7 +29,7 @@ | |
249 | #include "Konst.h" | |
250 | #include "debug.h" | |
251 | #include "Firmware8051.h" | |
252 | - | |
253 | +#define USB_ST_NOERROR 0 | |
254 | /**********************************************************************************/ | |
255 | /* Local utilities */ | |
256 | /**********************************************************************************/ | |
257 | @@ -293,7 +293,7 @@ | |
258 | pdr = (devrequest *)(xfer_buf+CMV_DATA_WORDS*2); | |
259 | ||
260 | /*Get an URB and prepare it for submission*/ | |
261 | - urb = usb_alloc_urb(0); | |
262 | + urb = usb_alloc_urb(0,0); | |
263 | ||
264 | FILL_USB_CTRL_REQUEST(pdr, | |
265 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, | |
266 | @@ -332,7 +332,7 @@ | |
267 | pdr = (devrequest *)(xfer_buf+CMV_DATA_WORDS*2); | |
268 | ||
269 | /*Get an URB and prepare it for submission*/ | |
270 | - urb = usb_alloc_urb(0); | |
271 | + urb = usb_alloc_urb(0,0); | |
272 | ||
273 | FILL_USB_CTRL_REQUEST(pdr, | |
274 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, | |
275 | @@ -484,7 +484,7 @@ | |
276 | if ( list_was_empty ) | |
277 | { | |
278 | adi_dbg(DBG_UTILS,"Submit urb %p immediately\n", urb); | |
279 | - ret = usb_submit_urb (urb); | |
280 | + ret = usb_submit_urb (urb,0); | |
281 | if ( ret != 0 ) | |
282 | { | |
283 | adi_err ("Failed to send ctrl urb (%p) with err=%d\n", | |
284 | @@ -662,7 +662,7 @@ | |
285 | adi_dbg(DBG_UTILS,"rm_queued_urb: Submitting urb %p\n",qhead->urb); | |
286 | ||
287 | ||
288 | - ret = usb_submit_urb ( qhead->urb ); | |
289 | + ret = usb_submit_urb ( qhead->urb , 0); | |
290 | if ( ret != 0 ) | |
291 | { | |
292 | adi_err ("Failed to send pending ctrl urb (%p) with err=%d\n", | |
293 | @@ -726,7 +726,7 @@ | |
294 | } | |
295 | ||
296 | ||
297 | - ret = usb_submit_urb (pHw->ctrl_urb_failed); | |
298 | + ret = usb_submit_urb (pHw->ctrl_urb_failed,0); | |
299 | if ( ret != 0 ) | |
300 | { | |
301 | adi_err ("ADI: Failed to send faulty ctrl urb (%p) with err=%d\n", | |
302 | @@ -777,7 +777,7 @@ | |
303 | /* We have to unlink it */ | |
304 | qhead = list_entry ( pHw->ctrl_urb_ipg_q.next, queued_urb_t, list); | |
305 | ||
306 | - qhead->urb->transfer_flags &= ~USB_ASYNC_UNLINK; | |
307 | + qhead->urb->transfer_flags &= ~URB_ASYNC_UNLINK; | |
308 | usb_unlink_urb(qhead->urb); | |
309 | } | |
310 | ||
311 | --- user/Makefile.orig 2003-09-13 20:44:11.207726216 +0200 | |
312 | +++ user/Makefile 2003-09-13 21:21:04.834203840 +0200 | |
313 | @@ -4,7 +4,7 @@ | |
314 | # Makefile for adictrl | |
315 | # | |
316 | ||
317 | -CFLAGS=-O2 -pipe -Wall -pedantic -DLINUX -g | |
318 | +CFLAGS=-O2 -I../../kern-fixed -DLINUX -Wall | |
319 | INSTALLDIR=/usr/sbin | |
320 | CONFIGDIR=/etc/analog | |
321 | INSTALLER = $(shell which install) | |
322 | --- user/adictrl.c.orig 2003-09-13 21:06:07.408633264 +0200 | |
323 | +++ user/adictrl.c 2003-09-13 21:23:39.022763616 +0200 | |
324 | @@ -31,9 +31,9 @@ | |
325 | #include <unistd.h> | |
326 | #include <dirent.h> | |
327 | #include <fcntl.h> | |
328 | -#include <linux/usb.h> | |
329 | +#include "usb.h" | |
330 | #include <getopt.h> | |
331 | -#include <linux/usbdevice_fs.h> | |
332 | +#include "usbdevice_fs.h" | |
333 | #include <signal.h> | |
334 | #include <assert.h> | |
335 | ||
336 | @@ -179,7 +179,7 @@ | |
337 | * @bNumConfigurations | |
338 | * | |
339 | */ | |
340 | - | |
341 | +/* | |
342 | typedef struct usb_device_descriptor | |
343 | { | |
344 | uint8_t bLength; | |
345 | @@ -197,7 +197,8 @@ | |
346 | uint8_t iSerialNumber; | |
347 | uint8_t bNumConfigurations; | |
348 | } __attribute__((packed)) usb_dev_desc_t; | |
349 | - | |
350 | +*/ | |
351 | +typedef struct usb_device_descriptor __attribute__((packed)) usb_dev_desc_t; | |
352 | /** | |
353 | * cmv_msg_t - CMV message description. | |
354 | * Copied and adapted from Struct.sh in order to not enter |