13 #include <linux/kernel.h>
14 #include <linux/errno.h>
16 #include <linux/slab.h>
17 #include <linux/tty.h>
20 #include <linux/module.h>
26 #define KP_RETRIES 100
32 #define DRIVER_VERSION "v1.0"
34 #define DRIVER_DESC "USB PocketPC PDA driver"
37 static int initial_wait;
46 { USB_DEVICE(0x0104, 0x00BE) },
47 { USB_DEVICE(0x03F0, 0x1016) },
48 { USB_DEVICE(0x03F0, 0x1116) },
49 { USB_DEVICE(0x03F0, 0x1216) },
50 { USB_DEVICE(0x03F0, 0x2016) },
51 { USB_DEVICE(0x03F0, 0x2116) },
52 { USB_DEVICE(0x03F0, 0x2216) },
53 { USB_DEVICE(0x03F0, 0x3016) },
54 { USB_DEVICE(0x03F0, 0x3116) },
55 { USB_DEVICE(0x03F0, 0x3216) },
56 { USB_DEVICE(0x03F0, 0x4016) },
57 { USB_DEVICE(0x03F0, 0x4116) },
58 { USB_DEVICE(0x03F0, 0x4216) },
59 { USB_DEVICE(0x03F0, 0x5016) },
60 { USB_DEVICE(0x03F0, 0x5116) },
61 { USB_DEVICE(0x03F0, 0x5216) },
62 { USB_DEVICE(0x0409, 0x00D5) },
63 { USB_DEVICE(0x0409, 0x00D6) },
64 { USB_DEVICE(0x0409, 0x00D7) },
65 { USB_DEVICE(0x0409, 0x8024) },
66 { USB_DEVICE(0x0409, 0x8025) },
67 { USB_DEVICE(0x043E, 0x9C01) },
68 { USB_DEVICE(0x045E, 0x00CE) },
69 { USB_DEVICE(0x045E, 0x0400) },
70 { USB_DEVICE(0x045E, 0x0401) },
71 { USB_DEVICE(0x045E, 0x0402) },
72 { USB_DEVICE(0x045E, 0x0403) },
73 { USB_DEVICE(0x045E, 0x0404) },
74 { USB_DEVICE(0x045E, 0x0405) },
75 { USB_DEVICE(0x045E, 0x0406) },
76 { USB_DEVICE(0x045E, 0x0407) },
77 { USB_DEVICE(0x045E, 0x0408) },
78 { USB_DEVICE(0x045E, 0x0409) },
79 { USB_DEVICE(0x045E, 0x040A) },
80 { USB_DEVICE(0x045E, 0x040B) },
81 { USB_DEVICE(0x045E, 0x040C) },
82 { USB_DEVICE(0x045E, 0x040D) },
83 { USB_DEVICE(0x045E, 0x040E) },
84 { USB_DEVICE(0x045E, 0x040F) },
85 { USB_DEVICE(0x045E, 0x0410) },
86 { USB_DEVICE(0x045E, 0x0411) },
87 { USB_DEVICE(0x045E, 0x0412) },
88 { USB_DEVICE(0x045E, 0x0413) },
89 { USB_DEVICE(0x045E, 0x0414) },
90 { USB_DEVICE(0x045E, 0x0415) },
91 { USB_DEVICE(0x045E, 0x0416) },
92 { USB_DEVICE(0x045E, 0x0417) },
93 { USB_DEVICE(0x045E, 0x0432) },
94 { USB_DEVICE(0x045E, 0x0433) },
95 { USB_DEVICE(0x045E, 0x0434) },
96 { USB_DEVICE(0x045E, 0x0435) },
97 { USB_DEVICE(0x045E, 0x0436) },
98 { USB_DEVICE(0x045E, 0x0437) },
99 { USB_DEVICE(0x045E, 0x0438) },
100 { USB_DEVICE(0x045E, 0x0439) },
101 { USB_DEVICE(0x045E, 0x043A) },
102 { USB_DEVICE(0x045E, 0x043B) },
103 { USB_DEVICE(0x045E, 0x043C) },
104 { USB_DEVICE(0x045E, 0x043D) },
105 { USB_DEVICE(0x045E, 0x043E) },
106 { USB_DEVICE(0x045E, 0x043F) },
107 { USB_DEVICE(0x045E, 0x0440) },
108 { USB_DEVICE(0x045E, 0x0441) },
109 { USB_DEVICE(0x045E, 0x0442) },
110 { USB_DEVICE(0x045E, 0x0443) },
111 { USB_DEVICE(0x045E, 0x0444) },
112 { USB_DEVICE(0x045E, 0x0445) },
113 { USB_DEVICE(0x045E, 0x0446) },
114 { USB_DEVICE(0x045E, 0x0447) },
115 { USB_DEVICE(0x045E, 0x0448) },
116 { USB_DEVICE(0x045E, 0x0449) },
117 { USB_DEVICE(0x045E, 0x044A) },
118 { USB_DEVICE(0x045E, 0x044B) },
119 { USB_DEVICE(0x045E, 0x044C) },
120 { USB_DEVICE(0x045E, 0x044D) },
121 { USB_DEVICE(0x045E, 0x044E) },
122 { USB_DEVICE(0x045E, 0x044F) },
123 { USB_DEVICE(0x045E, 0x0450) },
124 { USB_DEVICE(0x045E, 0x0451) },
125 { USB_DEVICE(0x045E, 0x0452) },
126 { USB_DEVICE(0x045E, 0x0453) },
127 { USB_DEVICE(0x045E, 0x0454) },
128 { USB_DEVICE(0x045E, 0x0455) },
129 { USB_DEVICE(0x045E, 0x0456) },
130 { USB_DEVICE(0x045E, 0x0457) },
131 { USB_DEVICE(0x045E, 0x0458) },
132 { USB_DEVICE(0x045E, 0x0459) },
133 { USB_DEVICE(0x045E, 0x045A) },
134 { USB_DEVICE(0x045E, 0x045B) },
135 { USB_DEVICE(0x045E, 0x045C) },
136 { USB_DEVICE(0x045E, 0x045D) },
137 { USB_DEVICE(0x045E, 0x045E) },
138 { USB_DEVICE(0x045E, 0x045F) },
139 { USB_DEVICE(0x045E, 0x0460) },
140 { USB_DEVICE(0x045E, 0x0461) },
141 { USB_DEVICE(0x045E, 0x0462) },
142 { USB_DEVICE(0x045E, 0x0463) },
143 { USB_DEVICE(0x045E, 0x0464) },
144 { USB_DEVICE(0x045E, 0x0465) },
145 { USB_DEVICE(0x045E, 0x0466) },
146 { USB_DEVICE(0x045E, 0x0467) },
147 { USB_DEVICE(0x045E, 0x0468) },
148 { USB_DEVICE(0x045E, 0x0469) },
149 { USB_DEVICE(0x045E, 0x046A) },
150 { USB_DEVICE(0x045E, 0x046B) },
151 { USB_DEVICE(0x045E, 0x046C) },
152 { USB_DEVICE(0x045E, 0x046D) },
153 { USB_DEVICE(0x045E, 0x046E) },
154 { USB_DEVICE(0x045E, 0x046F) },
155 { USB_DEVICE(0x045E, 0x0470) },
156 { USB_DEVICE(0x045E, 0x0471) },
157 { USB_DEVICE(0x045E, 0x0472) },
158 { USB_DEVICE(0x045E, 0x0473) },
159 { USB_DEVICE(0x045E, 0x0474) },
160 { USB_DEVICE(0x045E, 0x0475) },
161 { USB_DEVICE(0x045E, 0x0476) },
162 { USB_DEVICE(0x045E, 0x0477) },
163 { USB_DEVICE(0x045E, 0x0478) },
164 { USB_DEVICE(0x045E, 0x0479) },
165 { USB_DEVICE(0x045E, 0x047A) },
166 { USB_DEVICE(0x045E, 0x047B) },
167 { USB_DEVICE(0x045E, 0x04C8) },
168 { USB_DEVICE(0x045E, 0x04C9) },
169 { USB_DEVICE(0x045E, 0x04CA) },
170 { USB_DEVICE(0x045E, 0x04CB) },
171 { USB_DEVICE(0x045E, 0x04CC) },
172 { USB_DEVICE(0x045E, 0x04CD) },
173 { USB_DEVICE(0x045E, 0x04CE) },
174 { USB_DEVICE(0x045E, 0x04D7) },
175 { USB_DEVICE(0x045E, 0x04D8) },
176 { USB_DEVICE(0x045E, 0x04D9) },
177 { USB_DEVICE(0x045E, 0x04DA) },
178 { USB_DEVICE(0x045E, 0x04DB) },
179 { USB_DEVICE(0x045E, 0x04DC) },
180 { USB_DEVICE(0x045E, 0x04DD) },
181 { USB_DEVICE(0x045E, 0x04DE) },
182 { USB_DEVICE(0x045E, 0x04DF) },
183 { USB_DEVICE(0x045E, 0x04E0) },
184 { USB_DEVICE(0x045E, 0x04E1) },
185 { USB_DEVICE(0x045E, 0x04E2) },
186 { USB_DEVICE(0x045E, 0x04E3) },
187 { USB_DEVICE(0x045E, 0x04E4) },
188 { USB_DEVICE(0x045E, 0x04E5) },
189 { USB_DEVICE(0x045E, 0x04E6) },
190 { USB_DEVICE(0x045E, 0x04E7) },
191 { USB_DEVICE(0x045E, 0x04E8) },
192 { USB_DEVICE(0x045E, 0x04E9) },
193 { USB_DEVICE(0x045E, 0x04EA) },
194 { USB_DEVICE(0x049F, 0x0003) },
195 { USB_DEVICE(0x049F, 0x0032) },
196 { USB_DEVICE(0x04A4, 0x0014) },
197 { USB_DEVICE(0x04AD, 0x0301) },
198 { USB_DEVICE(0x04AD, 0x0302) },
199 { USB_DEVICE(0x04AD, 0x0303) },
200 { USB_DEVICE(0x04AD, 0x0306) },
201 { USB_DEVICE(0x04B7, 0x0531) },
202 { USB_DEVICE(0x04C5, 0x1058) },
203 { USB_DEVICE(0x04C5, 0x1079) },
204 { USB_DEVICE(0x04DA, 0x2500) },
205 { USB_DEVICE(0x04DD, 0x9102) },
206 { USB_DEVICE(0x04DD, 0x9121) },
207 { USB_DEVICE(0x04DD, 0x9123) },
208 { USB_DEVICE(0x04DD, 0x9151) },
209 { USB_DEVICE(0x04DD, 0x91AC) },
210 { USB_DEVICE(0x04E8, 0x5F00) },
211 { USB_DEVICE(0x04E8, 0x5F01) },
212 { USB_DEVICE(0x04E8, 0x5F02) },
213 { USB_DEVICE(0x04E8, 0x5F03) },
214 { USB_DEVICE(0x04E8, 0x5F04) },
215 { USB_DEVICE(0x04E8, 0x6611) },
216 { USB_DEVICE(0x04E8, 0x6613) },
217 { USB_DEVICE(0x04E8, 0x6615) },
218 { USB_DEVICE(0x04E8, 0x6617) },
219 { USB_DEVICE(0x04E8, 0x6619) },
220 { USB_DEVICE(0x04E8, 0x661B) },
221 { USB_DEVICE(0x04E8, 0x662E) },
222 { USB_DEVICE(0x04E8, 0x6630) },
223 { USB_DEVICE(0x04E8, 0x6632) },
224 { USB_DEVICE(0x04f1, 0x3011) },
225 { USB_DEVICE(0x04F1, 0x3012) },
226 { USB_DEVICE(0x0502, 0x1631) },
227 { USB_DEVICE(0x0502, 0x1632) },
228 { USB_DEVICE(0x0502, 0x16E1) },
229 { USB_DEVICE(0x0502, 0x16E2) },
230 { USB_DEVICE(0x0502, 0x16E3) },
231 { USB_DEVICE(0x0536, 0x01A0) },
232 { USB_DEVICE(0x0543, 0x0ED9) },
233 { USB_DEVICE(0x0543, 0x1527) },
234 { USB_DEVICE(0x0543, 0x1529) },
235 { USB_DEVICE(0x0543, 0x152B) },
236 { USB_DEVICE(0x0543, 0x152E) },
237 { USB_DEVICE(0x0543, 0x1921) },
238 { USB_DEVICE(0x0543, 0x1922) },
239 { USB_DEVICE(0x0543, 0x1923) },
240 { USB_DEVICE(0x05E0, 0x2000) },
241 { USB_DEVICE(0x05E0, 0x2001) },
242 { USB_DEVICE(0x05E0, 0x2002) },
243 { USB_DEVICE(0x05E0, 0x2003) },
244 { USB_DEVICE(0x05E0, 0x2004) },
245 { USB_DEVICE(0x05E0, 0x2005) },
246 { USB_DEVICE(0x05E0, 0x2006) },
247 { USB_DEVICE(0x05E0, 0x2007) },
248 { USB_DEVICE(0x05E0, 0x2008) },
249 { USB_DEVICE(0x05E0, 0x2009) },
250 { USB_DEVICE(0x05E0, 0x200A) },
251 { USB_DEVICE(0x067E, 0x1001) },
252 { USB_DEVICE(0x07CF, 0x2001) },
253 { USB_DEVICE(0x07CF, 0x2002) },
254 { USB_DEVICE(0x07CF, 0x2003) },
255 { USB_DEVICE(0x0930, 0x0700) },
256 { USB_DEVICE(0x0930, 0x0705) },
257 { USB_DEVICE(0x0930, 0x0706) },
258 { USB_DEVICE(0x0930, 0x0707) },
259 { USB_DEVICE(0x0930, 0x0708) },
260 { USB_DEVICE(0x0930, 0x0709) },
261 { USB_DEVICE(0x0930, 0x070A) },
262 { USB_DEVICE(0x0930, 0x070B) },
263 { USB_DEVICE(0x094B, 0x0001) },
264 { USB_DEVICE(0x0960, 0x0065) },
265 { USB_DEVICE(0x0960, 0x0066) },
266 { USB_DEVICE(0x0960, 0x0067) },
267 { USB_DEVICE(0x0961, 0x0010) },
268 { USB_DEVICE(0x099E, 0x0052) },
269 { USB_DEVICE(0x099E, 0x4000) },
270 { USB_DEVICE(0x0B05, 0x4200) },
271 { USB_DEVICE(0x0B05, 0x4201) },
272 { USB_DEVICE(0x0B05, 0x4202) },
273 { USB_DEVICE(0x0B05, 0x420F) },
274 { USB_DEVICE(0x0B05, 0x9200) },
275 { USB_DEVICE(0x0B05, 0x9202) },
276 { USB_DEVICE(0x0BB4, 0x00CE) },
277 { USB_DEVICE(0x0BB4, 0x00CF) },
278 { USB_DEVICE(0x0BB4, 0x0A01) },
279 { USB_DEVICE(0x0BB4, 0x0A02) },
280 { USB_DEVICE(0x0BB4, 0x0A03) },
281 { USB_DEVICE(0x0BB4, 0x0A04) },
282 { USB_DEVICE(0x0BB4, 0x0A05) },
283 { USB_DEVICE(0x0BB4, 0x0A06) },
284 { USB_DEVICE(0x0BB4, 0x0A07) },
285 { USB_DEVICE(0x0BB4, 0x0A08) },
286 { USB_DEVICE(0x0BB4, 0x0A09) },
287 { USB_DEVICE(0x0BB4, 0x0A0A) },
288 { USB_DEVICE(0x0BB4, 0x0A0B) },
289 { USB_DEVICE(0x0BB4, 0x0A0C) },
290 { USB_DEVICE(0x0BB4, 0x0A0D) },
291 { USB_DEVICE(0x0BB4, 0x0A0E) },
292 { USB_DEVICE(0x0BB4, 0x0A0F) },
293 { USB_DEVICE(0x0BB4, 0x0A10) },
294 { USB_DEVICE(0x0BB4, 0x0A11) },
295 { USB_DEVICE(0x0BB4, 0x0A12) },
296 { USB_DEVICE(0x0BB4, 0x0A13) },
297 { USB_DEVICE(0x0BB4, 0x0A14) },
298 { USB_DEVICE(0x0BB4, 0x0A15) },
299 { USB_DEVICE(0x0BB4, 0x0A16) },
300 { USB_DEVICE(0x0BB4, 0x0A17) },
301 { USB_DEVICE(0x0BB4, 0x0A18) },
302 { USB_DEVICE(0x0BB4, 0x0A19) },
303 { USB_DEVICE(0x0BB4, 0x0A1A) },
304 { USB_DEVICE(0x0BB4, 0x0A1B) },
305 { USB_DEVICE(0x0BB4, 0x0A1C) },
306 { USB_DEVICE(0x0BB4, 0x0A1D) },
307 { USB_DEVICE(0x0BB4, 0x0A1E) },
308 { USB_DEVICE(0x0BB4, 0x0A1F) },
309 { USB_DEVICE(0x0BB4, 0x0A20) },
310 { USB_DEVICE(0x0BB4, 0x0A21) },
311 { USB_DEVICE(0x0BB4, 0x0A22) },
312 { USB_DEVICE(0x0BB4, 0x0A23) },
313 { USB_DEVICE(0x0BB4, 0x0A24) },
314 { USB_DEVICE(0x0BB4, 0x0A25) },
315 { USB_DEVICE(0x0BB4, 0x0A26) },
316 { USB_DEVICE(0x0BB4, 0x0A27) },
317 { USB_DEVICE(0x0BB4, 0x0A28) },
318 { USB_DEVICE(0x0BB4, 0x0A29) },
319 { USB_DEVICE(0x0BB4, 0x0A2A) },
320 { USB_DEVICE(0x0BB4, 0x0A2B) },
321 { USB_DEVICE(0x0BB4, 0x0A2C) },
322 { USB_DEVICE(0x0BB4, 0x0A2D) },
323 { USB_DEVICE(0x0BB4, 0x0A2E) },
324 { USB_DEVICE(0x0BB4, 0x0A2F) },
325 { USB_DEVICE(0x0BB4, 0x0A30) },
326 { USB_DEVICE(0x0BB4, 0x0A31) },
327 { USB_DEVICE(0x0BB4, 0x0A32) },
328 { USB_DEVICE(0x0BB4, 0x0A33) },
329 { USB_DEVICE(0x0BB4, 0x0A34) },
330 { USB_DEVICE(0x0BB4, 0x0A35) },
331 { USB_DEVICE(0x0BB4, 0x0A36) },
332 { USB_DEVICE(0x0BB4, 0x0A37) },
333 { USB_DEVICE(0x0BB4, 0x0A38) },
334 { USB_DEVICE(0x0BB4, 0x0A39) },
335 { USB_DEVICE(0x0BB4, 0x0A3A) },
336 { USB_DEVICE(0x0BB4, 0x0A3B) },
337 { USB_DEVICE(0x0BB4, 0x0A3C) },
338 { USB_DEVICE(0x0BB4, 0x0A3D) },
339 { USB_DEVICE(0x0BB4, 0x0A3E) },
340 { USB_DEVICE(0x0BB4, 0x0A3F) },
341 { USB_DEVICE(0x0BB4, 0x0A40) },
342 { USB_DEVICE(0x0BB4, 0x0A41) },
343 { USB_DEVICE(0x0BB4, 0x0A42) },
344 { USB_DEVICE(0x0BB4, 0x0A43) },
345 { USB_DEVICE(0x0BB4, 0x0A44) },
346 { USB_DEVICE(0x0BB4, 0x0A45) },
347 { USB_DEVICE(0x0BB4, 0x0A46) },
348 { USB_DEVICE(0x0BB4, 0x0A47) },
349 { USB_DEVICE(0x0BB4, 0x0A48) },
350 { USB_DEVICE(0x0BB4, 0x0A49) },
351 { USB_DEVICE(0x0BB4, 0x0A4A) },
352 { USB_DEVICE(0x0BB4, 0x0A4B) },
353 { USB_DEVICE(0x0BB4, 0x0A4C) },
354 { USB_DEVICE(0x0BB4, 0x0A4D) },
355 { USB_DEVICE(0x0BB4, 0x0A4E) },
356 { USB_DEVICE(0x0BB4, 0x0A4F) },
357 { USB_DEVICE(0x0BB4, 0x0A50) },
358 { USB_DEVICE(0x0BB4, 0x0A51) },
359 { USB_DEVICE(0x0BB4, 0x0A52) },
360 { USB_DEVICE(0x0BB4, 0x0A53) },
361 { USB_DEVICE(0x0BB4, 0x0A54) },
362 { USB_DEVICE(0x0BB4, 0x0A55) },
363 { USB_DEVICE(0x0BB4, 0x0A56) },
364 { USB_DEVICE(0x0BB4, 0x0A57) },
365 { USB_DEVICE(0x0BB4, 0x0A58) },
366 { USB_DEVICE(0x0BB4, 0x0A59) },
367 { USB_DEVICE(0x0BB4, 0x0A5A) },
368 { USB_DEVICE(0x0BB4, 0x0A5B) },
369 { USB_DEVICE(0x0BB4, 0x0A5C) },
370 { USB_DEVICE(0x0BB4, 0x0A5D) },
371 { USB_DEVICE(0x0BB4, 0x0A5E) },
372 { USB_DEVICE(0x0BB4, 0x0A5F) },
373 { USB_DEVICE(0x0BB4, 0x0A60) },
374 { USB_DEVICE(0x0BB4, 0x0A61) },
375 { USB_DEVICE(0x0BB4, 0x0A62) },
376 { USB_DEVICE(0x0BB4, 0x0A63) },
377 { USB_DEVICE(0x0BB4, 0x0A64) },
378 { USB_DEVICE(0x0BB4, 0x0A65) },
379 { USB_DEVICE(0x0BB4, 0x0A66) },
380 { USB_DEVICE(0x0BB4, 0x0A67) },
381 { USB_DEVICE(0x0BB4, 0x0A68) },
382 { USB_DEVICE(0x0BB4, 0x0A69) },
383 { USB_DEVICE(0x0BB4, 0x0A6A) },
384 { USB_DEVICE(0x0BB4, 0x0A6B) },
385 { USB_DEVICE(0x0BB4, 0x0A6C) },
386 { USB_DEVICE(0x0BB4, 0x0A6D) },
387 { USB_DEVICE(0x0BB4, 0x0A6E) },
388 { USB_DEVICE(0x0BB4, 0x0A6F) },
389 { USB_DEVICE(0x0BB4, 0x0A70) },
390 { USB_DEVICE(0x0BB4, 0x0A71) },
391 { USB_DEVICE(0x0BB4, 0x0A72) },
392 { USB_DEVICE(0x0BB4, 0x0A73) },
393 { USB_DEVICE(0x0BB4, 0x0A74) },
394 { USB_DEVICE(0x0BB4, 0x0A75) },
395 { USB_DEVICE(0x0BB4, 0x0A76) },
396 { USB_DEVICE(0x0BB4, 0x0A77) },
397 { USB_DEVICE(0x0BB4, 0x0A78) },
398 { USB_DEVICE(0x0BB4, 0x0A79) },
399 { USB_DEVICE(0x0BB4, 0x0A7A) },
400 { USB_DEVICE(0x0BB4, 0x0A7B) },
401 { USB_DEVICE(0x0BB4, 0x0A7C) },
402 { USB_DEVICE(0x0BB4, 0x0A7D) },
403 { USB_DEVICE(0x0BB4, 0x0A7E) },
404 { USB_DEVICE(0x0BB4, 0x0A7F) },
405 { USB_DEVICE(0x0BB4, 0x0A80) },
406 { USB_DEVICE(0x0BB4, 0x0A81) },
407 { USB_DEVICE(0x0BB4, 0x0A82) },
408 { USB_DEVICE(0x0BB4, 0x0A83) },
409 { USB_DEVICE(0x0BB4, 0x0A84) },
410 { USB_DEVICE(0x0BB4, 0x0A85) },
411 { USB_DEVICE(0x0BB4, 0x0A86) },
412 { USB_DEVICE(0x0BB4, 0x0A87) },
413 { USB_DEVICE(0x0BB4, 0x0A88) },
414 { USB_DEVICE(0x0BB4, 0x0A89) },
415 { USB_DEVICE(0x0BB4, 0x0A8A) },
416 { USB_DEVICE(0x0BB4, 0x0A8B) },
417 { USB_DEVICE(0x0BB4, 0x0A8C) },
418 { USB_DEVICE(0x0BB4, 0x0A8D) },
419 { USB_DEVICE(0x0BB4, 0x0A8E) },
420 { USB_DEVICE(0x0BB4, 0x0A8F) },
421 { USB_DEVICE(0x0BB4, 0x0A90) },
422 { USB_DEVICE(0x0BB4, 0x0A91) },
423 { USB_DEVICE(0x0BB4, 0x0A92) },
424 { USB_DEVICE(0x0BB4, 0x0A93) },
425 { USB_DEVICE(0x0BB4, 0x0A94) },
426 { USB_DEVICE(0x0BB4, 0x0A95) },
427 { USB_DEVICE(0x0BB4, 0x0A96) },
428 { USB_DEVICE(0x0BB4, 0x0A97) },
429 { USB_DEVICE(0x0BB4, 0x0A98) },
430 { USB_DEVICE(0x0BB4, 0x0A99) },
431 { USB_DEVICE(0x0BB4, 0x0A9A) },
432 { USB_DEVICE(0x0BB4, 0x0A9B) },
433 { USB_DEVICE(0x0BB4, 0x0A9C) },
434 { USB_DEVICE(0x0BB4, 0x0A9D) },
435 { USB_DEVICE(0x0BB4, 0x0A9E) },
436 { USB_DEVICE(0x0BB4, 0x0A9F) },
437 { USB_DEVICE(0x0BB4, 0x0BCE) },
438 { USB_DEVICE(0x0BF8, 0x1001) },
439 { USB_DEVICE(0x0C44, 0x03A2) },
440 { USB_DEVICE(0x0C8E, 0x6000) },
441 { USB_DEVICE(0x0CAD, 0x9001) },
442 { USB_DEVICE(0x0F4E, 0x0200) },
443 { USB_DEVICE(0x0F98, 0x0201) },
444 { USB_DEVICE(0x0FB8, 0x3001) },
445 { USB_DEVICE(0x0FB8, 0x3002) },
446 { USB_DEVICE(0x0FB8, 0x3003) },
447 { USB_DEVICE(0x0FB8, 0x4001) },
448 { USB_DEVICE(0x1066, 0x00CE) },
449 { USB_DEVICE(0x1066, 0x0300) },
450 { USB_DEVICE(0x1066, 0x0500) },
451 { USB_DEVICE(0x1066, 0x0600) },
452 { USB_DEVICE(0x1066, 0x0700) },
453 { USB_DEVICE(0x1114, 0x0001) },
454 { USB_DEVICE(0x1114, 0x0004) },
455 { USB_DEVICE(0x1114, 0x0006) },
456 { USB_DEVICE(0x1182, 0x1388) },
457 { USB_DEVICE(0x11D9, 0x1002) },
458 { USB_DEVICE(0x11D9, 0x1003) },
459 { USB_DEVICE(0x1231, 0xCE01) },
460 { USB_DEVICE(0x1231, 0xCE02) },
461 { USB_DEVICE(0x1690, 0x0601) },
462 { USB_DEVICE(0x22B8, 0x4204) },
463 { USB_DEVICE(0x22B8, 0x4214) },
464 { USB_DEVICE(0x22B8, 0x4224) },
465 { USB_DEVICE(0x22B8, 0x4234) },
466 { USB_DEVICE(0x22B8, 0x4244) },
467 { USB_DEVICE(0x3340, 0x011C) },
468 { USB_DEVICE(0x3340, 0x0326) },
469 { USB_DEVICE(0x3340, 0x0426) },
470 { USB_DEVICE(0x3340, 0x043A) },
471 { USB_DEVICE(0x3340, 0x051C) },
472 { USB_DEVICE(0x3340, 0x053A) },
473 { USB_DEVICE(0x3340, 0x071C) },
474 { USB_DEVICE(0x3340, 0x0B1C) },
475 { USB_DEVICE(0x3340, 0x0E3A) },
476 { USB_DEVICE(0x3340, 0x0F1C) },
477 { USB_DEVICE(0x3340, 0x0F3A) },
478 { USB_DEVICE(0x3340, 0x1326) },
479 { USB_DEVICE(0x3340, 0x191C) },
480 { USB_DEVICE(0x3340, 0x2326) },
481 { USB_DEVICE(0x3340, 0x3326) },
482 { USB_DEVICE(0x3708, 0x20CE) },
483 { USB_DEVICE(0x3708, 0x21CE) },
484 { USB_DEVICE(0x4113, 0x0210) },
485 { USB_DEVICE(0x4113, 0x0211) },
486 { USB_DEVICE(0x4113, 0x0400) },
487 { USB_DEVICE(0x4113, 0x0410) },
488 { USB_DEVICE(0x413C, 0x4001) },
489 { USB_DEVICE(0x413C, 0x4002) },
490 { USB_DEVICE(0x413C, 0x4003) },
491 { USB_DEVICE(0x413C, 0x4004) },
492 { USB_DEVICE(0x413C, 0x4005) },
493 { USB_DEVICE(0x413C, 0x4006) },
494 { USB_DEVICE(0x413C, 0x4007) },
495 { USB_DEVICE(0x413C, 0x4008) },
496 { USB_DEVICE(0x413C, 0x4009) },
497 { USB_DEVICE(0x4505, 0x0010) },
498 { USB_DEVICE(0x5E04, 0xCE00) },
511 .description =
"PocketPC PDA",
512 .id_table = ipaq_id_table,
514 .bulk_out_size = 256,
516 .attach = ipaq_startup,
517 .calc_num_ports = ipaq_calc_num_ports,
531 msleep(1000*initial_wait);
542 usb_sndctrlpipe(serial->
dev, 0), 0x22, 0x21,
543 0x1, 0,
NULL, 0, 100);
549 if (!retries && result) {
550 dev_err(&port->
dev,
"%s - failed doing control urb, error %d\n",
558 static int ipaq_calc_num_ports(
struct usb_serial *serial)
565 int ipaq_num_ports = 1;
567 dev_dbg(&serial->
dev->dev,
"%s - numberofendpoints: %d\n", __func__,
568 (
int)serial->
interface->cur_altsetting->desc.bNumEndpoints);
576 if (serial->
interface->cur_altsetting->desc.bNumEndpoints > 3) {
580 return ipaq_num_ports;
584 static int ipaq_startup(
struct usb_serial *serial)
594 if (serial->
dev->actconfig->desc.bConfigurationValue != 1) {
600 dev_err(&serial->
dev->dev,
"active config #%d != 1 ??\n",
601 serial->
dev->actconfig->desc.bConfigurationValue);
606 "%s - iPAQ module configured for %d ports\n", __func__,
620 "Maximum number of connect retries (one second each)");
624 "Time to wait before attempting a connection (in seconds)");