diff options
Diffstat (limited to 'drivers/usb/serial')
37 files changed, 1363 insertions, 1096 deletions
diff --git a/drivers/usb/serial/ChangeLog.old b/drivers/usb/serial/ChangeLog.old new file mode 100644 index 000000000000..c1b279939bbf --- /dev/null +++ b/drivers/usb/serial/ChangeLog.old | |||
@@ -0,0 +1,730 @@ | |||
1 | This is the contents of some of the drivers/usb/serial/ files that had old | ||
2 | changelog comments. They were quite old, and out of date, and we don't keep | ||
3 | them anymore, so I've put them here, away from the source files, in case | ||
4 | people still care to see them. | ||
5 | |||
6 | - Greg Kroah-Hartman <greg@kroah.com> October 20, 2005 | ||
7 | |||
8 | ----------------------------------------------------------------------- | ||
9 | usb-serial.h Change Log comments: | ||
10 | |||
11 | (03/26/2002) gkh | ||
12 | removed the port->tty check from port_paranoia_check() due to serial | ||
13 | consoles not having a tty device assigned to them. | ||
14 | |||
15 | (12/03/2001) gkh | ||
16 | removed active from the port structure. | ||
17 | added documentation to the usb_serial_device_type structure | ||
18 | |||
19 | (10/10/2001) gkh | ||
20 | added vendor and product to serial structure. Needed to determine device | ||
21 | owner when the device is disconnected. | ||
22 | |||
23 | (05/30/2001) gkh | ||
24 | added sem to port structure and removed port_lock | ||
25 | |||
26 | (10/05/2000) gkh | ||
27 | Added interrupt_in_endpointAddress and bulk_in_endpointAddress to help | ||
28 | fix bug with urb->dev not being set properly, now that the usb core | ||
29 | needs it. | ||
30 | |||
31 | (09/11/2000) gkh | ||
32 | Added usb_serial_debug_data function to help get rid of #DEBUG in the | ||
33 | drivers. | ||
34 | |||
35 | (08/28/2000) gkh | ||
36 | Added port_lock to port structure. | ||
37 | |||
38 | (08/08/2000) gkh | ||
39 | Added open_count to port structure. | ||
40 | |||
41 | (07/23/2000) gkh | ||
42 | Added bulk_out_endpointAddress to port structure. | ||
43 | |||
44 | (07/19/2000) gkh, pberger, and borchers | ||
45 | Modifications to allow usb-serial drivers to be modules. | ||
46 | |||
47 | ----------------------------------------------------------------------- | ||
48 | usb-serial.c Change Log comments: | ||
49 | |||
50 | (12/10/2002) gkh | ||
51 | Split the ports off into their own struct device, and added a | ||
52 | usb-serial bus driver. | ||
53 | |||
54 | (11/19/2002) gkh | ||
55 | removed a few #ifdefs for the generic code and cleaned up the failure | ||
56 | logic in initialization. | ||
57 | |||
58 | (10/02/2002) gkh | ||
59 | moved the console code to console.c and out of this file. | ||
60 | |||
61 | (06/05/2002) gkh | ||
62 | moved location of startup() call in serial_probe() until after all | ||
63 | of the port information and endpoints are initialized. This makes | ||
64 | things easier for some drivers. | ||
65 | |||
66 | (04/10/2002) gkh | ||
67 | added serial_read_proc function which creates a | ||
68 | /proc/tty/driver/usb-serial file. | ||
69 | |||
70 | (03/27/2002) gkh | ||
71 | Got USB serial console code working properly and merged into the main | ||
72 | version of the tree. Thanks to Randy Dunlap for the initial version | ||
73 | of this code, and for pushing me to finish it up. | ||
74 | The USB serial console works with any usb serial driver device. | ||
75 | |||
76 | (03/21/2002) gkh | ||
77 | Moved all manipulation of port->open_count into the core. Now the | ||
78 | individual driver's open and close functions are called only when the | ||
79 | first open() and last close() is called. Making the drivers a bit | ||
80 | smaller and simpler. | ||
81 | Fixed a bug if a driver didn't have the owner field set. | ||
82 | |||
83 | (02/26/2002) gkh | ||
84 | Moved all locking into the main serial_* functions, instead of having | ||
85 | the individual drivers have to grab the port semaphore. This should | ||
86 | reduce races. | ||
87 | Reworked the MOD_INC logic a bit to always increment and decrement, even | ||
88 | if the generic driver is being used. | ||
89 | |||
90 | (10/10/2001) gkh | ||
91 | usb_serial_disconnect() now sets the serial->dev pointer is to NULL to | ||
92 | help prevent child drivers from accessing the device since it is now | ||
93 | gone. | ||
94 | |||
95 | (09/13/2001) gkh | ||
96 | Moved generic driver initialize after we have registered with the USB | ||
97 | core. Thanks to Randy Dunlap for pointing this problem out. | ||
98 | |||
99 | (07/03/2001) gkh | ||
100 | Fixed module paramater size. Thanks to John Brockmeyer for the pointer. | ||
101 | Fixed vendor and product getting defined through the MODULE_PARM macro | ||
102 | if the Generic driver wasn't compiled in. | ||
103 | Fixed problem with generic_shutdown() not being called for drivers that | ||
104 | don't have a shutdown() function. | ||
105 | |||
106 | (06/06/2001) gkh | ||
107 | added evil hack that is needed for the prolific pl2303 device due to the | ||
108 | crazy way its endpoints are set up. | ||
109 | |||
110 | (05/30/2001) gkh | ||
111 | switched from using spinlock to a semaphore, which fixes lots of problems. | ||
112 | |||
113 | (04/08/2001) gb | ||
114 | Identify version on module load. | ||
115 | |||
116 | 2001_02_05 gkh | ||
117 | Fixed buffer overflows bug with the generic serial driver. Thanks to | ||
118 | Todd Squires <squirest@ct0.com> for fixing this. | ||
119 | |||
120 | (01/10/2001) gkh | ||
121 | Fixed bug where the generic serial adaptor grabbed _any_ device that was | ||
122 | offered to it. | ||
123 | |||
124 | (12/12/2000) gkh | ||
125 | Removed MOD_INC and MOD_DEC from poll and disconnect functions, and | ||
126 | moved them to the serial_open and serial_close functions. | ||
127 | Also fixed bug with there not being a MOD_DEC for the generic driver | ||
128 | (thanks to Gary Brubaker for finding this.) | ||
129 | |||
130 | (11/29/2000) gkh | ||
131 | Small NULL pointer initialization cleanup which saves a bit of disk image | ||
132 | |||
133 | (11/01/2000) Adam J. Richter | ||
134 | instead of using idVendor/idProduct pairs, usb serial drivers | ||
135 | now identify their hardware interest with usb_device_id tables, | ||
136 | which they usually have anyhow for use with MODULE_DEVICE_TABLE. | ||
137 | |||
138 | (10/05/2000) gkh | ||
139 | Fixed bug with urb->dev not being set properly, now that the usb | ||
140 | core needs it. | ||
141 | |||
142 | (09/11/2000) gkh | ||
143 | Removed DEBUG #ifdefs with call to usb_serial_debug_data | ||
144 | |||
145 | (08/28/2000) gkh | ||
146 | Added port_lock to port structure. | ||
147 | Added locks for SMP safeness to generic driver | ||
148 | Fixed the ability to open a generic device's port more than once. | ||
149 | |||
150 | (07/23/2000) gkh | ||
151 | Added bulk_out_endpointAddress to port structure. | ||
152 | |||
153 | (07/19/2000) gkh, pberger, and borchers | ||
154 | Modifications to allow usb-serial drivers to be modules. | ||
155 | |||
156 | (07/03/2000) gkh | ||
157 | Added more debugging to serial_ioctl call | ||
158 | |||
159 | (06/25/2000) gkh | ||
160 | Changed generic_write_bulk_callback to not call wake_up_interruptible | ||
161 | directly, but to have port_softint do it at a safer time. | ||
162 | |||
163 | (06/23/2000) gkh | ||
164 | Cleaned up debugging statements in a quest to find UHCI timeout bug. | ||
165 | |||
166 | (05/22/2000) gkh | ||
167 | Changed the makefile, enabling the big CONFIG_USB_SERIAL_SOMTHING to be | ||
168 | removed from the individual device source files. | ||
169 | |||
170 | (05/03/2000) gkh | ||
171 | Added the Digi Acceleport driver from Al Borchers and Peter Berger. | ||
172 | |||
173 | (05/02/2000) gkh | ||
174 | Changed devfs and tty register code to work properly now. This was based on | ||
175 | the ACM driver changes by Vojtech Pavlik. | ||
176 | |||
177 | (04/27/2000) Ryan VanderBijl | ||
178 | Put calls to *_paranoia_checks into one function. | ||
179 | |||
180 | (04/23/2000) gkh | ||
181 | Fixed bug that Randy Dunlap found for Generic devices with no bulk out ports. | ||
182 | Moved when the startup code printed out the devices that are supported. | ||
183 | |||
184 | (04/19/2000) gkh | ||
185 | Added driver for ZyXEL omni.net lcd plus ISDN TA | ||
186 | Made startup info message specify which drivers were compiled in. | ||
187 | |||
188 | (04/03/2000) gkh | ||
189 | Changed the probe process to remove the module unload races. | ||
190 | Changed where the tty layer gets initialized to have devfs work nicer. | ||
191 | Added initial devfs support. | ||
192 | |||
193 | (03/26/2000) gkh | ||
194 | Split driver up into device specific pieces. | ||
195 | |||
196 | (03/19/2000) gkh | ||
197 | Fixed oops that could happen when device was removed while a program | ||
198 | was talking to the device. | ||
199 | Removed the static urbs and now all urbs are created and destroyed | ||
200 | dynamically. | ||
201 | Reworked the internal interface. Now everything is based on the | ||
202 | usb_serial_port structure instead of the larger usb_serial structure. | ||
203 | This fixes the bug that a multiport device could not have more than | ||
204 | one port open at one time. | ||
205 | |||
206 | (03/17/2000) gkh | ||
207 | Added config option for debugging messages. | ||
208 | Added patch for keyspan pda from Brian Warner. | ||
209 | |||
210 | (03/06/2000) gkh | ||
211 | Added the keyspan pda code from Brian Warner <warner@lothar.com> | ||
212 | Moved a bunch of the port specific stuff into its own structure. This | ||
213 | is in anticipation of the true multiport devices (there's a bug if you | ||
214 | try to access more than one port of any multiport device right now) | ||
215 | |||
216 | (02/21/2000) gkh | ||
217 | Made it so that any serial devices only have to specify which functions | ||
218 | they want to overload from the generic function calls (great, | ||
219 | inheritance in C, in a driver, just what I wanted...) | ||
220 | Added support for set_termios and ioctl function calls. No drivers take | ||
221 | advantage of this yet. | ||
222 | Removed the #ifdef MODULE, now there is no module specific code. | ||
223 | Cleaned up a few comments in usb-serial.h that were wrong (thanks again | ||
224 | to Miles Lott). | ||
225 | Small fix to get_free_serial. | ||
226 | |||
227 | (02/14/2000) gkh | ||
228 | Removed the Belkin and Peracom functionality from the driver due to | ||
229 | the lack of support from the vendor, and me not wanting people to | ||
230 | accidenatly buy the device, expecting it to work with Linux. | ||
231 | Added read_bulk_callback and write_bulk_callback to the type structure | ||
232 | for the needs of the FTDI and WhiteHEAT driver. | ||
233 | Changed all reverences to FTDI to FTDI_SIO at the request of Bill | ||
234 | Ryder. | ||
235 | Changed the output urb size back to the max endpoint size to make | ||
236 | the ftdi_sio driver have it easier, and due to the fact that it didn't | ||
237 | really increase the speed any. | ||
238 | |||
239 | (02/11/2000) gkh | ||
240 | Added VISOR_FUNCTION_CONSOLE to the visor startup function. This was a | ||
241 | patch from Miles Lott (milos@insync.net). | ||
242 | Fixed bug with not restoring the minor range that a device grabs, if | ||
243 | the startup function fails (thanks Miles for finding this). | ||
244 | |||
245 | (02/05/2000) gkh | ||
246 | Added initial framework for the Keyspan PDA serial converter so that | ||
247 | Brian Warner has a place to put his code. | ||
248 | Made the ezusb specific functions generic enough that different | ||
249 | devices can use them (whiteheat and keyspan_pda both need them). | ||
250 | Split out a whole bunch of structure and other stuff to a separate | ||
251 | usb-serial.h file. | ||
252 | Made the Visor connection messages a little more understandable, now | ||
253 | that Miles Lott (milos@insync.net) has gotten the Generic channel to | ||
254 | work. Also made them always show up in the log file. | ||
255 | |||
256 | (01/25/2000) gkh | ||
257 | Added initial framework for FTDI serial converter so that Bill Ryder | ||
258 | has a place to put his code. | ||
259 | Added the vendor specific info from Handspring. Now we can print out | ||
260 | informational debug messages as well as understand what is happening. | ||
261 | |||
262 | (01/23/2000) gkh | ||
263 | Fixed problem of crash when trying to open a port that didn't have a | ||
264 | device assigned to it. Made the minor node finding a little smarter, | ||
265 | now it looks to find a continuous space for the new device. | ||
266 | |||
267 | (01/21/2000) gkh | ||
268 | Fixed bug in visor_startup with patch from Miles Lott (milos@insync.net) | ||
269 | Fixed get_serial_by_minor which was all messed up for multi port | ||
270 | devices. Fixed multi port problem for generic devices. Now the number | ||
271 | of ports is determined by the number of bulk out endpoints for the | ||
272 | generic device. | ||
273 | |||
274 | (01/19/2000) gkh | ||
275 | Removed lots of cruft that was around from the old (pre urb) driver | ||
276 | interface. | ||
277 | Made the serial_table dynamic. This should save lots of memory when | ||
278 | the number of minor nodes goes up to 256. | ||
279 | Added initial support for devices that have more than one port. | ||
280 | Added more debugging comments for the Visor, and added a needed | ||
281 | set_configuration call. | ||
282 | |||
283 | (01/17/2000) gkh | ||
284 | Fixed the WhiteHEAT firmware (my processing tool had a bug) | ||
285 | and added new debug loader firmware for it. | ||
286 | Removed the put_char function as it isn't really needed. | ||
287 | Added visor startup commands as found by the Win98 dump. | ||
288 | |||
289 | (01/13/2000) gkh | ||
290 | Fixed the vendor id for the generic driver to the one I meant it to be. | ||
291 | |||
292 | (01/12/2000) gkh | ||
293 | Forget the version numbering...that's pretty useless... | ||
294 | Made the driver able to be compiled so that the user can select which | ||
295 | converter they want to use. This allows people who only want the Visor | ||
296 | support to not pay the memory size price of the WhiteHEAT. | ||
297 | Fixed bug where the generic driver (idVendor=0000 and idProduct=0000) | ||
298 | grabbed the root hub. Not good. | ||
299 | |||
300 | version 0.4.0 (01/10/2000) gkh | ||
301 | Added whiteheat.h containing the firmware for the ConnectTech WhiteHEAT | ||
302 | device. Added startup function to allow firmware to be downloaded to | ||
303 | a device if it needs to be. | ||
304 | Added firmware download logic to the WhiteHEAT device. | ||
305 | Started to add #defines to split up the different drivers for potential | ||
306 | configuration option. | ||
307 | |||
308 | version 0.3.1 (12/30/99) gkh | ||
309 | Fixed problems with urb for bulk out. | ||
310 | Added initial support for multiple sets of endpoints. This enables | ||
311 | the Handspring Visor to be attached successfully. Only the first | ||
312 | bulk in / bulk out endpoint pair is being used right now. | ||
313 | |||
314 | version 0.3.0 (12/27/99) gkh | ||
315 | Added initial support for the Handspring Visor based on a patch from | ||
316 | Miles Lott (milos@sneety.insync.net) | ||
317 | Cleaned up the code a bunch and converted over to using urbs only. | ||
318 | |||
319 | version 0.2.3 (12/21/99) gkh | ||
320 | Added initial support for the Connect Tech WhiteHEAT converter. | ||
321 | Incremented the number of ports in expectation of getting the | ||
322 | WhiteHEAT to work properly (4 ports per connection). | ||
323 | Added notification on insertion and removal of what port the | ||
324 | device is/was connected to (and what kind of device it was). | ||
325 | |||
326 | version 0.2.2 (12/16/99) gkh | ||
327 | Changed major number to the new allocated number. We're legal now! | ||
328 | |||
329 | version 0.2.1 (12/14/99) gkh | ||
330 | Fixed bug that happens when device node is opened when there isn't a | ||
331 | device attached to it. Thanks to marek@webdesign.no for noticing this. | ||
332 | |||
333 | version 0.2.0 (11/10/99) gkh | ||
334 | Split up internals to make it easier to add different types of serial | ||
335 | converters to the code. | ||
336 | Added a "generic" driver that gets it's vendor and product id | ||
337 | from when the module is loaded. Thanks to David E. Nelson (dnelson@jump.net) | ||
338 | for the idea and sample code (from the usb scanner driver.) | ||
339 | Cleared up any licensing questions by releasing it under the GNU GPL. | ||
340 | |||
341 | version 0.1.2 (10/25/99) gkh | ||
342 | Fixed bug in detecting device. | ||
343 | |||
344 | version 0.1.1 (10/05/99) gkh | ||
345 | Changed the major number to not conflict with anything else. | ||
346 | |||
347 | version 0.1 (09/28/99) gkh | ||
348 | Can recognize the two different devices and start up a read from | ||
349 | device when asked to. Writes also work. No control signals yet, this | ||
350 | all is vendor specific data (i.e. no spec), also no control for | ||
351 | different baud rates or other bit settings. | ||
352 | Currently we are using the same devid as the acm driver. This needs | ||
353 | to change. | ||
354 | |||
355 | ----------------------------------------------------------------------- | ||
356 | visor.c Change Log comments: | ||
357 | |||
358 | (06/03/2003) Judd Montgomery <judd at jpilot.org> | ||
359 | Added support for module parameter options for untested/unknown | ||
360 | devices. | ||
361 | |||
362 | (03/09/2003) gkh | ||
363 | Added support for the Sony Clie NZ90V device. Thanks to Martin Brachtl | ||
364 | <brachtl@redgrep.cz> for the information. | ||
365 | |||
366 | (03/05/2003) gkh | ||
367 | Think Treo support is now working. | ||
368 | |||
369 | (04/03/2002) gkh | ||
370 | Added support for the Sony OS 4.1 devices. Thanks to Hiroyuki ARAKI | ||
371 | <hiro@zob.ne.jp> for the information. | ||
372 | |||
373 | (03/27/2002) gkh | ||
374 | Removed assumptions that port->tty was always valid (is not true | ||
375 | for usb serial console devices.) | ||
376 | |||
377 | (03/23/2002) gkh | ||
378 | Added support for the Palm i705 device, thanks to Thomas Riemer | ||
379 | <tom@netmech.com> for the information. | ||
380 | |||
381 | (03/21/2002) gkh | ||
382 | Added support for the Palm m130 device, thanks to Udo Eisenbarth | ||
383 | <udo.eisenbarth@web.de> for the information. | ||
384 | |||
385 | (02/27/2002) gkh | ||
386 | Reworked the urb handling logic. We have no more pool, but dynamically | ||
387 | allocate the urb and the transfer buffer on the fly. In testing this | ||
388 | does not incure any measurable overhead. This also relies on the fact | ||
389 | that we have proper reference counting logic for urbs. | ||
390 | |||
391 | (02/21/2002) SilaS | ||
392 | Added initial support for the Palm m515 devices. | ||
393 | |||
394 | (02/14/2002) gkh | ||
395 | Added support for the Clie S-360 device. | ||
396 | |||
397 | (12/18/2001) gkh | ||
398 | Added better Clie support for 3.5 devices. Thanks to Geoffrey Levand | ||
399 | for the patch. | ||
400 | |||
401 | (11/11/2001) gkh | ||
402 | Added support for the m125 devices, and added check to prevent oopses | ||
403 | for Clié devices that lie about the number of ports they have. | ||
404 | |||
405 | (08/30/2001) gkh | ||
406 | Added support for the Clie devices, both the 3.5 and 4.0 os versions. | ||
407 | Many thanks to Daniel Burke, and Bryan Payne for helping with this. | ||
408 | |||
409 | (08/23/2001) gkh | ||
410 | fixed a few potential bugs pointed out by Oliver Neukum. | ||
411 | |||
412 | (05/30/2001) gkh | ||
413 | switched from using spinlock to a semaphore, which fixes lots of problems. | ||
414 | |||
415 | (05/28/2000) gkh | ||
416 | Added initial support for the Palm m500 and Palm m505 devices. | ||
417 | |||
418 | (04/08/2001) gb | ||
419 | Identify version on module load. | ||
420 | |||
421 | (01/21/2000) gkh | ||
422 | Added write_room and chars_in_buffer, as they were previously using the | ||
423 | generic driver versions which is all wrong now that we are using an urb | ||
424 | pool. Thanks to Wolfgang Grandegger for pointing this out to me. | ||
425 | Removed count assignment in the write function, which was not needed anymore | ||
426 | either. Thanks to Al Borchers for pointing this out. | ||
427 | |||
428 | (12/12/2000) gkh | ||
429 | Moved MOD_DEC to end of visor_close to be nicer, as the final write | ||
430 | message can sleep. | ||
431 | |||
432 | (11/12/2000) gkh | ||
433 | Fixed bug with data being dropped on the floor by forcing tty->low_latency | ||
434 | to be on. Hopefully this fixes the OHCI issue! | ||
435 | |||
436 | (11/01/2000) Adam J. Richter | ||
437 | usb_device_id table support | ||
438 | |||
439 | (10/05/2000) gkh | ||
440 | Fixed bug with urb->dev not being set properly, now that the usb | ||
441 | core needs it. | ||
442 | |||
443 | (09/11/2000) gkh | ||
444 | Got rid of always calling kmalloc for every urb we wrote out to the | ||
445 | device. | ||
446 | Added visor_read_callback so we can keep track of bytes in and out for | ||
447 | those people who like to know the speed of their device. | ||
448 | Removed DEBUG #ifdefs with call to usb_serial_debug_data | ||
449 | |||
450 | (09/06/2000) gkh | ||
451 | Fixed oops in visor_exit. Need to uncomment usb_unlink_urb call _after_ | ||
452 | the host controller drivers set urb->dev = NULL when the urb is finished. | ||
453 | |||
454 | (08/28/2000) gkh | ||
455 | Added locks for SMP safeness. | ||
456 | |||
457 | (08/08/2000) gkh | ||
458 | Fixed endian problem in visor_startup. | ||
459 | Fixed MOD_INC and MOD_DEC logic and the ability to open a port more | ||
460 | than once. | ||
461 | |||
462 | (07/23/2000) gkh | ||
463 | Added pool of write urbs to speed up transfers to the visor. | ||
464 | |||
465 | (07/19/2000) gkh | ||
466 | Added module_init and module_exit functions to handle the fact that this | ||
467 | driver is a loadable module now. | ||
468 | |||
469 | (07/03/2000) gkh | ||
470 | Added visor_set_ioctl and visor_set_termios functions (they don't do much | ||
471 | of anything, but are good for debugging.) | ||
472 | |||
473 | (06/25/2000) gkh | ||
474 | Fixed bug in visor_unthrottle that should help with the disconnect in PPP | ||
475 | bug that people have been reporting. | ||
476 | |||
477 | (06/23/2000) gkh | ||
478 | Cleaned up debugging statements in a quest to find UHCI timeout bug. | ||
479 | |||
480 | (04/27/2000) Ryan VanderBijl | ||
481 | Fixed memory leak in visor_close | ||
482 | |||
483 | (03/26/2000) gkh | ||
484 | Split driver up into device specific pieces. | ||
485 | |||
486 | ----------------------------------------------------------------------- | ||
487 | pl2303.c Change Log comments: | ||
488 | |||
489 | 2002_Mar_26 gkh | ||
490 | allowed driver to work properly if there is no tty assigned to a port | ||
491 | (this happens for serial console devices.) | ||
492 | |||
493 | 2001_Oct_06 gkh | ||
494 | Added RTS and DTR line control. Thanks to joe@bndlg.de for parts of it. | ||
495 | |||
496 | 2001_Sep_19 gkh | ||
497 | Added break support. | ||
498 | |||
499 | 2001_Aug_30 gkh | ||
500 | fixed oops in write_bulk_callback. | ||
501 | |||
502 | 2001_Aug_28 gkh | ||
503 | reworked buffer logic to be like other usb-serial drivers. Hopefully | ||
504 | removing some reported problems. | ||
505 | |||
506 | 2001_Jun_06 gkh | ||
507 | finished porting to 2.4 format. | ||
508 | |||
509 | |||
510 | ----------------------------------------------------------------------- | ||
511 | io_edgeport.c Change Log comments: | ||
512 | |||
513 | 2003_04_03 al borchers | ||
514 | - fixed a bug (that shows up with dosemu) where the tty struct is | ||
515 | used in a callback after it has been freed | ||
516 | |||
517 | 2.3 2002_03_08 greg kroah-hartman | ||
518 | - fixed bug when multiple devices were attached at the same time. | ||
519 | |||
520 | 2.2 2001_11_14 greg kroah-hartman | ||
521 | - fixed bug in edge_close that kept the port from being used more | ||
522 | than once. | ||
523 | - fixed memory leak on device removal. | ||
524 | - fixed potential double free of memory when command urb submitting | ||
525 | failed. | ||
526 | - other small cleanups when the device is removed | ||
527 | |||
528 | 2.1 2001_07_09 greg kroah-hartman | ||
529 | - added support for TIOCMBIS and TIOCMBIC. | ||
530 | |||
531 | (04/08/2001) gb | ||
532 | - Identify version on module load. | ||
533 | |||
534 | 2.0 2001_03_05 greg kroah-hartman | ||
535 | - reworked entire driver to fit properly in with the other usb-serial | ||
536 | drivers. Occasional oopses still happen, but it's a good start. | ||
537 | |||
538 | 1.2.3 (02/23/2001) greg kroah-hartman | ||
539 | - changed device table to work properly for 2.4.x final format. | ||
540 | - fixed problem with dropping data at high data rates. | ||
541 | |||
542 | 1.2.2 (11/27/2000) greg kroah-hartman | ||
543 | - cleaned up more NTisms. | ||
544 | - Added device table for 2.4.0-test11 | ||
545 | |||
546 | 1.2.1 (11/08/2000) greg kroah-hartman | ||
547 | - Started to clean up NTisms. | ||
548 | - Fixed problem with dev field of urb for kernels >= 2.4.0-test9 | ||
549 | |||
550 | 1.2 (10/17/2000) David Iacovelli | ||
551 | Remove all EPIC code and GPL source | ||
552 | Fix RELEVANT_IFLAG macro to include flow control | ||
553 | changes port configuration changes. | ||
554 | Fix redefinition of SERIAL_MAGIC | ||
555 | Change all timeout values to 5 seconds | ||
556 | Tried to fix the UHCI multiple urb submission, but failed miserably. | ||
557 | it seems to work fine with OHCI. | ||
558 | ( Greg take a look at the #if 0 at end of WriteCmdUsb() we must | ||
559 | find a way to work arount this UHCI bug ) | ||
560 | |||
561 | 1.1 (10/11/2000) David Iacovelli | ||
562 | Fix XON/XOFF flow control to support both IXON and IXOFF | ||
563 | |||
564 | 0.9.27 (06/30/2000) David Iacovelli | ||
565 | Added transmit queue and now allocate urb for command writes. | ||
566 | |||
567 | 0.9.26 (06/29/2000) David Iacovelli | ||
568 | Add support for 80251 based edgeport | ||
569 | |||
570 | 0.9.25 (06/27/2000) David Iacovelli | ||
571 | Do not close the port if it has multiple opens. | ||
572 | |||
573 | 0.9.24 (05/26/2000) David Iacovelli | ||
574 | Add IOCTLs to support RXTX and JAVA POS | ||
575 | and first cut at running BlackBox Demo | ||
576 | |||
577 | 0.9.23 (05/24/2000) David Iacovelli | ||
578 | Add IOCTLs to support RXTX and JAVA POS | ||
579 | |||
580 | 0.9.22 (05/23/2000) David Iacovelli | ||
581 | fixed bug in enumeration. If epconfig turns on mapping by | ||
582 | path after a device is already plugged in, we now update | ||
583 | the mapping correctly | ||
584 | |||
585 | 0.9.21 (05/16/2000) David Iacovelli | ||
586 | Added BlockUntilChaseResp() to also wait for txcredits | ||
587 | Updated the way we allocate and handle write URBs | ||
588 | Add debug code to dump buffers | ||
589 | |||
590 | 0.9.20 (05/01/2000) David Iacovelli | ||
591 | change driver to use usb/tts/ | ||
592 | |||
593 | 0.9.19 (05/01/2000) David Iacovelli | ||
594 | Update code to compile if DEBUG is off | ||
595 | |||
596 | 0.9.18 (04/28/2000) David Iacovelli | ||
597 | cleanup and test tty_register with devfs | ||
598 | |||
599 | 0.9.17 (04/27/2000) greg kroah-hartman | ||
600 | changed tty_register around to be like the way it | ||
601 | was before, but now it works properly with devfs. | ||
602 | |||
603 | 0.9.16 (04/26/2000) david iacovelli | ||
604 | Fixed bug in GetProductInfo() | ||
605 | |||
606 | 0.9.15 (04/25/2000) david iacovelli | ||
607 | Updated enumeration | ||
608 | |||
609 | 0.9.14 (04/24/2000) david iacovelli | ||
610 | Removed all config/status IOCTLS and | ||
611 | converted to using /proc/edgeport | ||
612 | still playing with devfs | ||
613 | |||
614 | 0.9.13 (04/24/2000) david iacovelli | ||
615 | Removed configuration based on ttyUSB0 | ||
616 | Added support for configuration using /prod/edgeport | ||
617 | first attempt at using devfs (not working yet!) | ||
618 | Added IOCTL to GetProductInfo() | ||
619 | Added support for custom baud rates | ||
620 | Add support for random port numbers | ||
621 | |||
622 | 0.9.12 (04/18/2000) david iacovelli | ||
623 | added additional configuration IOCTLs | ||
624 | use ttyUSB0 for configuration | ||
625 | |||
626 | 0.9.11 (04/17/2000) greg kroah-hartman | ||
627 | fixed module initialization race conditions. | ||
628 | made all urbs dynamically allocated. | ||
629 | made driver devfs compatible. now it only registers the tty device | ||
630 | when the device is actually plugged in. | ||
631 | |||
632 | 0.9.10 (04/13/2000) greg kroah-hartman | ||
633 | added proc interface framework. | ||
634 | |||
635 | 0.9.9 (04/13/2000) david iacovelli | ||
636 | added enumeration code and ioctls to configure the device | ||
637 | |||
638 | 0.9.8 (04/12/2000) david iacovelli | ||
639 | Change interrupt read start when device is plugged in | ||
640 | and stop when device is removed | ||
641 | process interrupt reads when all ports are closed | ||
642 | (keep value of rxBytesAvail consistent with the edgeport) | ||
643 | set the USB_BULK_QUEUE flag so that we can shove a bunch | ||
644 | of urbs at once down the pipe | ||
645 | |||
646 | 0.9.7 (04/10/2000) david iacovelli | ||
647 | start to add enumeration code. | ||
648 | generate serial number for epic devices | ||
649 | add support for kdb | ||
650 | |||
651 | 0.9.6 (03/30/2000) david iacovelli | ||
652 | add IOCTL to get string, manufacture, and boot descriptors | ||
653 | |||
654 | 0.9.5 (03/14/2000) greg kroah-hartman | ||
655 | more error checking added to SerialOpen to try to fix UHCI open problem | ||
656 | |||
657 | 0.9.4 (03/09/2000) greg kroah-hartman | ||
658 | added more error checking to handle oops when data is hanging | ||
659 | around and tty is abruptly closed. | ||
660 | |||
661 | 0.9.3 (03/09/2000) david iacovelli | ||
662 | Add epic support for xon/xoff chars | ||
663 | play with performance | ||
664 | |||
665 | 0.9.2 (03/08/2000) greg kroah-hartman | ||
666 | changed most "info" calls to "dbg" | ||
667 | implemented flow control properly in the termios call | ||
668 | |||
669 | 0.9.1 (03/08/2000) david iacovelli | ||
670 | added EPIC support | ||
671 | enabled bootloader update | ||
672 | |||
673 | 0.9 (03/08/2000) greg kroah-hartman | ||
674 | Release to IO networks. | ||
675 | Integrated changes that David made | ||
676 | made getting urbs for writing SMP safe | ||
677 | |||
678 | 0.8 (03/07/2000) greg kroah-hartman | ||
679 | Release to IO networks. | ||
680 | Fixed problems that were seen in code by David. | ||
681 | Now both Edgeport/4 and Edgeport/2 works properly. | ||
682 | Changed most of the functions to use port instead of serial. | ||
683 | |||
684 | 0.7 (02/27/2000) greg kroah-hartman | ||
685 | Milestone 3 release. | ||
686 | Release to IO Networks | ||
687 | ioctl for waiting on line change implemented. | ||
688 | ioctl for getting statistics implemented. | ||
689 | multiport support working. | ||
690 | lsr and msr registers are now handled properly. | ||
691 | change break now hooked up and working. | ||
692 | support for all known Edgeport devices. | ||
693 | |||
694 | 0.6 (02/22/2000) greg kroah-hartman | ||
695 | Release to IO networks. | ||
696 | CHASE is implemented correctly when port is closed. | ||
697 | SerialOpen now blocks correctly until port is fully opened. | ||
698 | |||
699 | 0.5 (02/20/2000) greg kroah-hartman | ||
700 | Release to IO networks. | ||
701 | Known problems: | ||
702 | modem status register changes are not sent on to the user | ||
703 | CHASE is not implemented when the port is closed. | ||
704 | |||
705 | 0.4 (02/16/2000) greg kroah-hartman | ||
706 | Second cut at the CeBit demo. | ||
707 | Doesn't leak memory on every write to the port | ||
708 | Still small leaks on startup. | ||
709 | Added support for Edgeport/2 and Edgeport/8 | ||
710 | |||
711 | 0.3 (02/15/2000) greg kroah-hartman | ||
712 | CeBit demo release. | ||
713 | Force the line settings to 4800, 8, 1, e for the demo. | ||
714 | Warning! This version leaks memory like crazy! | ||
715 | |||
716 | 0.2 (01/30/2000) greg kroah-hartman | ||
717 | Milestone 1 release. | ||
718 | Device is found by USB subsystem, enumerated, fimware is downloaded | ||
719 | and the descriptors are printed to the debug log, config is set, and | ||
720 | green light starts to blink. Open port works, and data can be sent | ||
721 | and received at the default settings of the UART. Loopback connector | ||
722 | and debug log confirms this. | ||
723 | |||
724 | 0.1 (01/23/2000) greg kroah-hartman | ||
725 | Initial release to help IO Networks try to set up their test system. | ||
726 | Edgeport4 is recognized, firmware is downloaded, config is set so | ||
727 | device blinks green light every 3 sec. Port is bound, but opening, | ||
728 | closing, and sending data do not work properly. | ||
729 | |||
730 | |||
diff --git a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig index 9438909e87a5..7b5e8e4ee2bb 100644 --- a/drivers/usb/serial/Kconfig +++ b/drivers/usb/serial/Kconfig | |||
@@ -394,6 +394,15 @@ config USB_SERIAL_MCT_U232 | |||
394 | To compile this driver as a module, choose M here: the | 394 | To compile this driver as a module, choose M here: the |
395 | module will be called mct_u232. | 395 | module will be called mct_u232. |
396 | 396 | ||
397 | config USB_SERIAL_NOKIA_DKU2 | ||
398 | tristate "USB Nokia DKU2 Driver" | ||
399 | depends on USB_SERIAL | ||
400 | help | ||
401 | Say Y here if you want to use a Nokia DKU2 device. | ||
402 | |||
403 | To compile this driver as a module, choose M here: the | ||
404 | module will be called nokia_dku2. | ||
405 | |||
397 | config USB_SERIAL_PL2303 | 406 | config USB_SERIAL_PL2303 |
398 | tristate "USB Prolific 2303 Single Port Serial Driver" | 407 | tristate "USB Prolific 2303 Single Port Serial Driver" |
399 | depends on USB_SERIAL | 408 | depends on USB_SERIAL |
diff --git a/drivers/usb/serial/Makefile b/drivers/usb/serial/Makefile index 6c7cdcc99a9e..55fd461793b7 100644 --- a/drivers/usb/serial/Makefile +++ b/drivers/usb/serial/Makefile | |||
@@ -31,6 +31,7 @@ obj-$(CONFIG_USB_SERIAL_KEYSPAN_PDA) += keyspan_pda.o | |||
31 | obj-$(CONFIG_USB_SERIAL_KLSI) += kl5kusb105.o | 31 | obj-$(CONFIG_USB_SERIAL_KLSI) += kl5kusb105.o |
32 | obj-$(CONFIG_USB_SERIAL_KOBIL_SCT) += kobil_sct.o | 32 | obj-$(CONFIG_USB_SERIAL_KOBIL_SCT) += kobil_sct.o |
33 | obj-$(CONFIG_USB_SERIAL_MCT_U232) += mct_u232.o | 33 | obj-$(CONFIG_USB_SERIAL_MCT_U232) += mct_u232.o |
34 | obj-$(CONFIG_USB_SERIAL_NOKIA_DKU2) += nokia_dku2.o | ||
34 | obj-$(CONFIG_USB_SERIAL_OMNINET) += omninet.o | 35 | obj-$(CONFIG_USB_SERIAL_OMNINET) += omninet.o |
35 | obj-$(CONFIG_USB_SERIAL_OPTION) += option.o | 36 | obj-$(CONFIG_USB_SERIAL_OPTION) += option.o |
36 | obj-$(CONFIG_USB_SERIAL_PL2303) += pl2303.o | 37 | obj-$(CONFIG_USB_SERIAL_PL2303) += pl2303.o |
diff --git a/drivers/usb/serial/airprime.c b/drivers/usb/serial/airprime.c index 926d4c2c1600..1f29d8837327 100644 --- a/drivers/usb/serial/airprime.c +++ b/drivers/usb/serial/airprime.c | |||
@@ -30,9 +30,11 @@ static struct usb_driver airprime_driver = { | |||
30 | .id_table = id_table, | 30 | .id_table = id_table, |
31 | }; | 31 | }; |
32 | 32 | ||
33 | static struct usb_serial_device_type airprime_device = { | 33 | static struct usb_serial_driver airprime_device = { |
34 | .owner = THIS_MODULE, | 34 | .driver = { |
35 | .name = "airprime", | 35 | .owner = THIS_MODULE, |
36 | .name = "airprime", | ||
37 | }, | ||
36 | .id_table = id_table, | 38 | .id_table = id_table, |
37 | .num_interrupt_in = NUM_DONT_CARE, | 39 | .num_interrupt_in = NUM_DONT_CARE, |
38 | .num_bulk_in = NUM_DONT_CARE, | 40 | .num_bulk_in = NUM_DONT_CARE, |
diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c index abb1b2c543bb..84bc0ee4f061 100644 --- a/drivers/usb/serial/belkin_sa.c +++ b/drivers/usb/serial/belkin_sa.c | |||
@@ -121,10 +121,12 @@ static struct usb_driver belkin_driver = { | |||
121 | }; | 121 | }; |
122 | 122 | ||
123 | /* All of the device info needed for the serial converters */ | 123 | /* All of the device info needed for the serial converters */ |
124 | static struct usb_serial_device_type belkin_device = { | 124 | static struct usb_serial_driver belkin_device = { |
125 | .owner = THIS_MODULE, | 125 | .driver = { |
126 | .name = "Belkin / Peracom / GoHubs USB Serial Adapter", | 126 | .owner = THIS_MODULE, |
127 | .short_name = "belkin", | 127 | .name = "belkin", |
128 | }, | ||
129 | .description = "Belkin / Peracom / GoHubs USB Serial Adapter", | ||
128 | .id_table = id_table_combined, | 130 | .id_table = id_table_combined, |
129 | .num_interrupt_in = 1, | 131 | .num_interrupt_in = 1, |
130 | .num_bulk_in = 1, | 132 | .num_bulk_in = 1, |
diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c index 2f612c2d894b..664139afcfa9 100644 --- a/drivers/usb/serial/bus.c +++ b/drivers/usb/serial/bus.c | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | static int usb_serial_device_match (struct device *dev, struct device_driver *drv) | 19 | static int usb_serial_device_match (struct device *dev, struct device_driver *drv) |
20 | { | 20 | { |
21 | struct usb_serial_device_type *driver; | 21 | struct usb_serial_driver *driver; |
22 | const struct usb_serial_port *port; | 22 | const struct usb_serial_port *port; |
23 | 23 | ||
24 | /* | 24 | /* |
@@ -44,7 +44,7 @@ struct bus_type usb_serial_bus_type = { | |||
44 | 44 | ||
45 | static int usb_serial_device_probe (struct device *dev) | 45 | static int usb_serial_device_probe (struct device *dev) |
46 | { | 46 | { |
47 | struct usb_serial_device_type *driver; | 47 | struct usb_serial_driver *driver; |
48 | struct usb_serial_port *port; | 48 | struct usb_serial_port *port; |
49 | int retval = 0; | 49 | int retval = 0; |
50 | int minor; | 50 | int minor; |
@@ -57,13 +57,13 @@ static int usb_serial_device_probe (struct device *dev) | |||
57 | 57 | ||
58 | driver = port->serial->type; | 58 | driver = port->serial->type; |
59 | if (driver->port_probe) { | 59 | if (driver->port_probe) { |
60 | if (!try_module_get(driver->owner)) { | 60 | if (!try_module_get(driver->driver.owner)) { |
61 | dev_err(dev, "module get failed, exiting\n"); | 61 | dev_err(dev, "module get failed, exiting\n"); |
62 | retval = -EIO; | 62 | retval = -EIO; |
63 | goto exit; | 63 | goto exit; |
64 | } | 64 | } |
65 | retval = driver->port_probe (port); | 65 | retval = driver->port_probe (port); |
66 | module_put(driver->owner); | 66 | module_put(driver->driver.owner); |
67 | if (retval) | 67 | if (retval) |
68 | goto exit; | 68 | goto exit; |
69 | } | 69 | } |
@@ -72,7 +72,7 @@ static int usb_serial_device_probe (struct device *dev) | |||
72 | tty_register_device (usb_serial_tty_driver, minor, dev); | 72 | tty_register_device (usb_serial_tty_driver, minor, dev); |
73 | dev_info(&port->serial->dev->dev, | 73 | dev_info(&port->serial->dev->dev, |
74 | "%s converter now attached to ttyUSB%d\n", | 74 | "%s converter now attached to ttyUSB%d\n", |
75 | driver->name, minor); | 75 | driver->description, minor); |
76 | 76 | ||
77 | exit: | 77 | exit: |
78 | return retval; | 78 | return retval; |
@@ -80,7 +80,7 @@ exit: | |||
80 | 80 | ||
81 | static int usb_serial_device_remove (struct device *dev) | 81 | static int usb_serial_device_remove (struct device *dev) |
82 | { | 82 | { |
83 | struct usb_serial_device_type *driver; | 83 | struct usb_serial_driver *driver; |
84 | struct usb_serial_port *port; | 84 | struct usb_serial_port *port; |
85 | int retval = 0; | 85 | int retval = 0; |
86 | int minor; | 86 | int minor; |
@@ -92,43 +92,38 @@ static int usb_serial_device_remove (struct device *dev) | |||
92 | 92 | ||
93 | driver = port->serial->type; | 93 | driver = port->serial->type; |
94 | if (driver->port_remove) { | 94 | if (driver->port_remove) { |
95 | if (!try_module_get(driver->owner)) { | 95 | if (!try_module_get(driver->driver.owner)) { |
96 | dev_err(dev, "module get failed, exiting\n"); | 96 | dev_err(dev, "module get failed, exiting\n"); |
97 | retval = -EIO; | 97 | retval = -EIO; |
98 | goto exit; | 98 | goto exit; |
99 | } | 99 | } |
100 | retval = driver->port_remove (port); | 100 | retval = driver->port_remove (port); |
101 | module_put(driver->owner); | 101 | module_put(driver->driver.owner); |
102 | } | 102 | } |
103 | exit: | 103 | exit: |
104 | minor = port->number; | 104 | minor = port->number; |
105 | tty_unregister_device (usb_serial_tty_driver, minor); | 105 | tty_unregister_device (usb_serial_tty_driver, minor); |
106 | dev_info(dev, "%s converter now disconnected from ttyUSB%d\n", | 106 | dev_info(dev, "%s converter now disconnected from ttyUSB%d\n", |
107 | driver->name, minor); | 107 | driver->description, minor); |
108 | 108 | ||
109 | return retval; | 109 | return retval; |
110 | } | 110 | } |
111 | 111 | ||
112 | int usb_serial_bus_register(struct usb_serial_device_type *device) | 112 | int usb_serial_bus_register(struct usb_serial_driver *driver) |
113 | { | 113 | { |
114 | int retval; | 114 | int retval; |
115 | 115 | ||
116 | if (device->short_name) | 116 | driver->driver.bus = &usb_serial_bus_type; |
117 | device->driver.name = (char *)device->short_name; | 117 | driver->driver.probe = usb_serial_device_probe; |
118 | else | 118 | driver->driver.remove = usb_serial_device_remove; |
119 | device->driver.name = (char *)device->name; | ||
120 | device->driver.bus = &usb_serial_bus_type; | ||
121 | device->driver.probe = usb_serial_device_probe; | ||
122 | device->driver.remove = usb_serial_device_remove; | ||
123 | device->driver.owner = device->owner; | ||
124 | 119 | ||
125 | retval = driver_register(&device->driver); | 120 | retval = driver_register(&driver->driver); |
126 | 121 | ||
127 | return retval; | 122 | return retval; |
128 | } | 123 | } |
129 | 124 | ||
130 | void usb_serial_bus_deregister(struct usb_serial_device_type *device) | 125 | void usb_serial_bus_deregister(struct usb_serial_driver *driver) |
131 | { | 126 | { |
132 | driver_unregister (&device->driver); | 127 | driver_unregister(&driver->driver); |
133 | } | 128 | } |
134 | 129 | ||
diff --git a/drivers/usb/serial/cp2101.c b/drivers/usb/serial/cp2101.c index 97c78c21e8d1..c5334dd89b12 100644 --- a/drivers/usb/serial/cp2101.c +++ b/drivers/usb/serial/cp2101.c | |||
@@ -67,15 +67,17 @@ MODULE_DEVICE_TABLE (usb, id_table); | |||
67 | 67 | ||
68 | static struct usb_driver cp2101_driver = { | 68 | static struct usb_driver cp2101_driver = { |
69 | .owner = THIS_MODULE, | 69 | .owner = THIS_MODULE, |
70 | .name = "CP2101", | 70 | .name = "cp2101", |
71 | .probe = usb_serial_probe, | 71 | .probe = usb_serial_probe, |
72 | .disconnect = usb_serial_disconnect, | 72 | .disconnect = usb_serial_disconnect, |
73 | .id_table = id_table, | 73 | .id_table = id_table, |
74 | }; | 74 | }; |
75 | 75 | ||
76 | static struct usb_serial_device_type cp2101_device = { | 76 | static struct usb_serial_driver cp2101_device = { |
77 | .owner = THIS_MODULE, | 77 | .driver = { |
78 | .name = "CP2101", | 78 | .owner = THIS_MODULE, |
79 | .name = "cp2101", | ||
80 | }, | ||
79 | .id_table = id_table, | 81 | .id_table = id_table, |
80 | .num_interrupt_in = 0, | 82 | .num_interrupt_in = 0, |
81 | .num_bulk_in = 0, | 83 | .num_bulk_in = 0, |
diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c index b5b431067b08..e581e4ae8483 100644 --- a/drivers/usb/serial/cyberjack.c +++ b/drivers/usb/serial/cyberjack.c | |||
@@ -83,10 +83,12 @@ static struct usb_driver cyberjack_driver = { | |||
83 | .id_table = id_table, | 83 | .id_table = id_table, |
84 | }; | 84 | }; |
85 | 85 | ||
86 | static struct usb_serial_device_type cyberjack_device = { | 86 | static struct usb_serial_driver cyberjack_device = { |
87 | .owner = THIS_MODULE, | 87 | .driver = { |
88 | .name = "Reiner SCT Cyberjack USB card reader", | 88 | .owner = THIS_MODULE, |
89 | .short_name = "cyberjack", | 89 | .name = "cyberjack", |
90 | }, | ||
91 | .description = "Reiner SCT Cyberjack USB card reader", | ||
90 | .id_table = id_table, | 92 | .id_table = id_table, |
91 | .num_interrupt_in = 1, | 93 | .num_interrupt_in = 1, |
92 | .num_bulk_in = 1, | 94 | .num_bulk_in = 1, |
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index 9ee1aaff2fcd..af9290ed257b 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c | |||
@@ -176,10 +176,12 @@ static unsigned int cypress_buf_put(struct cypress_buf *cb, const char *buf, u | |||
176 | static unsigned int cypress_buf_get(struct cypress_buf *cb, char *buf, unsigned int count); | 176 | static unsigned int cypress_buf_get(struct cypress_buf *cb, char *buf, unsigned int count); |
177 | 177 | ||
178 | 178 | ||
179 | static struct usb_serial_device_type cypress_earthmate_device = { | 179 | static struct usb_serial_driver cypress_earthmate_device = { |
180 | .owner = THIS_MODULE, | 180 | .driver = { |
181 | .name = "DeLorme Earthmate USB", | 181 | .owner = THIS_MODULE, |
182 | .short_name = "earthmate", | 182 | .name = "earthmate", |
183 | }, | ||
184 | .description = "DeLorme Earthmate USB", | ||
183 | .id_table = id_table_earthmate, | 185 | .id_table = id_table_earthmate, |
184 | .num_interrupt_in = 1, | 186 | .num_interrupt_in = 1, |
185 | .num_interrupt_out = 1, | 187 | .num_interrupt_out = 1, |
@@ -203,10 +205,12 @@ static struct usb_serial_device_type cypress_earthmate_device = { | |||
203 | .write_int_callback = cypress_write_int_callback, | 205 | .write_int_callback = cypress_write_int_callback, |
204 | }; | 206 | }; |
205 | 207 | ||
206 | static struct usb_serial_device_type cypress_hidcom_device = { | 208 | static struct usb_serial_driver cypress_hidcom_device = { |
207 | .owner = THIS_MODULE, | 209 | .driver = { |
208 | .name = "HID->COM RS232 Adapter", | 210 | .owner = THIS_MODULE, |
209 | .short_name = "cyphidcom", | 211 | .name = "cyphidcom", |
212 | }, | ||
213 | .description = "HID->COM RS232 Adapter", | ||
210 | .id_table = id_table_cyphidcomrs232, | 214 | .id_table = id_table_cyphidcomrs232, |
211 | .num_interrupt_in = 1, | 215 | .num_interrupt_in = 1, |
212 | .num_interrupt_out = 1, | 216 | .num_interrupt_out = 1, |
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c index a19a47f6cf12..dc74644a603d 100644 --- a/drivers/usb/serial/digi_acceleport.c +++ b/drivers/usb/serial/digi_acceleport.c | |||
@@ -503,10 +503,12 @@ static struct usb_driver digi_driver = { | |||
503 | 503 | ||
504 | /* device info needed for the Digi serial converter */ | 504 | /* device info needed for the Digi serial converter */ |
505 | 505 | ||
506 | static struct usb_serial_device_type digi_acceleport_2_device = { | 506 | static struct usb_serial_driver digi_acceleport_2_device = { |
507 | .owner = THIS_MODULE, | 507 | .driver = { |
508 | .name = "Digi 2 port USB adapter", | 508 | .owner = THIS_MODULE, |
509 | .short_name = "digi_2", | 509 | .name = "digi_2", |
510 | }, | ||
511 | .description = "Digi 2 port USB adapter", | ||
510 | .id_table = id_table_2, | 512 | .id_table = id_table_2, |
511 | .num_interrupt_in = 0, | 513 | .num_interrupt_in = 0, |
512 | .num_bulk_in = 4, | 514 | .num_bulk_in = 4, |
@@ -530,10 +532,12 @@ static struct usb_serial_device_type digi_acceleport_2_device = { | |||
530 | .shutdown = digi_shutdown, | 532 | .shutdown = digi_shutdown, |
531 | }; | 533 | }; |
532 | 534 | ||
533 | static struct usb_serial_device_type digi_acceleport_4_device = { | 535 | static struct usb_serial_driver digi_acceleport_4_device = { |
534 | .owner = THIS_MODULE, | 536 | .driver = { |
535 | .name = "Digi 4 port USB adapter", | 537 | .owner = THIS_MODULE, |
536 | .short_name = "digi_4", | 538 | .name = "digi_4", |
539 | }, | ||
540 | .description = "Digi 4 port USB adapter", | ||
537 | .id_table = id_table_4, | 541 | .id_table = id_table_4, |
538 | .num_interrupt_in = 0, | 542 | .num_interrupt_in = 0, |
539 | .num_bulk_in = 5, | 543 | .num_bulk_in = 5, |
diff --git a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c index 8d562ab454a8..0b0546dcc7b9 100644 --- a/drivers/usb/serial/empeg.c +++ b/drivers/usb/serial/empeg.c | |||
@@ -112,9 +112,11 @@ static struct usb_driver empeg_driver = { | |||
112 | .id_table = id_table, | 112 | .id_table = id_table, |
113 | }; | 113 | }; |
114 | 114 | ||
115 | static struct usb_serial_device_type empeg_device = { | 115 | static struct usb_serial_driver empeg_device = { |
116 | .owner = THIS_MODULE, | 116 | .driver = { |
117 | .name = "Empeg", | 117 | .owner = THIS_MODULE, |
118 | .name = "empeg", | ||
119 | }, | ||
118 | .id_table = id_table, | 120 | .id_table = id_table, |
119 | .num_interrupt_in = 0, | 121 | .num_interrupt_in = 0, |
120 | .num_bulk_in = 1, | 122 | .num_bulk_in = 1, |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 5a8631c8a4a7..61204bf7cd78 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -411,6 +411,8 @@ static struct usb_device_id id_table_combined [] = { | |||
411 | { USB_DEVICE(FTDI_VID, FTDI_ELV_UM100_PID) }, | 411 | { USB_DEVICE(FTDI_VID, FTDI_ELV_UM100_PID) }, |
412 | { USB_DEVICE(FTDI_VID, FTDI_ELV_UR100_PID) }, | 412 | { USB_DEVICE(FTDI_VID, FTDI_ELV_UR100_PID) }, |
413 | { USB_DEVICE(FTDI_VID, FTDI_ELV_ALC8500_PID) }, | 413 | { USB_DEVICE(FTDI_VID, FTDI_ELV_ALC8500_PID) }, |
414 | { USB_DEVICE(FTDI_VID, FTDI_PYRAMID_PID) }, | ||
415 | { USB_DEVICE(FTDI_VID, FTDI_ELV_FHZ1000PC_PID) }, | ||
414 | /* | 416 | /* |
415 | * These will probably use user-space drivers. Uncomment them if | 417 | * These will probably use user-space drivers. Uncomment them if |
416 | * you need them or use the user-specified vendor/product module | 418 | * you need them or use the user-specified vendor/product module |
@@ -428,7 +430,6 @@ static struct usb_device_id id_table_combined [] = { | |||
428 | /* { USB_DEVICE(FTDI_VID, FTDI_ELV_T1100_PID) }, */ | 430 | /* { USB_DEVICE(FTDI_VID, FTDI_ELV_T1100_PID) }, */ |
429 | /* { USB_DEVICE(FTDI_VID, FTDI_ELV_PCD200_PID) }, */ | 431 | /* { USB_DEVICE(FTDI_VID, FTDI_ELV_PCD200_PID) }, */ |
430 | /* { USB_DEVICE(FTDI_VID, FTDI_ELV_ULA200_PID) }, */ | 432 | /* { USB_DEVICE(FTDI_VID, FTDI_ELV_ULA200_PID) }, */ |
431 | /* { USB_DEVICE(FTDI_VID, FTDI_ELV_FHZ1000PC_PID) }, */ | ||
432 | /* { USB_DEVICE(FTDI_VID, FTDI_ELV_CSI8_PID) }, */ | 433 | /* { USB_DEVICE(FTDI_VID, FTDI_ELV_CSI8_PID) }, */ |
433 | /* { USB_DEVICE(FTDI_VID, FTDI_ELV_EM1000DL_PID) }, */ | 434 | /* { USB_DEVICE(FTDI_VID, FTDI_ELV_EM1000DL_PID) }, */ |
434 | /* { USB_DEVICE(FTDI_VID, FTDI_ELV_PCK100_PID) }, */ | 435 | /* { USB_DEVICE(FTDI_VID, FTDI_ELV_PCK100_PID) }, */ |
@@ -471,6 +472,9 @@ static struct usb_device_id id_table_combined [] = { | |||
471 | { USB_DEVICE(FTDI_VID, FTDI_MHAM_Y6_PID) }, | 472 | { USB_DEVICE(FTDI_VID, FTDI_MHAM_Y6_PID) }, |
472 | { USB_DEVICE(FTDI_VID, FTDI_MHAM_Y8_PID) }, | 473 | { USB_DEVICE(FTDI_VID, FTDI_MHAM_Y8_PID) }, |
473 | { USB_DEVICE(EVOLUTION_VID, EVOLUTION_ER1_PID) }, | 474 | { USB_DEVICE(EVOLUTION_VID, EVOLUTION_ER1_PID) }, |
475 | { USB_DEVICE(FTDI_VID, FTDI_ARTEMIS_PID) }, | ||
476 | { USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16_PID) }, | ||
477 | { USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16HR_PID) }, | ||
474 | { }, /* Optional parameter entry */ | 478 | { }, /* Optional parameter entry */ |
475 | { } /* Terminating entry */ | 479 | { } /* Terminating entry */ |
476 | }; | 480 | }; |
@@ -558,10 +562,12 @@ static unsigned short int ftdi_232am_baud_to_divisor (int baud); | |||
558 | static __u32 ftdi_232bm_baud_base_to_divisor (int baud, int base); | 562 | static __u32 ftdi_232bm_baud_base_to_divisor (int baud, int base); |
559 | static __u32 ftdi_232bm_baud_to_divisor (int baud); | 563 | static __u32 ftdi_232bm_baud_to_divisor (int baud); |
560 | 564 | ||
561 | static struct usb_serial_device_type ftdi_sio_device = { | 565 | static struct usb_serial_driver ftdi_sio_device = { |
562 | .owner = THIS_MODULE, | 566 | .driver = { |
563 | .name = "FTDI USB Serial Device", | 567 | .owner = THIS_MODULE, |
564 | .short_name = "ftdi_sio", | 568 | .name = "ftdi_sio", |
569 | }, | ||
570 | .description = "FTDI USB Serial Device", | ||
565 | .id_table = id_table_combined, | 571 | .id_table = id_table_combined, |
566 | .num_interrupt_in = 0, | 572 | .num_interrupt_in = 0, |
567 | .num_bulk_in = 1, | 573 | .num_bulk_in = 1, |
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h index 2c35d74cc6d6..ddb63df31ce6 100644 --- a/drivers/usb/serial/ftdi_sio.h +++ b/drivers/usb/serial/ftdi_sio.h | |||
@@ -199,6 +199,19 @@ | |||
199 | #define FTDI_PIEGROUP_PID 0xF208 /* Product Id */ | 199 | #define FTDI_PIEGROUP_PID 0xF208 /* Product Id */ |
200 | 200 | ||
201 | /* | 201 | /* |
202 | * Definitions for Artemis astronomical USB based cameras | ||
203 | * Check it at http://www.artemisccd.co.uk/ | ||
204 | */ | ||
205 | #define FTDI_ARTEMIS_PID 0xDF28 /* All Artemis Cameras */ | ||
206 | |||
207 | /* | ||
208 | * Definitions for ATIK Instruments astronomical USB based cameras | ||
209 | * Check it at http://www.atik-instruments.com/ | ||
210 | */ | ||
211 | #define FTDI_ATIK_ATK16_PID 0xDF30 /* ATIK ATK-16 Camera */ | ||
212 | #define FTDI_ATIK_ATK16HR_PID 0xDF31 /* ATIK ATK-16HR Camera */ | ||
213 | |||
214 | /* | ||
202 | * Protego product ids | 215 | * Protego product ids |
203 | */ | 216 | */ |
204 | #define PROTEGO_SPECIAL_1 0xFC70 /* special/unknown device */ | 217 | #define PROTEGO_SPECIAL_1 0xFC70 /* special/unknown device */ |
@@ -329,6 +342,9 @@ | |||
329 | #define EVOLUTION_VID 0xDEEE /* Vendor ID */ | 342 | #define EVOLUTION_VID 0xDEEE /* Vendor ID */ |
330 | #define EVOLUTION_ER1_PID 0x0300 /* ER1 Control Module */ | 343 | #define EVOLUTION_ER1_PID 0x0300 /* ER1 Control Module */ |
331 | 344 | ||
345 | /* Pyramid Computer GmbH */ | ||
346 | #define FTDI_PYRAMID_PID 0xE6C8 /* Pyramid Appliance Display */ | ||
347 | |||
332 | /* Commands */ | 348 | /* Commands */ |
333 | #define FTDI_SIO_RESET 0 /* Reset the port */ | 349 | #define FTDI_SIO_RESET 0 /* Reset the port */ |
334 | #define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */ | 350 | #define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */ |
diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c index 2ef614d5c8f2..35820bda7ae1 100644 --- a/drivers/usb/serial/garmin_gps.c +++ b/drivers/usb/serial/garmin_gps.c | |||
@@ -1468,16 +1468,13 @@ static void garmin_shutdown (struct usb_serial *serial) | |||
1468 | } | 1468 | } |
1469 | 1469 | ||
1470 | 1470 | ||
1471 | |||
1472 | |||
1473 | |||
1474 | |||
1475 | |||
1476 | /* All of the device info needed */ | 1471 | /* All of the device info needed */ |
1477 | static struct usb_serial_device_type garmin_device = { | 1472 | static struct usb_serial_driver garmin_device = { |
1478 | .owner = THIS_MODULE, | 1473 | .driver = { |
1479 | .name = "Garmin GPS usb/tty", | 1474 | .owner = THIS_MODULE, |
1480 | .short_name = "garmin_gps", | 1475 | .name = "garmin_gps", |
1476 | }, | ||
1477 | .description = "Garmin GPS usb/tty", | ||
1481 | .id_table = id_table, | 1478 | .id_table = id_table, |
1482 | .num_interrupt_in = 1, | 1479 | .num_interrupt_in = 1, |
1483 | .num_bulk_in = 1, | 1480 | .num_bulk_in = 1, |
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 5f7d3193d355..8909208f506a 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c | |||
@@ -36,10 +36,11 @@ MODULE_PARM_DESC(product, "User specified USB idProduct"); | |||
36 | static struct usb_device_id generic_device_ids[2]; /* Initially all zeroes. */ | 36 | static struct usb_device_id generic_device_ids[2]; /* Initially all zeroes. */ |
37 | 37 | ||
38 | /* All of the device info needed for the Generic Serial Converter */ | 38 | /* All of the device info needed for the Generic Serial Converter */ |
39 | struct usb_serial_device_type usb_serial_generic_device = { | 39 | struct usb_serial_driver usb_serial_generic_device = { |
40 | .owner = THIS_MODULE, | 40 | .driver = { |
41 | .name = "Generic", | 41 | .owner = THIS_MODULE, |
42 | .short_name = "generic", | 42 | .name = "generic", |
43 | }, | ||
43 | .id_table = generic_device_ids, | 44 | .id_table = generic_device_ids, |
44 | .num_interrupt_in = NUM_DONT_CARE, | 45 | .num_interrupt_in = NUM_DONT_CARE, |
45 | .num_bulk_in = NUM_DONT_CARE, | 46 | .num_bulk_in = NUM_DONT_CARE, |
diff --git a/drivers/usb/serial/hp4x.c b/drivers/usb/serial/hp4x.c index 64d55fbd206e..8eadfb705601 100644 --- a/drivers/usb/serial/hp4x.c +++ b/drivers/usb/serial/hp4x.c | |||
@@ -38,15 +38,17 @@ MODULE_DEVICE_TABLE(usb, id_table); | |||
38 | 38 | ||
39 | static struct usb_driver hp49gp_driver = { | 39 | static struct usb_driver hp49gp_driver = { |
40 | .owner = THIS_MODULE, | 40 | .owner = THIS_MODULE, |
41 | .name = "HP4X", | 41 | .name = "hp4X", |
42 | .probe = usb_serial_probe, | 42 | .probe = usb_serial_probe, |
43 | .disconnect = usb_serial_disconnect, | 43 | .disconnect = usb_serial_disconnect, |
44 | .id_table = id_table, | 44 | .id_table = id_table, |
45 | }; | 45 | }; |
46 | 46 | ||
47 | static struct usb_serial_device_type hp49gp_device = { | 47 | static struct usb_serial_driver hp49gp_device = { |
48 | .owner = THIS_MODULE, | 48 | .driver = { |
49 | .name = "HP4X", | 49 | .owner = THIS_MODULE, |
50 | .name = "hp4X", | ||
51 | }, | ||
50 | .id_table = id_table, | 52 | .id_table = id_table, |
51 | .num_interrupt_in = NUM_DONT_CARE, | 53 | .num_interrupt_in = NUM_DONT_CARE, |
52 | .num_bulk_in = NUM_DONT_CARE, | 54 | .num_bulk_in = NUM_DONT_CARE, |
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index 04bfe279d763..dc4c498bd1ed 100644 --- a/drivers/usb/serial/io_edgeport.c +++ b/drivers/usb/serial/io_edgeport.c | |||
@@ -27,225 +27,6 @@ | |||
27 | * Networks technical support, or Peter Berger <pberger@brimson.com>, | 27 | * Networks technical support, or Peter Berger <pberger@brimson.com>, |
28 | * or Al Borchers <alborchers@steinerpoint.com>. | 28 | * or Al Borchers <alborchers@steinerpoint.com>. |
29 | * | 29 | * |
30 | * Version history: | ||
31 | * | ||
32 | * 2003_04_03 al borchers | ||
33 | * - fixed a bug (that shows up with dosemu) where the tty struct is | ||
34 | * used in a callback after it has been freed | ||
35 | * | ||
36 | * 2.3 2002_03_08 greg kroah-hartman | ||
37 | * - fixed bug when multiple devices were attached at the same time. | ||
38 | * | ||
39 | * 2.2 2001_11_14 greg kroah-hartman | ||
40 | * - fixed bug in edge_close that kept the port from being used more | ||
41 | * than once. | ||
42 | * - fixed memory leak on device removal. | ||
43 | * - fixed potential double free of memory when command urb submitting | ||
44 | * failed. | ||
45 | * - other small cleanups when the device is removed | ||
46 | * | ||
47 | * 2.1 2001_07_09 greg kroah-hartman | ||
48 | * - added support for TIOCMBIS and TIOCMBIC. | ||
49 | * | ||
50 | * (04/08/2001) gb | ||
51 | * - Identify version on module load. | ||
52 | * | ||
53 | * 2.0 2001_03_05 greg kroah-hartman | ||
54 | * - reworked entire driver to fit properly in with the other usb-serial | ||
55 | * drivers. Occasional oopses still happen, but it's a good start. | ||
56 | * | ||
57 | * 1.2.3 (02/23/2001) greg kroah-hartman | ||
58 | * - changed device table to work properly for 2.4.x final format. | ||
59 | * - fixed problem with dropping data at high data rates. | ||
60 | * | ||
61 | * 1.2.2 (11/27/2000) greg kroah-hartman | ||
62 | * - cleaned up more NTisms. | ||
63 | * - Added device table for 2.4.0-test11 | ||
64 | * | ||
65 | * 1.2.1 (11/08/2000) greg kroah-hartman | ||
66 | * - Started to clean up NTisms. | ||
67 | * - Fixed problem with dev field of urb for kernels >= 2.4.0-test9 | ||
68 | * | ||
69 | * 1.2 (10/17/2000) David Iacovelli | ||
70 | * Remove all EPIC code and GPL source | ||
71 | * Fix RELEVANT_IFLAG macro to include flow control | ||
72 | * changes port configuration changes. | ||
73 | * Fix redefinition of SERIAL_MAGIC | ||
74 | * Change all timeout values to 5 seconds | ||
75 | * Tried to fix the UHCI multiple urb submission, but failed miserably. | ||
76 | * it seems to work fine with OHCI. | ||
77 | * ( Greg take a look at the #if 0 at end of WriteCmdUsb() we must | ||
78 | * find a way to work arount this UHCI bug ) | ||
79 | * | ||
80 | * 1.1 (10/11/2000) David Iacovelli | ||
81 | * Fix XON/XOFF flow control to support both IXON and IXOFF | ||
82 | * | ||
83 | * 0.9.27 (06/30/2000) David Iacovelli | ||
84 | * Added transmit queue and now allocate urb for command writes. | ||
85 | * | ||
86 | * 0.9.26 (06/29/2000) David Iacovelli | ||
87 | * Add support for 80251 based edgeport | ||
88 | * | ||
89 | * 0.9.25 (06/27/2000) David Iacovelli | ||
90 | * Do not close the port if it has multiple opens. | ||
91 | * | ||
92 | * 0.9.24 (05/26/2000) David Iacovelli | ||
93 | * Add IOCTLs to support RXTX and JAVA POS | ||
94 | * and first cut at running BlackBox Demo | ||
95 | * | ||
96 | * 0.9.23 (05/24/2000) David Iacovelli | ||
97 | * Add IOCTLs to support RXTX and JAVA POS | ||
98 | * | ||
99 | * 0.9.22 (05/23/2000) David Iacovelli | ||
100 | * fixed bug in enumeration. If epconfig turns on mapping by | ||
101 | * path after a device is already plugged in, we now update | ||
102 | * the mapping correctly | ||
103 | * | ||
104 | * 0.9.21 (05/16/2000) David Iacovelli | ||
105 | * Added BlockUntilChaseResp() to also wait for txcredits | ||
106 | * Updated the way we allocate and handle write URBs | ||
107 | * Add debug code to dump buffers | ||
108 | * | ||
109 | * 0.9.20 (05/01/2000) David Iacovelli | ||
110 | * change driver to use usb/tts/ | ||
111 | * | ||
112 | * 0.9.19 (05/01/2000) David Iacovelli | ||
113 | * Update code to compile if DEBUG is off | ||
114 | * | ||
115 | * 0.9.18 (04/28/2000) David Iacovelli | ||
116 | * cleanup and test tty_register with devfs | ||
117 | * | ||
118 | * 0.9.17 (04/27/2000) greg kroah-hartman | ||
119 | * changed tty_register around to be like the way it | ||
120 | * was before, but now it works properly with devfs. | ||
121 | * | ||
122 | * 0.9.16 (04/26/2000) david iacovelli | ||
123 | * Fixed bug in GetProductInfo() | ||
124 | * | ||
125 | * 0.9.15 (04/25/2000) david iacovelli | ||
126 | * Updated enumeration | ||
127 | * | ||
128 | * 0.9.14 (04/24/2000) david iacovelli | ||
129 | * Removed all config/status IOCTLS and | ||
130 | * converted to using /proc/edgeport | ||
131 | * still playing with devfs | ||
132 | * | ||
133 | * 0.9.13 (04/24/2000) david iacovelli | ||
134 | * Removed configuration based on ttyUSB0 | ||
135 | * Added support for configuration using /prod/edgeport | ||
136 | * first attempt at using devfs (not working yet!) | ||
137 | * Added IOCTL to GetProductInfo() | ||
138 | * Added support for custom baud rates | ||
139 | * Add support for random port numbers | ||
140 | * | ||
141 | * 0.9.12 (04/18/2000) david iacovelli | ||
142 | * added additional configuration IOCTLs | ||
143 | * use ttyUSB0 for configuration | ||
144 | * | ||
145 | * 0.9.11 (04/17/2000) greg kroah-hartman | ||
146 | * fixed module initialization race conditions. | ||
147 | * made all urbs dynamically allocated. | ||
148 | * made driver devfs compatible. now it only registers the tty device | ||
149 | * when the device is actually plugged in. | ||
150 | * | ||
151 | * 0.9.10 (04/13/2000) greg kroah-hartman | ||
152 | * added proc interface framework. | ||
153 | * | ||
154 | * 0.9.9 (04/13/2000) david iacovelli | ||
155 | * added enumeration code and ioctls to configure the device | ||
156 | * | ||
157 | * 0.9.8 (04/12/2000) david iacovelli | ||
158 | * Change interrupt read start when device is plugged in | ||
159 | * and stop when device is removed | ||
160 | * process interrupt reads when all ports are closed | ||
161 | * (keep value of rxBytesAvail consistent with the edgeport) | ||
162 | * set the USB_BULK_QUEUE flag so that we can shove a bunch | ||
163 | * of urbs at once down the pipe | ||
164 | * | ||
165 | * 0.9.7 (04/10/2000) david iacovelli | ||
166 | * start to add enumeration code. | ||
167 | * generate serial number for epic devices | ||
168 | * add support for kdb | ||
169 | * | ||
170 | * 0.9.6 (03/30/2000) david iacovelli | ||
171 | * add IOCTL to get string, manufacture, and boot descriptors | ||
172 | * | ||
173 | * 0.9.5 (03/14/2000) greg kroah-hartman | ||
174 | * more error checking added to SerialOpen to try to fix UHCI open problem | ||
175 | * | ||
176 | * 0.9.4 (03/09/2000) greg kroah-hartman | ||
177 | * added more error checking to handle oops when data is hanging | ||
178 | * around and tty is abruptly closed. | ||
179 | * | ||
180 | * 0.9.3 (03/09/2000) david iacovelli | ||
181 | * Add epic support for xon/xoff chars | ||
182 | * play with performance | ||
183 | * | ||
184 | * 0.9.2 (03/08/2000) greg kroah-hartman | ||
185 | * changed most "info" calls to "dbg" | ||
186 | * implemented flow control properly in the termios call | ||
187 | * | ||
188 | * 0.9.1 (03/08/2000) david iacovelli | ||
189 | * added EPIC support | ||
190 | * enabled bootloader update | ||
191 | * | ||
192 | * 0.9 (03/08/2000) greg kroah-hartman | ||
193 | * Release to IO networks. | ||
194 | * Integrated changes that David made | ||
195 | * made getting urbs for writing SMP safe | ||
196 | * | ||
197 | * 0.8 (03/07/2000) greg kroah-hartman | ||
198 | * Release to IO networks. | ||
199 | * Fixed problems that were seen in code by David. | ||
200 | * Now both Edgeport/4 and Edgeport/2 works properly. | ||
201 | * Changed most of the functions to use port instead of serial. | ||
202 | * | ||
203 | * 0.7 (02/27/2000) greg kroah-hartman | ||
204 | * Milestone 3 release. | ||
205 | * Release to IO Networks | ||
206 | * ioctl for waiting on line change implemented. | ||
207 | * ioctl for getting statistics implemented. | ||
208 | * multiport support working. | ||
209 | * lsr and msr registers are now handled properly. | ||
210 | * change break now hooked up and working. | ||
211 | * support for all known Edgeport devices. | ||
212 | * | ||
213 | * 0.6 (02/22/2000) greg kroah-hartman | ||
214 | * Release to IO networks. | ||
215 | * CHASE is implemented correctly when port is closed. | ||
216 | * SerialOpen now blocks correctly until port is fully opened. | ||
217 | * | ||
218 | * 0.5 (02/20/2000) greg kroah-hartman | ||
219 | * Release to IO networks. | ||
220 | * Known problems: | ||
221 | * modem status register changes are not sent on to the user | ||
222 | * CHASE is not implemented when the port is closed. | ||
223 | * | ||
224 | * 0.4 (02/16/2000) greg kroah-hartman | ||
225 | * Second cut at the CeBit demo. | ||
226 | * Doesn't leak memory on every write to the port | ||
227 | * Still small leaks on startup. | ||
228 | * Added support for Edgeport/2 and Edgeport/8 | ||
229 | * | ||
230 | * 0.3 (02/15/2000) greg kroah-hartman | ||
231 | * CeBit demo release. | ||
232 | * Force the line settings to 4800, 8, 1, e for the demo. | ||
233 | * Warning! This version leaks memory like crazy! | ||
234 | * | ||
235 | * 0.2 (01/30/2000) greg kroah-hartman | ||
236 | * Milestone 1 release. | ||
237 | * Device is found by USB subsystem, enumerated, fimware is downloaded | ||
238 | * and the descriptors are printed to the debug log, config is set, and | ||
239 | * green light starts to blink. Open port works, and data can be sent | ||
240 | * and received at the default settings of the UART. Loopback connector | ||
241 | * and debug log confirms this. | ||
242 | * | ||
243 | * 0.1 (01/23/2000) greg kroah-hartman | ||
244 | * Initial release to help IO Networks try to set up their test system. | ||
245 | * Edgeport4 is recognized, firmware is downloaded, config is set so | ||
246 | * device blinks green light every 3 sec. Port is bound, but opening, | ||
247 | * closing, and sending data do not work properly. | ||
248 | * | ||
249 | */ | 30 | */ |
250 | 31 | ||
251 | #include <linux/config.h> | 32 | #include <linux/config.h> |
diff --git a/drivers/usb/serial/io_tables.h b/drivers/usb/serial/io_tables.h index e7ffe02408bd..fad561c04c76 100644 --- a/drivers/usb/serial/io_tables.h +++ b/drivers/usb/serial/io_tables.h | |||
@@ -75,10 +75,12 @@ static struct usb_device_id id_table_combined [] = { | |||
75 | 75 | ||
76 | MODULE_DEVICE_TABLE (usb, id_table_combined); | 76 | MODULE_DEVICE_TABLE (usb, id_table_combined); |
77 | 77 | ||
78 | static struct usb_serial_device_type edgeport_2port_device = { | 78 | static struct usb_serial_driver edgeport_2port_device = { |
79 | .owner = THIS_MODULE, | 79 | .driver = { |
80 | .name = "Edgeport 2 port adapter", | 80 | .owner = THIS_MODULE, |
81 | .short_name = "edgeport_2", | 81 | .name = "edgeport_2", |
82 | }, | ||
83 | .description = "Edgeport 2 port adapter", | ||
82 | .id_table = edgeport_2port_id_table, | 84 | .id_table = edgeport_2port_id_table, |
83 | .num_interrupt_in = 1, | 85 | .num_interrupt_in = 1, |
84 | .num_bulk_in = 1, | 86 | .num_bulk_in = 1, |
@@ -103,10 +105,12 @@ static struct usb_serial_device_type edgeport_2port_device = { | |||
103 | .write_bulk_callback = edge_bulk_out_data_callback, | 105 | .write_bulk_callback = edge_bulk_out_data_callback, |
104 | }; | 106 | }; |
105 | 107 | ||
106 | static struct usb_serial_device_type edgeport_4port_device = { | 108 | static struct usb_serial_driver edgeport_4port_device = { |
107 | .owner = THIS_MODULE, | 109 | .driver = { |
108 | .name = "Edgeport 4 port adapter", | 110 | .owner = THIS_MODULE, |
109 | .short_name = "edgeport_4", | 111 | .name = "edgeport_4", |
112 | }, | ||
113 | .description = "Edgeport 4 port adapter", | ||
110 | .id_table = edgeport_4port_id_table, | 114 | .id_table = edgeport_4port_id_table, |
111 | .num_interrupt_in = 1, | 115 | .num_interrupt_in = 1, |
112 | .num_bulk_in = 1, | 116 | .num_bulk_in = 1, |
@@ -131,10 +135,12 @@ static struct usb_serial_device_type edgeport_4port_device = { | |||
131 | .write_bulk_callback = edge_bulk_out_data_callback, | 135 | .write_bulk_callback = edge_bulk_out_data_callback, |
132 | }; | 136 | }; |
133 | 137 | ||
134 | static struct usb_serial_device_type edgeport_8port_device = { | 138 | static struct usb_serial_driver edgeport_8port_device = { |
135 | .owner = THIS_MODULE, | 139 | .driver = { |
136 | .name = "Edgeport 8 port adapter", | 140 | .owner = THIS_MODULE, |
137 | .short_name = "edgeport_8", | 141 | .name = "edgeport_8", |
142 | }, | ||
143 | .description = "Edgeport 8 port adapter", | ||
138 | .id_table = edgeport_8port_id_table, | 144 | .id_table = edgeport_8port_id_table, |
139 | .num_interrupt_in = 1, | 145 | .num_interrupt_in = 1, |
140 | .num_bulk_in = 1, | 146 | .num_bulk_in = 1, |
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c index ebf9967f7c86..832b6d6734c0 100644 --- a/drivers/usb/serial/io_ti.c +++ b/drivers/usb/serial/io_ti.c | |||
@@ -2982,10 +2982,12 @@ static unsigned int edge_buf_get(struct edge_buf *eb, char *buf, | |||
2982 | } | 2982 | } |
2983 | 2983 | ||
2984 | 2984 | ||
2985 | static struct usb_serial_device_type edgeport_1port_device = { | 2985 | static struct usb_serial_driver edgeport_1port_device = { |
2986 | .owner = THIS_MODULE, | 2986 | .driver = { |
2987 | .name = "Edgeport TI 1 port adapter", | 2987 | .owner = THIS_MODULE, |
2988 | .short_name = "edgeport_ti_1", | 2988 | .name = "edgeport_ti_1", |
2989 | }, | ||
2990 | .description = "Edgeport TI 1 port adapter", | ||
2989 | .id_table = edgeport_1port_id_table, | 2991 | .id_table = edgeport_1port_id_table, |
2990 | .num_interrupt_in = 1, | 2992 | .num_interrupt_in = 1, |
2991 | .num_bulk_in = 1, | 2993 | .num_bulk_in = 1, |
@@ -3010,10 +3012,12 @@ static struct usb_serial_device_type edgeport_1port_device = { | |||
3010 | .write_bulk_callback = edge_bulk_out_callback, | 3012 | .write_bulk_callback = edge_bulk_out_callback, |
3011 | }; | 3013 | }; |
3012 | 3014 | ||
3013 | static struct usb_serial_device_type edgeport_2port_device = { | 3015 | static struct usb_serial_driver edgeport_2port_device = { |
3014 | .owner = THIS_MODULE, | 3016 | .driver = { |
3015 | .name = "Edgeport TI 2 port adapter", | 3017 | .owner = THIS_MODULE, |
3016 | .short_name = "edgeport_ti_2", | 3018 | .name = "edgeport_ti_2", |
3019 | }, | ||
3020 | .description = "Edgeport TI 2 port adapter", | ||
3017 | .id_table = edgeport_2port_id_table, | 3021 | .id_table = edgeport_2port_id_table, |
3018 | .num_interrupt_in = 1, | 3022 | .num_interrupt_in = 1, |
3019 | .num_bulk_in = 2, | 3023 | .num_bulk_in = 2, |
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c index c05c2a2a0f31..d5d066488100 100644 --- a/drivers/usb/serial/ipaq.c +++ b/drivers/usb/serial/ipaq.c | |||
@@ -92,24 +92,7 @@ static void ipaq_destroy_lists(struct usb_serial_port *port); | |||
92 | static struct usb_device_id ipaq_id_table [] = { | 92 | static struct usb_device_id ipaq_id_table [] = { |
93 | /* The first entry is a placeholder for the insmod-specified device */ | 93 | /* The first entry is a placeholder for the insmod-specified device */ |
94 | { USB_DEVICE(0x049F, 0x0003) }, | 94 | { USB_DEVICE(0x049F, 0x0003) }, |
95 | { USB_DEVICE(0x1690, 0x0601) }, /* Askey USB Sync */ | 95 | { USB_DEVICE(0x0104, 0x00BE) }, /* Socket USB Sync */ |
96 | { USB_DEVICE(0x0960, 0x0065) }, /* BCOM USB Sync 0065 */ | ||
97 | { USB_DEVICE(0x0960, 0x0066) }, /* BCOM USB Sync 0066 */ | ||
98 | { USB_DEVICE(0x0960, 0x0067) }, /* BCOM USB Sync 0067 */ | ||
99 | { USB_DEVICE(0x07CF, 0x2001) }, /* CASIO USB Sync 2001 */ | ||
100 | { USB_DEVICE(0x07CF, 0x2002) }, /* CASIO USB Sync 2002 */ | ||
101 | { USB_DEVICE(0x07CF, 0x2003) }, /* CASIO USB Sync 2003 */ | ||
102 | { USB_DEVICE(0x049F, 0x0003) }, /* Compaq iPAQ USB Sync */ | ||
103 | { USB_DEVICE(0x049F, 0x0032) }, /* Compaq iPAQ USB Sync */ | ||
104 | { USB_DEVICE(0x413C, 0x4001) }, /* Dell Axim USB Sync */ | ||
105 | { USB_DEVICE(0x413C, 0x4002) }, /* Dell Axim USB Sync */ | ||
106 | { USB_DEVICE(0x413C, 0x4003) }, /* Dell Axim USB Sync */ | ||
107 | { USB_DEVICE(0x413C, 0x4004) }, /* Dell Axim USB Sync */ | ||
108 | { USB_DEVICE(0x413C, 0x4005) }, /* Dell Axim USB Sync */ | ||
109 | { USB_DEVICE(0x413C, 0x4006) }, /* Dell Axim USB Sync */ | ||
110 | { USB_DEVICE(0x413C, 0x4007) }, /* Dell Axim USB Sync */ | ||
111 | { USB_DEVICE(0x413C, 0x4008) }, /* Dell Axim USB Sync */ | ||
112 | { USB_DEVICE(0x413C, 0x4009) }, /* Dell Axim USB Sync */ | ||
113 | { USB_DEVICE(0x03F0, 0x1016) }, /* HP USB Sync */ | 96 | { USB_DEVICE(0x03F0, 0x1016) }, /* HP USB Sync */ |
114 | { USB_DEVICE(0x03F0, 0x1116) }, /* HP USB Sync 1611 */ | 97 | { USB_DEVICE(0x03F0, 0x1116) }, /* HP USB Sync 1611 */ |
115 | { USB_DEVICE(0x03F0, 0x1216) }, /* HP USB Sync 1612 */ | 98 | { USB_DEVICE(0x03F0, 0x1216) }, /* HP USB Sync 1612 */ |
@@ -125,7 +108,13 @@ static struct usb_device_id ipaq_id_table [] = { | |||
125 | { USB_DEVICE(0x03F0, 0x5016) }, /* HP USB Sync 1650 */ | 108 | { USB_DEVICE(0x03F0, 0x5016) }, /* HP USB Sync 1650 */ |
126 | { USB_DEVICE(0x03F0, 0x5116) }, /* HP USB Sync 1651 */ | 109 | { USB_DEVICE(0x03F0, 0x5116) }, /* HP USB Sync 1651 */ |
127 | { USB_DEVICE(0x03F0, 0x5216) }, /* HP USB Sync 1652 */ | 110 | { USB_DEVICE(0x03F0, 0x5216) }, /* HP USB Sync 1652 */ |
128 | { USB_DEVICE(0x094B, 0x0001) }, /* Linkup Systems USB Sync */ | 111 | { USB_DEVICE(0x0409, 0x00D5) }, /* NEC USB Sync */ |
112 | { USB_DEVICE(0x0409, 0x00D6) }, /* NEC USB Sync */ | ||
113 | { USB_DEVICE(0x0409, 0x00D7) }, /* NEC USB Sync */ | ||
114 | { USB_DEVICE(0x0409, 0x8024) }, /* NEC USB Sync */ | ||
115 | { USB_DEVICE(0x0409, 0x8025) }, /* NEC USB Sync */ | ||
116 | { USB_DEVICE(0x043E, 0x9C01) }, /* LGE USB Sync */ | ||
117 | { USB_DEVICE(0x045E, 0x00CE) }, /* Microsoft USB Sync */ | ||
129 | { USB_DEVICE(0x045E, 0x0400) }, /* Windows Powered Pocket PC 2002 */ | 118 | { USB_DEVICE(0x045E, 0x0400) }, /* Windows Powered Pocket PC 2002 */ |
130 | { USB_DEVICE(0x045E, 0x0401) }, /* Windows Powered Pocket PC 2002 */ | 119 | { USB_DEVICE(0x045E, 0x0401) }, /* Windows Powered Pocket PC 2002 */ |
131 | { USB_DEVICE(0x045E, 0x0402) }, /* Windows Powered Pocket PC 2002 */ | 120 | { USB_DEVICE(0x045E, 0x0402) }, /* Windows Powered Pocket PC 2002 */ |
@@ -251,17 +240,81 @@ static struct usb_device_id ipaq_id_table [] = { | |||
251 | { USB_DEVICE(0x045E, 0x04E8) }, /* Windows Powered Smartphone 2003 */ | 240 | { USB_DEVICE(0x045E, 0x04E8) }, /* Windows Powered Smartphone 2003 */ |
252 | { USB_DEVICE(0x045E, 0x04E9) }, /* Windows Powered Smartphone 2003 */ | 241 | { USB_DEVICE(0x045E, 0x04E9) }, /* Windows Powered Smartphone 2003 */ |
253 | { USB_DEVICE(0x045E, 0x04EA) }, /* Windows Powered Smartphone 2003 */ | 242 | { USB_DEVICE(0x045E, 0x04EA) }, /* Windows Powered Smartphone 2003 */ |
254 | { USB_DEVICE(0x0961, 0x0010) }, /* Portatec USB Sync */ | 243 | { USB_DEVICE(0x049F, 0x0003) }, /* Compaq iPAQ USB Sync */ |
255 | { USB_DEVICE(0x5E04, 0xCE00) }, /* SAGEM Wireless Assistant */ | 244 | { USB_DEVICE(0x049F, 0x0032) }, /* Compaq iPAQ USB Sync */ |
256 | { USB_DEVICE(0x0104, 0x00BE) }, /* Socket USB Sync */ | 245 | { USB_DEVICE(0x04A4, 0x0014) }, /* Hitachi USB Sync */ |
246 | { USB_DEVICE(0x04AD, 0x0301) }, /* USB Sync 0301 */ | ||
247 | { USB_DEVICE(0x04AD, 0x0302) }, /* USB Sync 0302 */ | ||
248 | { USB_DEVICE(0x04AD, 0x0303) }, /* USB Sync 0303 */ | ||
249 | { USB_DEVICE(0x04C5, 0x1058) }, /* FUJITSU USB Sync */ | ||
250 | { USB_DEVICE(0x04C5, 0x1079) }, /* FUJITSU USB Sync */ | ||
251 | { USB_DEVICE(0x04DA, 0x2500) }, /* Panasonic USB Sync */ | ||
252 | { USB_DEVICE(0x04E8, 0x5F00) }, /* Samsung NEXiO USB Sync */ | ||
253 | { USB_DEVICE(0x04E8, 0x5F01) }, /* Samsung NEXiO USB Sync */ | ||
254 | { USB_DEVICE(0x04E8, 0x5F02) }, /* Samsung NEXiO USB Sync */ | ||
255 | { USB_DEVICE(0x04E8, 0x5F03) }, /* Samsung NEXiO USB Sync */ | ||
256 | { USB_DEVICE(0x04E8, 0x5F04) }, /* Samsung NEXiO USB Sync */ | ||
257 | { USB_DEVICE(0x04E8, 0x6611) }, /* Samsung MITs USB Sync */ | ||
258 | { USB_DEVICE(0x04E8, 0x6613) }, /* Samsung MITs USB Sync */ | ||
259 | { USB_DEVICE(0x04E8, 0x6615) }, /* Samsung MITs USB Sync */ | ||
260 | { USB_DEVICE(0x04E8, 0x6617) }, /* Samsung MITs USB Sync */ | ||
261 | { USB_DEVICE(0x04E8, 0x6619) }, /* Samsung MITs USB Sync */ | ||
262 | { USB_DEVICE(0x04E8, 0x661B) }, /* Samsung MITs USB Sync */ | ||
263 | { USB_DEVICE(0x04E8, 0x662E) }, /* Samsung MITs USB Sync */ | ||
264 | { USB_DEVICE(0x04E8, 0x6630) }, /* Samsung MITs USB Sync */ | ||
265 | { USB_DEVICE(0x04E8, 0x6632) }, /* Samsung MITs USB Sync */ | ||
266 | { USB_DEVICE(0x04f1, 0x3011) }, /* JVC USB Sync */ | ||
267 | { USB_DEVICE(0x04F1, 0x3012) }, /* JVC USB Sync */ | ||
268 | { USB_DEVICE(0x0502, 0x1631) }, /* c10 Series */ | ||
269 | { USB_DEVICE(0x0502, 0x1632) }, /* c20 Series */ | ||
270 | { USB_DEVICE(0x0502, 0x16E1) }, /* Acer n10 Handheld USB Sync */ | ||
271 | { USB_DEVICE(0x0502, 0x16E2) }, /* Acer n20 Handheld USB Sync */ | ||
272 | { USB_DEVICE(0x0502, 0x16E3) }, /* Acer n30 Handheld USB Sync */ | ||
273 | { USB_DEVICE(0x0536, 0x01A0) }, /* HHP PDT */ | ||
274 | { USB_DEVICE(0x0543, 0x0ED9) }, /* ViewSonic Color Pocket PC V35 */ | ||
275 | { USB_DEVICE(0x0543, 0x1527) }, /* ViewSonic Color Pocket PC V36 */ | ||
276 | { USB_DEVICE(0x0543, 0x1529) }, /* ViewSonic Color Pocket PC V37 */ | ||
277 | { USB_DEVICE(0x0543, 0x152B) }, /* ViewSonic Color Pocket PC V38 */ | ||
278 | { USB_DEVICE(0x0543, 0x152E) }, /* ViewSonic Pocket PC */ | ||
279 | { USB_DEVICE(0x0543, 0x1921) }, /* ViewSonic Communicator Pocket PC */ | ||
280 | { USB_DEVICE(0x0543, 0x1922) }, /* ViewSonic Smartphone */ | ||
281 | { USB_DEVICE(0x0543, 0x1923) }, /* ViewSonic Pocket PC V30 */ | ||
282 | { USB_DEVICE(0x05E0, 0x2000) }, /* Symbol USB Sync */ | ||
283 | { USB_DEVICE(0x05E0, 0x2001) }, /* Symbol USB Sync 0x2001 */ | ||
284 | { USB_DEVICE(0x05E0, 0x2002) }, /* Symbol USB Sync 0x2002 */ | ||
285 | { USB_DEVICE(0x05E0, 0x2003) }, /* Symbol USB Sync 0x2003 */ | ||
286 | { USB_DEVICE(0x05E0, 0x2004) }, /* Symbol USB Sync 0x2004 */ | ||
287 | { USB_DEVICE(0x05E0, 0x2005) }, /* Symbol USB Sync 0x2005 */ | ||
288 | { USB_DEVICE(0x05E0, 0x2006) }, /* Symbol USB Sync 0x2006 */ | ||
289 | { USB_DEVICE(0x05E0, 0x2007) }, /* Symbol USB Sync 0x2007 */ | ||
290 | { USB_DEVICE(0x05E0, 0x2008) }, /* Symbol USB Sync 0x2008 */ | ||
291 | { USB_DEVICE(0x05E0, 0x2009) }, /* Symbol USB Sync 0x2009 */ | ||
292 | { USB_DEVICE(0x05E0, 0x200A) }, /* Symbol USB Sync 0x200A */ | ||
293 | { USB_DEVICE(0x067E, 0x1001) }, /* Intermec Mobile Computer */ | ||
294 | { USB_DEVICE(0x07CF, 0x2001) }, /* CASIO USB Sync 2001 */ | ||
295 | { USB_DEVICE(0x07CF, 0x2002) }, /* CASIO USB Sync 2002 */ | ||
296 | { USB_DEVICE(0x07CF, 0x2003) }, /* CASIO USB Sync 2003 */ | ||
257 | { USB_DEVICE(0x0930, 0x0700) }, /* TOSHIBA USB Sync 0700 */ | 297 | { USB_DEVICE(0x0930, 0x0700) }, /* TOSHIBA USB Sync 0700 */ |
258 | { USB_DEVICE(0x0930, 0x0705) }, /* TOSHIBA Pocket PC e310 */ | 298 | { USB_DEVICE(0x0930, 0x0705) }, /* TOSHIBA Pocket PC e310 */ |
299 | { USB_DEVICE(0x0930, 0x0706) }, /* TOSHIBA Pocket PC e740 */ | ||
259 | { USB_DEVICE(0x0930, 0x0707) }, /* TOSHIBA Pocket PC e330 Series */ | 300 | { USB_DEVICE(0x0930, 0x0707) }, /* TOSHIBA Pocket PC e330 Series */ |
260 | { USB_DEVICE(0x0930, 0x0708) }, /* TOSHIBA Pocket PC e350 Series */ | 301 | { USB_DEVICE(0x0930, 0x0708) }, /* TOSHIBA Pocket PC e350 Series */ |
261 | { USB_DEVICE(0x0930, 0x0706) }, /* TOSHIBA Pocket PC e740 */ | ||
262 | { USB_DEVICE(0x0930, 0x0709) }, /* TOSHIBA Pocket PC e750 Series */ | 302 | { USB_DEVICE(0x0930, 0x0709) }, /* TOSHIBA Pocket PC e750 Series */ |
263 | { USB_DEVICE(0x0930, 0x070A) }, /* TOSHIBA Pocket PC e400 Series */ | 303 | { USB_DEVICE(0x0930, 0x070A) }, /* TOSHIBA Pocket PC e400 Series */ |
264 | { USB_DEVICE(0x0930, 0x070B) }, /* TOSHIBA Pocket PC e800 Series */ | 304 | { USB_DEVICE(0x0930, 0x070B) }, /* TOSHIBA Pocket PC e800 Series */ |
305 | { USB_DEVICE(0x094B, 0x0001) }, /* Linkup Systems USB Sync */ | ||
306 | { USB_DEVICE(0x0960, 0x0065) }, /* BCOM USB Sync 0065 */ | ||
307 | { USB_DEVICE(0x0960, 0x0066) }, /* BCOM USB Sync 0066 */ | ||
308 | { USB_DEVICE(0x0960, 0x0067) }, /* BCOM USB Sync 0067 */ | ||
309 | { USB_DEVICE(0x0961, 0x0010) }, /* Portatec USB Sync */ | ||
310 | { USB_DEVICE(0x099E, 0x0052) }, /* Trimble GeoExplorer */ | ||
311 | { USB_DEVICE(0x099E, 0x4000) }, /* TDS Data Collector */ | ||
312 | { USB_DEVICE(0x0B05, 0x4200) }, /* ASUS USB Sync */ | ||
313 | { USB_DEVICE(0x0B05, 0x4201) }, /* ASUS USB Sync */ | ||
314 | { USB_DEVICE(0x0B05, 0x4202) }, /* ASUS USB Sync */ | ||
315 | { USB_DEVICE(0x0B05, 0x420F) }, /* ASUS USB Sync */ | ||
316 | { USB_DEVICE(0x0B05, 0x9200) }, /* ASUS USB Sync */ | ||
317 | { USB_DEVICE(0x0B05, 0x9202) }, /* ASUS USB Sync */ | ||
265 | { USB_DEVICE(0x0BB4, 0x00CE) }, /* HTC USB Sync */ | 318 | { USB_DEVICE(0x0BB4, 0x00CE) }, /* HTC USB Sync */ |
266 | { USB_DEVICE(0x0BB4, 0x0A01) }, /* PocketPC USB Sync */ | 319 | { USB_DEVICE(0x0BB4, 0x0A01) }, /* PocketPC USB Sync */ |
267 | { USB_DEVICE(0x0BB4, 0x0A02) }, /* PocketPC USB Sync */ | 320 | { USB_DEVICE(0x0BB4, 0x0A02) }, /* PocketPC USB Sync */ |
@@ -422,116 +475,67 @@ static struct usb_device_id ipaq_id_table [] = { | |||
422 | { USB_DEVICE(0x0BB4, 0x0A9D) }, /* SmartPhone USB Sync */ | 475 | { USB_DEVICE(0x0BB4, 0x0A9D) }, /* SmartPhone USB Sync */ |
423 | { USB_DEVICE(0x0BB4, 0x0A9E) }, /* SmartPhone USB Sync */ | 476 | { USB_DEVICE(0x0BB4, 0x0A9E) }, /* SmartPhone USB Sync */ |
424 | { USB_DEVICE(0x0BB4, 0x0A9F) }, /* SmartPhone USB Sync */ | 477 | { USB_DEVICE(0x0BB4, 0x0A9F) }, /* SmartPhone USB Sync */ |
425 | { USB_DEVICE(0x0409, 0x00D5) }, /* NEC USB Sync */ | ||
426 | { USB_DEVICE(0x0409, 0x00D6) }, /* NEC USB Sync */ | ||
427 | { USB_DEVICE(0x0409, 0x00D7) }, /* NEC USB Sync */ | ||
428 | { USB_DEVICE(0x0409, 0x8024) }, /* NEC USB Sync */ | ||
429 | { USB_DEVICE(0x0409, 0x8025) }, /* NEC USB Sync */ | ||
430 | { USB_DEVICE(0x04A4, 0x0014) }, /* Hitachi USB Sync */ | ||
431 | { USB_DEVICE(0x0BF8, 0x1001) }, /* Fujitsu Siemens Computers USB Sync */ | 478 | { USB_DEVICE(0x0BF8, 0x1001) }, /* Fujitsu Siemens Computers USB Sync */ |
432 | { USB_DEVICE(0x0F98, 0x0201) }, /* Cyberbank USB Sync */ | 479 | { USB_DEVICE(0x0C44, 0x03A2) }, /* Motorola iDEN Smartphone */ |
433 | { USB_DEVICE(0x0502, 0x16E1) }, /* Acer n10 Handheld USB Sync */ | ||
434 | { USB_DEVICE(0x0502, 0x16E3) }, /* Acer n30 Handheld USB Sync */ | ||
435 | { USB_DEVICE(0x0502, 0x16E2) }, /* Acer n20 Handheld USB Sync */ | ||
436 | { USB_DEVICE(0x0502, 0x1631) }, /* c10 Series */ | ||
437 | { USB_DEVICE(0x0502, 0x1632) }, /* c20 Series */ | ||
438 | { USB_DEVICE(0x0B05, 0x9202) }, /* ASUS USB Sync */ | ||
439 | { USB_DEVICE(0x0B05, 0x420F) }, /* ASUS USB Sync */ | ||
440 | { USB_DEVICE(0x0B05, 0x4200) }, /* ASUS USB Sync */ | ||
441 | { USB_DEVICE(0x0B05, 0x4201) }, /* ASUS USB Sync */ | ||
442 | { USB_DEVICE(0x0B05, 0x4202) }, /* ASUS USB Sync */ | ||
443 | { USB_DEVICE(0x0B05, 0x9200) }, /* ASUS USB Sync */ | ||
444 | { USB_DEVICE(0x0C8E, 0x6000) }, /* Cesscom Luxian Series */ | 480 | { USB_DEVICE(0x0C8E, 0x6000) }, /* Cesscom Luxian Series */ |
445 | { USB_DEVICE(0x04AD, 0x0301) }, /* USB Sync 0301 */ | 481 | { USB_DEVICE(0x0CAD, 0x9001) }, /* Motorola PowerPad Pocket PC Device */ |
446 | { USB_DEVICE(0x04AD, 0x0302) }, /* USB Sync 0302 */ | 482 | { USB_DEVICE(0x0F4E, 0x0200) }, /* Freedom Scientific USB Sync */ |
447 | { USB_DEVICE(0x04AD, 0x0303) }, /* USB Sync 0303 */ | 483 | { USB_DEVICE(0x0F98, 0x0201) }, /* Cyberbank USB Sync */ |
484 | { USB_DEVICE(0x0FB8, 0x3001) }, /* Wistron USB Sync */ | ||
485 | { USB_DEVICE(0x0FB8, 0x3002) }, /* Wistron USB Sync */ | ||
486 | { USB_DEVICE(0x0FB8, 0x3003) }, /* Wistron USB Sync */ | ||
487 | { USB_DEVICE(0x0FB8, 0x4001) }, /* Wistron USB Sync */ | ||
488 | { USB_DEVICE(0x1066, 0x00CE) }, /* E-TEN USB Sync */ | ||
448 | { USB_DEVICE(0x1066, 0x0300) }, /* E-TEN P3XX Pocket PC */ | 489 | { USB_DEVICE(0x1066, 0x0300) }, /* E-TEN P3XX Pocket PC */ |
449 | { USB_DEVICE(0x1066, 0x0500) }, /* E-TEN P5XX Pocket PC */ | 490 | { USB_DEVICE(0x1066, 0x0500) }, /* E-TEN P5XX Pocket PC */ |
450 | { USB_DEVICE(0x1066, 0x0600) }, /* E-TEN P6XX Pocket PC */ | 491 | { USB_DEVICE(0x1066, 0x0600) }, /* E-TEN P6XX Pocket PC */ |
451 | { USB_DEVICE(0x1066, 0x0700) }, /* E-TEN P7XX Pocket PC */ | 492 | { USB_DEVICE(0x1066, 0x0700) }, /* E-TEN P7XX Pocket PC */ |
452 | { USB_DEVICE(0x1066, 0x00CE) }, /* E-TEN USB Sync */ | 493 | { USB_DEVICE(0x1114, 0x0001) }, /* Psion Teklogix Sync 753x */ |
453 | { USB_DEVICE(0x0F4E, 0x0200) }, /* Freedom Scientific USB Sync */ | 494 | { USB_DEVICE(0x1114, 0x0004) }, /* Psion Teklogix Sync netBookPro */ |
454 | { USB_DEVICE(0x04C5, 0x1058) }, /* FUJITSU USB Sync */ | 495 | { USB_DEVICE(0x1114, 0x0006) }, /* Psion Teklogix Sync 7525 */ |
455 | { USB_DEVICE(0x04C5, 0x1079) }, /* FUJITSU USB Sync */ | 496 | { USB_DEVICE(0x1182, 0x1388) }, /* VES USB Sync */ |
456 | { USB_DEVICE(0x067E, 0x1001) }, /* Intermec Mobile Computer */ | 497 | { USB_DEVICE(0x11D9, 0x1002) }, /* Rugged Pocket PC 2003 */ |
457 | { USB_DEVICE(0x04f1, 0x3011) }, /* JVC USB Sync */ | 498 | { USB_DEVICE(0x11D9, 0x1003) }, /* Rugged Pocket PC 2003 */ |
458 | { USB_DEVICE(0x04F1, 0x3012) }, /* JVC USB Sync */ | 499 | { USB_DEVICE(0x1231, 0xCE01) }, /* USB Sync 03 */ |
459 | { USB_DEVICE(0x3708, 0x20CE) }, /* Legend USB Sync */ | 500 | { USB_DEVICE(0x1231, 0xCE02) }, /* USB Sync 03 */ |
460 | { USB_DEVICE(0x3708, 0x21CE) }, /* Lenovo USB Sync */ | 501 | { USB_DEVICE(0x1690, 0x0601) }, /* Askey USB Sync */ |
461 | { USB_DEVICE(0x043E, 0x9C01) }, /* LGE USB Sync */ | 502 | { USB_DEVICE(0x22B8, 0x4204) }, /* Motorola MPx200 Smartphone */ |
462 | { USB_DEVICE(0x04DA, 0x2500) }, /* Panasonic USB Sync */ | 503 | { USB_DEVICE(0x22B8, 0x4214) }, /* Motorola MPc GSM */ |
463 | { USB_DEVICE(0x3340, 0x0B1C) }, /* Generic PPC StrongARM */ | 504 | { USB_DEVICE(0x22B8, 0x4224) }, /* Motorola MPx220 Smartphone */ |
464 | { USB_DEVICE(0x3340, 0x0E3A) }, /* Generic PPC USB Sync */ | 505 | { USB_DEVICE(0x22B8, 0x4234) }, /* Motorola MPc CDMA */ |
465 | { USB_DEVICE(0x3340, 0x0F3A) }, /* Generic SmartPhone USB Sync */ | 506 | { USB_DEVICE(0x22B8, 0x4244) }, /* Motorola MPx100 Smartphone */ |
466 | { USB_DEVICE(0x3340, 0x0F1C) }, /* Itautec USB Sync */ | 507 | { USB_DEVICE(0x3340, 0x011C) }, /* Mio DigiWalker PPC StrongARM */ |
467 | { USB_DEVICE(0x3340, 0x1326) }, /* Itautec USB Sync */ | ||
468 | { USB_DEVICE(0x3340, 0x3326) }, /* MEDION Winodws Moble USB Sync */ | ||
469 | { USB_DEVICE(0x3340, 0x0326) }, /* Mio DigiWalker 338 */ | 508 | { USB_DEVICE(0x3340, 0x0326) }, /* Mio DigiWalker 338 */ |
470 | { USB_DEVICE(0x3340, 0x0426) }, /* Mio DigiWalker 338 */ | 509 | { USB_DEVICE(0x3340, 0x0426) }, /* Mio DigiWalker 338 */ |
471 | { USB_DEVICE(0x3340, 0x011C) }, /* Mio DigiWalker PPC StrongARM */ | ||
472 | { USB_DEVICE(0x3340, 0x053A) }, /* Mio DigiWalker SmartPhone USB Sync */ | ||
473 | { USB_DEVICE(0x3340, 0x043A) }, /* Mio DigiWalker USB Sync */ | 510 | { USB_DEVICE(0x3340, 0x043A) }, /* Mio DigiWalker USB Sync */ |
474 | { USB_DEVICE(0x3340, 0x071C) }, /* MiTAC USB Sync */ | ||
475 | { USB_DEVICE(0x3340, 0x051C) }, /* MiTAC USB Sync 528 */ | 511 | { USB_DEVICE(0x3340, 0x051C) }, /* MiTAC USB Sync 528 */ |
476 | { USB_DEVICE(0x3340, 0x2326) }, /* Vobis USB Sync */ | 512 | { USB_DEVICE(0x3340, 0x053A) }, /* Mio DigiWalker SmartPhone USB Sync */ |
513 | { USB_DEVICE(0x3340, 0x071C) }, /* MiTAC USB Sync */ | ||
514 | { USB_DEVICE(0x3340, 0x0B1C) }, /* Generic PPC StrongARM */ | ||
515 | { USB_DEVICE(0x3340, 0x0E3A) }, /* Generic PPC USB Sync */ | ||
516 | { USB_DEVICE(0x3340, 0x0F1C) }, /* Itautec USB Sync */ | ||
517 | { USB_DEVICE(0x3340, 0x0F3A) }, /* Generic SmartPhone USB Sync */ | ||
518 | { USB_DEVICE(0x3340, 0x1326) }, /* Itautec USB Sync */ | ||
477 | { USB_DEVICE(0x3340, 0x191C) }, /* YAKUMO USB Sync */ | 519 | { USB_DEVICE(0x3340, 0x191C) }, /* YAKUMO USB Sync */ |
520 | { USB_DEVICE(0x3340, 0x2326) }, /* Vobis USB Sync */ | ||
521 | { USB_DEVICE(0x3340, 0x3326) }, /* MEDION Winodws Moble USB Sync */ | ||
522 | { USB_DEVICE(0x3708, 0x20CE) }, /* Legend USB Sync */ | ||
523 | { USB_DEVICE(0x3708, 0x21CE) }, /* Lenovo USB Sync */ | ||
478 | { USB_DEVICE(0x4113, 0x0210) }, /* Mobile Media Technology USB Sync */ | 524 | { USB_DEVICE(0x4113, 0x0210) }, /* Mobile Media Technology USB Sync */ |
479 | { USB_DEVICE(0x4113, 0x0211) }, /* Mobile Media Technology USB Sync */ | 525 | { USB_DEVICE(0x4113, 0x0211) }, /* Mobile Media Technology USB Sync */ |
480 | { USB_DEVICE(0x4113, 0x0400) }, /* Mobile Media Technology USB Sync */ | 526 | { USB_DEVICE(0x4113, 0x0400) }, /* Mobile Media Technology USB Sync */ |
481 | { USB_DEVICE(0x4113, 0x0410) }, /* Mobile Media Technology USB Sync */ | 527 | { USB_DEVICE(0x4113, 0x0410) }, /* Mobile Media Technology USB Sync */ |
482 | { USB_DEVICE(0x0CAD, 0x9001) }, /* Motorola PowerPad Pocket PC Device */ | 528 | { USB_DEVICE(0x413C, 0x4001) }, /* Dell Axim USB Sync */ |
483 | { USB_DEVICE(0x0C44, 0x03A2) }, /* Motorola iDEN Smartphone */ | 529 | { USB_DEVICE(0x413C, 0x4002) }, /* Dell Axim USB Sync */ |
484 | { USB_DEVICE(0x04E8, 0x6611) }, /* Samsung MITs USB Sync */ | 530 | { USB_DEVICE(0x413C, 0x4003) }, /* Dell Axim USB Sync */ |
485 | { USB_DEVICE(0x04E8, 0x6613) }, /* Samsung MITs USB Sync */ | 531 | { USB_DEVICE(0x413C, 0x4004) }, /* Dell Axim USB Sync */ |
486 | { USB_DEVICE(0x04E8, 0x6615) }, /* Samsung MITs USB Sync */ | 532 | { USB_DEVICE(0x413C, 0x4005) }, /* Dell Axim USB Sync */ |
487 | { USB_DEVICE(0x04E8, 0x6617) }, /* Samsung MITs USB Sync */ | 533 | { USB_DEVICE(0x413C, 0x4006) }, /* Dell Axim USB Sync */ |
488 | { USB_DEVICE(0x04E8, 0x6619) }, /* Samsung MITs USB Sync */ | 534 | { USB_DEVICE(0x413C, 0x4007) }, /* Dell Axim USB Sync */ |
489 | { USB_DEVICE(0x04E8, 0x661B) }, /* Samsung MITs USB Sync */ | 535 | { USB_DEVICE(0x413C, 0x4008) }, /* Dell Axim USB Sync */ |
490 | { USB_DEVICE(0x04E8, 0x5F00) }, /* Samsung NEXiO USB Sync */ | 536 | { USB_DEVICE(0x413C, 0x4009) }, /* Dell Axim USB Sync */ |
491 | { USB_DEVICE(0x04E8, 0x5F01) }, /* Samsung NEXiO USB Sync */ | ||
492 | { USB_DEVICE(0x04E8, 0x5F02) }, /* Samsung NEXiO USB Sync */ | ||
493 | { USB_DEVICE(0x04E8, 0x5F03) }, /* Samsung NEXiO USB Sync */ | ||
494 | { USB_DEVICE(0x04E8, 0x5F04) }, /* Samsung NEXiO USB Sync */ | ||
495 | { USB_DEVICE(0x04E8, 0x662E) }, /* Samsung MITs USB Sync */ | ||
496 | { USB_DEVICE(0x04E8, 0x6630) }, /* Samsung MITs USB Sync */ | ||
497 | { USB_DEVICE(0x04E8, 0x6632) }, /* Samsung MITs USB Sync */ | ||
498 | { USB_DEVICE(0x4505, 0x0010) }, /* Smartphone */ | 537 | { USB_DEVICE(0x4505, 0x0010) }, /* Smartphone */ |
499 | { USB_DEVICE(0x05E0, 0x2000) }, /* Symbol USB Sync */ | 538 | { USB_DEVICE(0x5E04, 0xCE00) }, /* SAGEM Wireless Assistant */ |
500 | { USB_DEVICE(0x05E0, 0x2001) }, /* Symbol USB Sync 0x2001 */ | ||
501 | { USB_DEVICE(0x05E0, 0x2002) }, /* Symbol USB Sync 0x2002 */ | ||
502 | { USB_DEVICE(0x05E0, 0x2003) }, /* Symbol USB Sync 0x2003 */ | ||
503 | { USB_DEVICE(0x05E0, 0x2004) }, /* Symbol USB Sync 0x2004 */ | ||
504 | { USB_DEVICE(0x05E0, 0x2005) }, /* Symbol USB Sync 0x2005 */ | ||
505 | { USB_DEVICE(0x05E0, 0x2006) }, /* Symbol USB Sync 0x2006 */ | ||
506 | { USB_DEVICE(0x05E0, 0x2007) }, /* Symbol USB Sync 0x2007 */ | ||
507 | { USB_DEVICE(0x05E0, 0x2008) }, /* Symbol USB Sync 0x2008 */ | ||
508 | { USB_DEVICE(0x05E0, 0x2009) }, /* Symbol USB Sync 0x2009 */ | ||
509 | { USB_DEVICE(0x05E0, 0x200A) }, /* Symbol USB Sync 0x200A */ | ||
510 | { USB_DEVICE(0x1182, 0x1388) }, /* VES USB Sync */ | ||
511 | { USB_DEVICE(0x0543, 0x0ED9) }, /* ViewSonic Color Pocket PC V35 */ | ||
512 | { USB_DEVICE(0x0543, 0x1527) }, /* ViewSonic Color Pocket PC V36 */ | ||
513 | { USB_DEVICE(0x0543, 0x1529) }, /* ViewSonic Color Pocket PC V37 */ | ||
514 | { USB_DEVICE(0x0543, 0x152B) }, /* ViewSonic Color Pocket PC V38 */ | ||
515 | { USB_DEVICE(0x0543, 0x152E) }, /* ViewSonic Pocket PC */ | ||
516 | { USB_DEVICE(0x0543, 0x1921) }, /* ViewSonic Communicator Pocket PC */ | ||
517 | { USB_DEVICE(0x0543, 0x1922) }, /* ViewSonic Smartphone */ | ||
518 | { USB_DEVICE(0x0543, 0x1923) }, /* ViewSonic Pocket PC V30 */ | ||
519 | { USB_DEVICE(0x0536, 0x01A0) }, /* HHP PDT */ | ||
520 | { USB_DEVICE(0x099E, 0x0052) }, /* Trimble GeoExplorer */ | ||
521 | { USB_DEVICE(0x099E, 0x4000) }, /* TDS Data Collector */ | ||
522 | { USB_DEVICE(0x0FB8, 0x3001) }, /* Wistron USB Sync */ | ||
523 | { USB_DEVICE(0x0FB8, 0x3002) }, /* Wistron USB Sync */ | ||
524 | { USB_DEVICE(0x0FB8, 0x3003) }, /* Wistron USB Sync */ | ||
525 | { USB_DEVICE(0x0FB8, 0x4001) }, /* Wistron USB Sync */ | ||
526 | { USB_DEVICE(0x11D9, 0x1003) }, /* Rugged Pocket PC 2003 */ | ||
527 | { USB_DEVICE(0x11D9, 0x1002) }, /* Rugged Pocket PC 2003 */ | ||
528 | { USB_DEVICE(0x22B8, 0x4204) }, /* Motorola MPx200 Smartphone */ | ||
529 | { USB_DEVICE(0x22B8, 0x4214) }, /* Motorola MPc GSM */ | ||
530 | { USB_DEVICE(0x22B8, 0x4224) }, /* Motorola MPx220 Smartphone */ | ||
531 | { USB_DEVICE(0x22B8, 0x4234) }, /* Motorola MPc CDMA */ | ||
532 | { USB_DEVICE(0x22B8, 0x4244) }, /* Motorola MPx100 Smartphone */ | ||
533 | { USB_DEVICE(0x1231, 0xCE01) }, /* USB Sync 03 */ | ||
534 | { USB_DEVICE(0x1231, 0xCE02) }, /* USB Sync 03 */ | ||
535 | { } /* Terminating entry */ | 539 | { } /* Terminating entry */ |
536 | }; | 540 | }; |
537 | 541 | ||
@@ -547,9 +551,12 @@ static struct usb_driver ipaq_driver = { | |||
547 | 551 | ||
548 | 552 | ||
549 | /* All of the device info needed for the Compaq iPAQ */ | 553 | /* All of the device info needed for the Compaq iPAQ */ |
550 | static struct usb_serial_device_type ipaq_device = { | 554 | static struct usb_serial_driver ipaq_device = { |
551 | .owner = THIS_MODULE, | 555 | .driver = { |
552 | .name = "PocketPC PDA", | 556 | .owner = THIS_MODULE, |
557 | .name = "ipaq", | ||
558 | }, | ||
559 | .description = "PocketPC PDA", | ||
553 | .id_table = ipaq_id_table, | 560 | .id_table = ipaq_id_table, |
554 | .num_interrupt_in = NUM_DONT_CARE, | 561 | .num_interrupt_in = NUM_DONT_CARE, |
555 | .num_bulk_in = 1, | 562 | .num_bulk_in = 1, |
diff --git a/drivers/usb/serial/ipw.c b/drivers/usb/serial/ipw.c index 85e242459c27..a02fada85362 100644 --- a/drivers/usb/serial/ipw.c +++ b/drivers/usb/serial/ipw.c | |||
@@ -443,10 +443,12 @@ static int ipw_disconnect(struct usb_serial_port *port) | |||
443 | return 0; | 443 | return 0; |
444 | } | 444 | } |
445 | 445 | ||
446 | static struct usb_serial_device_type ipw_device = { | 446 | static struct usb_serial_driver ipw_device = { |
447 | .owner = THIS_MODULE, | 447 | .driver = { |
448 | .name = "IPWireless converter", | 448 | .owner = THIS_MODULE, |
449 | .short_name = "ipw", | 449 | .name = "ipw", |
450 | }, | ||
451 | .description = "IPWireless converter", | ||
450 | .id_table = usb_ipw_ids, | 452 | .id_table = usb_ipw_ids, |
451 | .num_interrupt_in = NUM_DONT_CARE, | 453 | .num_interrupt_in = NUM_DONT_CARE, |
452 | .num_bulk_in = 1, | 454 | .num_bulk_in = 1, |
diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c index 937b2fdd7171..19f329e9bdcf 100644 --- a/drivers/usb/serial/ir-usb.c +++ b/drivers/usb/serial/ir-usb.c | |||
@@ -133,9 +133,12 @@ static struct usb_driver ir_driver = { | |||
133 | }; | 133 | }; |
134 | 134 | ||
135 | 135 | ||
136 | static struct usb_serial_device_type ir_device = { | 136 | static struct usb_serial_driver ir_device = { |
137 | .owner = THIS_MODULE, | 137 | .driver = { |
138 | .name = "IR Dongle", | 138 | .owner = THIS_MODULE, |
139 | .name = "ir-usb", | ||
140 | }, | ||
141 | .description = "IR Dongle", | ||
139 | .id_table = id_table, | 142 | .id_table = id_table, |
140 | .num_interrupt_in = 1, | 143 | .num_interrupt_in = 1, |
141 | .num_bulk_in = 1, | 144 | .num_bulk_in = 1, |
diff --git a/drivers/usb/serial/keyspan.h b/drivers/usb/serial/keyspan.h index e9b45b768aca..5cfc13b5e56f 100644 --- a/drivers/usb/serial/keyspan.h +++ b/drivers/usb/serial/keyspan.h | |||
@@ -570,10 +570,12 @@ static struct usb_device_id keyspan_4port_ids[] = { | |||
570 | }; | 570 | }; |
571 | 571 | ||
572 | /* Structs for the devices, pre and post renumeration. */ | 572 | /* Structs for the devices, pre and post renumeration. */ |
573 | static struct usb_serial_device_type keyspan_pre_device = { | 573 | static struct usb_serial_driver keyspan_pre_device = { |
574 | .owner = THIS_MODULE, | 574 | .driver = { |
575 | .name = "Keyspan - (without firmware)", | 575 | .owner = THIS_MODULE, |
576 | .short_name = "keyspan_no_firm", | 576 | .name = "keyspan_no_firm", |
577 | }, | ||
578 | .description = "Keyspan - (without firmware)", | ||
577 | .id_table = keyspan_pre_ids, | 579 | .id_table = keyspan_pre_ids, |
578 | .num_interrupt_in = NUM_DONT_CARE, | 580 | .num_interrupt_in = NUM_DONT_CARE, |
579 | .num_bulk_in = NUM_DONT_CARE, | 581 | .num_bulk_in = NUM_DONT_CARE, |
@@ -582,10 +584,12 @@ static struct usb_serial_device_type keyspan_pre_device = { | |||
582 | .attach = keyspan_fake_startup, | 584 | .attach = keyspan_fake_startup, |
583 | }; | 585 | }; |
584 | 586 | ||
585 | static struct usb_serial_device_type keyspan_1port_device = { | 587 | static struct usb_serial_driver keyspan_1port_device = { |
586 | .owner = THIS_MODULE, | 588 | .driver = { |
587 | .name = "Keyspan 1 port adapter", | 589 | .owner = THIS_MODULE, |
588 | .short_name = "keyspan_1", | 590 | .name = "keyspan_1", |
591 | }, | ||
592 | .description = "Keyspan 1 port adapter", | ||
589 | .id_table = keyspan_1port_ids, | 593 | .id_table = keyspan_1port_ids, |
590 | .num_interrupt_in = NUM_DONT_CARE, | 594 | .num_interrupt_in = NUM_DONT_CARE, |
591 | .num_bulk_in = NUM_DONT_CARE, | 595 | .num_bulk_in = NUM_DONT_CARE, |
@@ -607,10 +611,12 @@ static struct usb_serial_device_type keyspan_1port_device = { | |||
607 | .shutdown = keyspan_shutdown, | 611 | .shutdown = keyspan_shutdown, |
608 | }; | 612 | }; |
609 | 613 | ||
610 | static struct usb_serial_device_type keyspan_2port_device = { | 614 | static struct usb_serial_driver keyspan_2port_device = { |
611 | .owner = THIS_MODULE, | 615 | .driver = { |
612 | .name = "Keyspan 2 port adapter", | 616 | .owner = THIS_MODULE, |
613 | .short_name = "keyspan_2", | 617 | .name = "keyspan_2", |
618 | }, | ||
619 | .description = "Keyspan 2 port adapter", | ||
614 | .id_table = keyspan_2port_ids, | 620 | .id_table = keyspan_2port_ids, |
615 | .num_interrupt_in = NUM_DONT_CARE, | 621 | .num_interrupt_in = NUM_DONT_CARE, |
616 | .num_bulk_in = NUM_DONT_CARE, | 622 | .num_bulk_in = NUM_DONT_CARE, |
@@ -632,10 +638,12 @@ static struct usb_serial_device_type keyspan_2port_device = { | |||
632 | .shutdown = keyspan_shutdown, | 638 | .shutdown = keyspan_shutdown, |
633 | }; | 639 | }; |
634 | 640 | ||
635 | static struct usb_serial_device_type keyspan_4port_device = { | 641 | static struct usb_serial_driver keyspan_4port_device = { |
636 | .owner = THIS_MODULE, | 642 | .driver = { |
637 | .name = "Keyspan 4 port adapter", | 643 | .owner = THIS_MODULE, |
638 | .short_name = "keyspan_4", | 644 | .name = "keyspan_4", |
645 | }, | ||
646 | .description = "Keyspan 4 port adapter", | ||
639 | .id_table = keyspan_4port_ids, | 647 | .id_table = keyspan_4port_ids, |
640 | .num_interrupt_in = NUM_DONT_CARE, | 648 | .num_interrupt_in = NUM_DONT_CARE, |
641 | .num_bulk_in = 5, | 649 | .num_bulk_in = 5, |
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c index 635c384cb15a..cd4f48bd83b6 100644 --- a/drivers/usb/serial/keyspan_pda.c +++ b/drivers/usb/serial/keyspan_pda.c | |||
@@ -783,10 +783,12 @@ static void keyspan_pda_shutdown (struct usb_serial *serial) | |||
783 | } | 783 | } |
784 | 784 | ||
785 | #ifdef KEYSPAN | 785 | #ifdef KEYSPAN |
786 | static struct usb_serial_device_type keyspan_pda_fake_device = { | 786 | static struct usb_serial_driver keyspan_pda_fake_device = { |
787 | .owner = THIS_MODULE, | 787 | .driver = { |
788 | .name = "Keyspan PDA - (prerenumeration)", | 788 | .owner = THIS_MODULE, |
789 | .short_name = "keyspan_pda_pre", | 789 | .name = "keyspan_pda_pre", |
790 | }, | ||
791 | .description = "Keyspan PDA - (prerenumeration)", | ||
790 | .id_table = id_table_fake, | 792 | .id_table = id_table_fake, |
791 | .num_interrupt_in = NUM_DONT_CARE, | 793 | .num_interrupt_in = NUM_DONT_CARE, |
792 | .num_bulk_in = NUM_DONT_CARE, | 794 | .num_bulk_in = NUM_DONT_CARE, |
@@ -797,10 +799,12 @@ static struct usb_serial_device_type keyspan_pda_fake_device = { | |||
797 | #endif | 799 | #endif |
798 | 800 | ||
799 | #ifdef XIRCOM | 801 | #ifdef XIRCOM |
800 | static struct usb_serial_device_type xircom_pgs_fake_device = { | 802 | static struct usb_serial_driver xircom_pgs_fake_device = { |
801 | .owner = THIS_MODULE, | 803 | .driver = { |
802 | .name = "Xircom / Entregra PGS - (prerenumeration)", | 804 | .owner = THIS_MODULE, |
803 | .short_name = "xircom_no_firm", | 805 | .name = "xircom_no_firm", |
806 | }, | ||
807 | .description = "Xircom / Entregra PGS - (prerenumeration)", | ||
804 | .id_table = id_table_fake_xircom, | 808 | .id_table = id_table_fake_xircom, |
805 | .num_interrupt_in = NUM_DONT_CARE, | 809 | .num_interrupt_in = NUM_DONT_CARE, |
806 | .num_bulk_in = NUM_DONT_CARE, | 810 | .num_bulk_in = NUM_DONT_CARE, |
@@ -810,10 +814,12 @@ static struct usb_serial_device_type xircom_pgs_fake_device = { | |||
810 | }; | 814 | }; |
811 | #endif | 815 | #endif |
812 | 816 | ||
813 | static struct usb_serial_device_type keyspan_pda_device = { | 817 | static struct usb_serial_driver keyspan_pda_device = { |
814 | .owner = THIS_MODULE, | 818 | .driver = { |
815 | .name = "Keyspan PDA", | 819 | .owner = THIS_MODULE, |
816 | .short_name = "keyspan_pda", | 820 | .name = "keyspan_pda", |
821 | }, | ||
822 | .description = "Keyspan PDA", | ||
817 | .id_table = id_table_std, | 823 | .id_table = id_table_std, |
818 | .num_interrupt_in = 1, | 824 | .num_interrupt_in = 1, |
819 | .num_bulk_in = 0, | 825 | .num_bulk_in = 0, |
diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c index a11e829e38c8..a8951c0fd020 100644 --- a/drivers/usb/serial/kl5kusb105.c +++ b/drivers/usb/serial/kl5kusb105.c | |||
@@ -123,10 +123,12 @@ static struct usb_driver kl5kusb105d_driver = { | |||
123 | .id_table = id_table, | 123 | .id_table = id_table, |
124 | }; | 124 | }; |
125 | 125 | ||
126 | static struct usb_serial_device_type kl5kusb105d_device = { | 126 | static struct usb_serial_driver kl5kusb105d_device = { |
127 | .owner = THIS_MODULE, | 127 | .driver = { |
128 | .name = "KL5KUSB105D / PalmConnect", | 128 | .owner = THIS_MODULE, |
129 | .short_name = "kl5kusb105d", | 129 | .name = "kl5kusb105d", |
130 | }, | ||
131 | .description = "KL5KUSB105D / PalmConnect", | ||
130 | .id_table = id_table, | 132 | .id_table = id_table, |
131 | .num_interrupt_in = 1, | 133 | .num_interrupt_in = 1, |
132 | .num_bulk_in = 1, | 134 | .num_bulk_in = 1, |
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c index fe4c98a75171..9456dd9dd136 100644 --- a/drivers/usb/serial/kobil_sct.c +++ b/drivers/usb/serial/kobil_sct.c | |||
@@ -105,9 +105,12 @@ static struct usb_driver kobil_driver = { | |||
105 | }; | 105 | }; |
106 | 106 | ||
107 | 107 | ||
108 | static struct usb_serial_device_type kobil_device = { | 108 | static struct usb_serial_driver kobil_device = { |
109 | .owner = THIS_MODULE, | 109 | .driver = { |
110 | .name = "KOBIL USB smart card terminal", | 110 | .owner = THIS_MODULE, |
111 | .name = "kobil", | ||
112 | }, | ||
113 | .description = "KOBIL USB smart card terminal", | ||
111 | .id_table = id_table, | 114 | .id_table = id_table, |
112 | .num_interrupt_in = NUM_DONT_CARE, | 115 | .num_interrupt_in = NUM_DONT_CARE, |
113 | .num_bulk_in = 0, | 116 | .num_bulk_in = 0, |
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index 50b6369647d2..ca5dbadb9b7e 100644 --- a/drivers/usb/serial/mct_u232.c +++ b/drivers/usb/serial/mct_u232.c | |||
@@ -132,10 +132,12 @@ static struct usb_driver mct_u232_driver = { | |||
132 | .id_table = id_table_combined, | 132 | .id_table = id_table_combined, |
133 | }; | 133 | }; |
134 | 134 | ||
135 | static struct usb_serial_device_type mct_u232_device = { | 135 | static struct usb_serial_driver mct_u232_device = { |
136 | .owner = THIS_MODULE, | 136 | .driver = { |
137 | .name = "MCT U232", | 137 | .owner = THIS_MODULE, |
138 | .short_name = "mct_u232", | 138 | .name = "mct_u232", |
139 | }, | ||
140 | .description = "MCT U232", | ||
139 | .id_table = id_table_combined, | 141 | .id_table = id_table_combined, |
140 | .num_interrupt_in = 2, | 142 | .num_interrupt_in = 2, |
141 | .num_bulk_in = 0, | 143 | .num_bulk_in = 0, |
diff --git a/drivers/usb/serial/nokia_dku2.c b/drivers/usb/serial/nokia_dku2.c new file mode 100644 index 000000000000..fad01bef3a64 --- /dev/null +++ b/drivers/usb/serial/nokia_dku2.c | |||
@@ -0,0 +1,142 @@ | |||
1 | /* | ||
2 | * Nokia DKU2 USB driver | ||
3 | * | ||
4 | * Copyright (C) 2004 | ||
5 | * Author: C Kemp | ||
6 | * | ||
7 | * This program is largely derived from work by the linux-usb group | ||
8 | * and associated source files. Please see the usb/serial files for | ||
9 | * individual credits and copyrights. | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | * 20.09.2005 - Matthias Blaesing <matthias.blaesing@rwth-aachen.de> | ||
17 | * Added short name to device structure to make driver load into kernel 2.6.13 | ||
18 | * | ||
19 | * 20.09.2005 - Matthias Blaesing <matthias.blaesing@rwth-aachen.de> | ||
20 | * Added usb_deregister to exit code - to allow remove and reinsert of module | ||
21 | */ | ||
22 | |||
23 | |||
24 | #include <linux/config.h> | ||
25 | #include <linux/kernel.h> | ||
26 | #include <linux/errno.h> | ||
27 | #include <linux/init.h> | ||
28 | #include <linux/slab.h> | ||
29 | #include <linux/tty.h> | ||
30 | #include <linux/tty_driver.h> | ||
31 | #include <linux/tty_flip.h> | ||
32 | #include <linux/module.h> | ||
33 | #include <linux/usb.h> | ||
34 | #include "usb-serial.h" | ||
35 | |||
36 | |||
37 | #define NOKIA_VENDOR_ID 0x0421 | ||
38 | #define NOKIA7600_PRODUCT_ID 0x0400 | ||
39 | #define NOKIA6230_PRODUCT_ID 0x040f | ||
40 | #define NOKIA6170_PRODUCT_ID 0x0416 | ||
41 | #define NOKIA6670_PRODUCT_ID 0x041d | ||
42 | #define NOKIA6680_PRODUCT_ID 0x041e | ||
43 | #define NOKIA6230i_PRODUCT_ID 0x0428 | ||
44 | |||
45 | #define NOKIA_AT_PORT 0x82 | ||
46 | #define NOKIA_FBUS_PORT 0x86 | ||
47 | |||
48 | /* | ||
49 | * Version Information | ||
50 | */ | ||
51 | #define DRIVER_VERSION "v0.2" | ||
52 | #define DRIVER_AUTHOR "C Kemp" | ||
53 | #define DRIVER_DESC "Nokia DKU2 Driver" | ||
54 | |||
55 | static struct usb_device_id id_table [] = { | ||
56 | { USB_DEVICE(NOKIA_VENDOR_ID, NOKIA7600_PRODUCT_ID) }, | ||
57 | { USB_DEVICE(NOKIA_VENDOR_ID, NOKIA6230_PRODUCT_ID) }, | ||
58 | { USB_DEVICE(NOKIA_VENDOR_ID, NOKIA6170_PRODUCT_ID) }, | ||
59 | { USB_DEVICE(NOKIA_VENDOR_ID, NOKIA6670_PRODUCT_ID) }, | ||
60 | { USB_DEVICE(NOKIA_VENDOR_ID, NOKIA6680_PRODUCT_ID) }, | ||
61 | { USB_DEVICE(NOKIA_VENDOR_ID, NOKIA6230i_PRODUCT_ID) }, | ||
62 | { } /* Terminating entry */ | ||
63 | }; | ||
64 | MODULE_DEVICE_TABLE(usb, id_table); | ||
65 | |||
66 | /* The only thing which makes this device different from a generic | ||
67 | * device is that we have to set an alternative configuration to make | ||
68 | * the relevant endpoints available. In 2.6 this is really easy... */ | ||
69 | static int nokia_probe(struct usb_serial *serial, | ||
70 | const struct usb_device_id *id) | ||
71 | { | ||
72 | int retval = -ENODEV; | ||
73 | |||
74 | if (serial->interface->altsetting[0].endpoint[0].desc.bEndpointAddress == NOKIA_AT_PORT) { | ||
75 | /* the AT port */ | ||
76 | dev_info(&serial->dev->dev, "Nokia AT Port:\n"); | ||
77 | retval = 0; | ||
78 | } else if (serial->interface->num_altsetting == 2 && | ||
79 | serial->interface->altsetting[1].endpoint[0].desc.bEndpointAddress == NOKIA_FBUS_PORT) { | ||
80 | /* the FBUS port */ | ||
81 | dev_info(&serial->dev->dev, "Nokia FBUS Port:\n"); | ||
82 | usb_set_interface(serial->dev, 10, 1); | ||
83 | retval = 0; | ||
84 | } | ||
85 | |||
86 | return retval; | ||
87 | } | ||
88 | |||
89 | static struct usb_driver nokia_driver = { | ||
90 | .owner = THIS_MODULE, | ||
91 | .name = "nokia_dku2", | ||
92 | .probe = usb_serial_probe, | ||
93 | .disconnect = usb_serial_disconnect, | ||
94 | .id_table = id_table, | ||
95 | }; | ||
96 | |||
97 | static struct usb_serial_driver nokia_serial_driver = { | ||
98 | .driver = { | ||
99 | .owner = THIS_MODULE, | ||
100 | .name = "nokia_dku2", | ||
101 | }, | ||
102 | .description = "Nokia 7600/6230(i)/6170/66x0 DKU2 driver", | ||
103 | .id_table = id_table, | ||
104 | .num_interrupt_in = 1, | ||
105 | .num_bulk_in = 1, | ||
106 | .num_bulk_out = 1, | ||
107 | .num_ports = 1, | ||
108 | .probe = nokia_probe, | ||
109 | }; | ||
110 | |||
111 | static int __init nokia_init(void) | ||
112 | { | ||
113 | int retval; | ||
114 | |||
115 | retval = usb_serial_register(&nokia_serial_driver); | ||
116 | if (retval) | ||
117 | return retval; | ||
118 | |||
119 | retval = usb_register(&nokia_driver); | ||
120 | if (retval) { | ||
121 | usb_serial_deregister(&nokia_serial_driver); | ||
122 | return retval; | ||
123 | } | ||
124 | |||
125 | info(DRIVER_VERSION " " DRIVER_AUTHOR); | ||
126 | info(DRIVER_DESC); | ||
127 | |||
128 | return retval; | ||
129 | } | ||
130 | |||
131 | static void __exit nokia_exit(void) | ||
132 | { | ||
133 | usb_deregister(&nokia_driver); | ||
134 | usb_serial_deregister(&nokia_serial_driver); | ||
135 | } | ||
136 | |||
137 | module_init(nokia_init); | ||
138 | module_exit(nokia_exit); | ||
139 | |||
140 | MODULE_AUTHOR(DRIVER_AUTHOR); | ||
141 | MODULE_DESCRIPTION(DRIVER_DESC); | ||
142 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c index 6a99ae192df1..3caf97072ac0 100644 --- a/drivers/usb/serial/omninet.c +++ b/drivers/usb/serial/omninet.c | |||
@@ -88,10 +88,12 @@ static struct usb_driver omninet_driver = { | |||
88 | }; | 88 | }; |
89 | 89 | ||
90 | 90 | ||
91 | static struct usb_serial_device_type zyxel_omninet_device = { | 91 | static struct usb_serial_driver zyxel_omninet_device = { |
92 | .owner = THIS_MODULE, | 92 | .driver = { |
93 | .name = "ZyXEL - omni.net lcd plus usb", | 93 | .owner = THIS_MODULE, |
94 | .short_name = "omninet", | 94 | .name = "omninet", |
95 | }, | ||
96 | .description = "ZyXEL - omni.net lcd plus usb", | ||
95 | .id_table = id_table, | 97 | .id_table = id_table, |
96 | .num_interrupt_in = 1, | 98 | .num_interrupt_in = 1, |
97 | .num_bulk_in = 1, | 99 | .num_bulk_in = 1, |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 4989e5740d18..7716000045b7 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -105,10 +105,12 @@ static struct usb_driver option_driver = { | |||
105 | /* The card has three separate interfaces, wich the serial driver | 105 | /* The card has three separate interfaces, wich the serial driver |
106 | * recognizes separately, thus num_port=1. | 106 | * recognizes separately, thus num_port=1. |
107 | */ | 107 | */ |
108 | static struct usb_serial_device_type option_3port_device = { | 108 | static struct usb_serial_driver option_3port_device = { |
109 | .owner = THIS_MODULE, | 109 | .driver = { |
110 | .name = "Option 3G data card", | 110 | .owner = THIS_MODULE, |
111 | .short_name = "option", | 111 | .name = "option", |
112 | }, | ||
113 | .description = "Option 3G data card", | ||
112 | .id_table = option_ids, | 114 | .id_table = option_ids, |
113 | .num_interrupt_in = NUM_DONT_CARE, | 115 | .num_interrupt_in = NUM_DONT_CARE, |
114 | .num_bulk_in = NUM_DONT_CARE, | 116 | .num_bulk_in = NUM_DONT_CARE, |
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 3cf245bdda54..165c119bf10e 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -8,31 +8,10 @@ | |||
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License as published by | 10 | * it under the terms of the GNU General Public License as published by |
11 | * the Free Software Foundation; either version 2 of the License, or | 11 | * the Free Software Foundation; either version 2 of the License. |
12 | * (at your option) any later version. | ||
13 | * | 12 | * |
14 | * See Documentation/usb/usb-serial.txt for more information on using this driver | 13 | * See Documentation/usb/usb-serial.txt for more information on using this driver |
15 | * | 14 | * |
16 | * 2002_Mar_26 gkh | ||
17 | * allowed driver to work properly if there is no tty assigned to a port | ||
18 | * (this happens for serial console devices.) | ||
19 | * | ||
20 | * 2001_Oct_06 gkh | ||
21 | * Added RTS and DTR line control. Thanks to joe@bndlg.de for parts of it. | ||
22 | * | ||
23 | * 2001_Sep_19 gkh | ||
24 | * Added break support. | ||
25 | * | ||
26 | * 2001_Aug_30 gkh | ||
27 | * fixed oops in write_bulk_callback. | ||
28 | * | ||
29 | * 2001_Aug_28 gkh | ||
30 | * reworked buffer logic to be like other usb-serial drivers. Hopefully | ||
31 | * removing some reported problems. | ||
32 | * | ||
33 | * 2001_Jun_06 gkh | ||
34 | * finished porting to 2.4 format. | ||
35 | * | ||
36 | */ | 15 | */ |
37 | 16 | ||
38 | #include <linux/config.h> | 17 | #include <linux/config.h> |
@@ -55,7 +34,6 @@ | |||
55 | /* | 34 | /* |
56 | * Version Information | 35 | * Version Information |
57 | */ | 36 | */ |
58 | #define DRIVER_VERSION "v0.12" | ||
59 | #define DRIVER_DESC "Prolific PL2303 USB to serial adaptor driver" | 37 | #define DRIVER_DESC "Prolific PL2303 USB to serial adaptor driver" |
60 | 38 | ||
61 | static int debug; | 39 | static int debug; |
@@ -175,9 +153,11 @@ static unsigned int pl2303_buf_get(struct pl2303_buf *pb, char *buf, | |||
175 | 153 | ||
176 | 154 | ||
177 | /* All of the device info needed for the PL2303 SIO serial converter */ | 155 | /* All of the device info needed for the PL2303 SIO serial converter */ |
178 | static struct usb_serial_device_type pl2303_device = { | 156 | static struct usb_serial_driver pl2303_device = { |
179 | .owner = THIS_MODULE, | 157 | .driver = { |
180 | .name = "PL-2303", | 158 | .owner = THIS_MODULE, |
159 | .name = "pl2303", | ||
160 | }, | ||
181 | .id_table = id_table, | 161 | .id_table = id_table, |
182 | .num_interrupt_in = NUM_DONT_CARE, | 162 | .num_interrupt_in = NUM_DONT_CARE, |
183 | .num_bulk_in = 1, | 163 | .num_bulk_in = 1, |
@@ -1195,7 +1175,7 @@ static int __init pl2303_init (void) | |||
1195 | retval = usb_register(&pl2303_driver); | 1175 | retval = usb_register(&pl2303_driver); |
1196 | if (retval) | 1176 | if (retval) |
1197 | goto failed_usb_register; | 1177 | goto failed_usb_register; |
1198 | info(DRIVER_DESC " " DRIVER_VERSION); | 1178 | info(DRIVER_DESC); |
1199 | return 0; | 1179 | return 0; |
1200 | failed_usb_register: | 1180 | failed_usb_register: |
1201 | usb_serial_deregister(&pl2303_device); | 1181 | usb_serial_deregister(&pl2303_device); |
@@ -1215,7 +1195,6 @@ module_init(pl2303_init); | |||
1215 | module_exit(pl2303_exit); | 1195 | module_exit(pl2303_exit); |
1216 | 1196 | ||
1217 | MODULE_DESCRIPTION(DRIVER_DESC); | 1197 | MODULE_DESCRIPTION(DRIVER_DESC); |
1218 | MODULE_VERSION(DRIVER_VERSION); | ||
1219 | MODULE_LICENSE("GPL"); | 1198 | MODULE_LICENSE("GPL"); |
1220 | 1199 | ||
1221 | module_param(debug, bool, S_IRUGO | S_IWUSR); | 1200 | module_param(debug, bool, S_IRUGO | S_IWUSR); |
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c index 96a17568cbf1..c22bdc0c4dfd 100644 --- a/drivers/usb/serial/safe_serial.c +++ b/drivers/usb/serial/safe_serial.c | |||
@@ -92,7 +92,7 @@ MODULE_DESCRIPTION (DRIVER_DESC); | |||
92 | MODULE_LICENSE("GPL"); | 92 | MODULE_LICENSE("GPL"); |
93 | 93 | ||
94 | #if defined(CONFIG_USBD_SAFE_SERIAL_VENDOR) && !defined(CONFIG_USBD_SAFE_SERIAL_PRODUCT) | 94 | #if defined(CONFIG_USBD_SAFE_SERIAL_VENDOR) && !defined(CONFIG_USBD_SAFE_SERIAL_PRODUCT) |
95 | #abort "SAFE_SERIAL_VENDOR defined without SAFE_SERIAL_PRODUCT" | 95 | #error "SAFE_SERIAL_VENDOR defined without SAFE_SERIAL_PRODUCT" |
96 | #endif | 96 | #endif |
97 | 97 | ||
98 | #if ! defined(CONFIG_USBD_SAFE_SERIAL_VENDOR) | 98 | #if ! defined(CONFIG_USBD_SAFE_SERIAL_VENDOR) |
@@ -397,9 +397,11 @@ static int safe_startup (struct usb_serial *serial) | |||
397 | return 0; | 397 | return 0; |
398 | } | 398 | } |
399 | 399 | ||
400 | static struct usb_serial_device_type safe_device = { | 400 | static struct usb_serial_driver safe_device = { |
401 | .owner = THIS_MODULE, | 401 | .driver = { |
402 | .name = "Safe", | 402 | .owner = THIS_MODULE, |
403 | .name = "safe_serial", | ||
404 | }, | ||
403 | .id_table = id_table, | 405 | .id_table = id_table, |
404 | .num_interrupt_in = NUM_DONT_CARE, | 406 | .num_interrupt_in = NUM_DONT_CARE, |
405 | .num_bulk_in = NUM_DONT_CARE, | 407 | .num_bulk_in = NUM_DONT_CARE, |
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index 59c88de3e7ae..205dbf7201da 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c | |||
@@ -255,9 +255,12 @@ static struct usb_driver ti_usb_driver = { | |||
255 | .id_table = ti_id_table_combined, | 255 | .id_table = ti_id_table_combined, |
256 | }; | 256 | }; |
257 | 257 | ||
258 | static struct usb_serial_device_type ti_1port_device = { | 258 | static struct usb_serial_driver ti_1port_device = { |
259 | .owner = THIS_MODULE, | 259 | .driver = { |
260 | .name = "TI USB 3410 1 port adapter", | 260 | .owner = THIS_MODULE, |
261 | .name = "ti_usb_3410_5052_1", | ||
262 | }, | ||
263 | .description = "TI USB 3410 1 port adapter", | ||
261 | .id_table = ti_id_table_3410, | 264 | .id_table = ti_id_table_3410, |
262 | .num_interrupt_in = 1, | 265 | .num_interrupt_in = 1, |
263 | .num_bulk_in = 1, | 266 | .num_bulk_in = 1, |
@@ -282,9 +285,12 @@ static struct usb_serial_device_type ti_1port_device = { | |||
282 | .write_bulk_callback = ti_bulk_out_callback, | 285 | .write_bulk_callback = ti_bulk_out_callback, |
283 | }; | 286 | }; |
284 | 287 | ||
285 | static struct usb_serial_device_type ti_2port_device = { | 288 | static struct usb_serial_driver ti_2port_device = { |
286 | .owner = THIS_MODULE, | 289 | .driver = { |
287 | .name = "TI USB 5052 2 port adapter", | 290 | .owner = THIS_MODULE, |
291 | .name = "ti_usb_3410_5052_2", | ||
292 | }, | ||
293 | .description = "TI USB 5052 2 port adapter", | ||
288 | .id_table = ti_id_table_5052, | 294 | .id_table = ti_id_table_5052, |
289 | .num_interrupt_in = 1, | 295 | .num_interrupt_in = 1, |
290 | .num_bulk_in = 2, | 296 | .num_bulk_in = 2, |
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index e77fbdfc782d..0c4881d18cd5 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * USB Serial Converter driver | 2 | * USB Serial Converter driver |
3 | * | 3 | * |
4 | * Copyright (C) 1999 - 2004 Greg Kroah-Hartman (greg@kroah.com) | 4 | * Copyright (C) 1999 - 2005 Greg Kroah-Hartman (greg@kroah.com) |
5 | * Copyright (C) 2000 Peter Berger (pberger@brimson.com) | 5 | * Copyright (C) 2000 Peter Berger (pberger@brimson.com) |
6 | * Copyright (C) 2000 Al Borchers (borchers@steinerpoint.com) | 6 | * Copyright (C) 2000 Al Borchers (borchers@steinerpoint.com) |
7 | * | 7 | * |
@@ -9,316 +9,11 @@ | |||
9 | * modify it under the terms of the GNU General Public License version | 9 | * modify it under the terms of the GNU General Public License version |
10 | * 2 as published by the Free Software Foundation. | 10 | * 2 as published by the Free Software Foundation. |
11 | * | 11 | * |
12 | * This driver was originally based on the ACM driver by Armin Fuerst (which was | 12 | * This driver was originally based on the ACM driver by Armin Fuerst (which was |
13 | * based on a driver by Brad Keryan) | 13 | * based on a driver by Brad Keryan) |
14 | * | 14 | * |
15 | * See Documentation/usb/usb-serial.txt for more information on using this driver | 15 | * See Documentation/usb/usb-serial.txt for more information on using this driver |
16 | * | 16 | * |
17 | * (12/10/2002) gkh | ||
18 | * Split the ports off into their own struct device, and added a | ||
19 | * usb-serial bus driver. | ||
20 | * | ||
21 | * (11/19/2002) gkh | ||
22 | * removed a few #ifdefs for the generic code and cleaned up the failure | ||
23 | * logic in initialization. | ||
24 | * | ||
25 | * (10/02/2002) gkh | ||
26 | * moved the console code to console.c and out of this file. | ||
27 | * | ||
28 | * (06/05/2002) gkh | ||
29 | * moved location of startup() call in serial_probe() until after all | ||
30 | * of the port information and endpoints are initialized. This makes | ||
31 | * things easier for some drivers. | ||
32 | * | ||
33 | * (04/10/2002) gkh | ||
34 | * added serial_read_proc function which creates a | ||
35 | * /proc/tty/driver/usb-serial file. | ||
36 | * | ||
37 | * (03/27/2002) gkh | ||
38 | * Got USB serial console code working properly and merged into the main | ||
39 | * version of the tree. Thanks to Randy Dunlap for the initial version | ||
40 | * of this code, and for pushing me to finish it up. | ||
41 | * The USB serial console works with any usb serial driver device. | ||
42 | * | ||
43 | * (03/21/2002) gkh | ||
44 | * Moved all manipulation of port->open_count into the core. Now the | ||
45 | * individual driver's open and close functions are called only when the | ||
46 | * first open() and last close() is called. Making the drivers a bit | ||
47 | * smaller and simpler. | ||
48 | * Fixed a bug if a driver didn't have the owner field set. | ||
49 | * | ||
50 | * (02/26/2002) gkh | ||
51 | * Moved all locking into the main serial_* functions, instead of having | ||
52 | * the individual drivers have to grab the port semaphore. This should | ||
53 | * reduce races. | ||
54 | * Reworked the MOD_INC logic a bit to always increment and decrement, even | ||
55 | * if the generic driver is being used. | ||
56 | * | ||
57 | * (10/10/2001) gkh | ||
58 | * usb_serial_disconnect() now sets the serial->dev pointer is to NULL to | ||
59 | * help prevent child drivers from accessing the device since it is now | ||
60 | * gone. | ||
61 | * | ||
62 | * (09/13/2001) gkh | ||
63 | * Moved generic driver initialize after we have registered with the USB | ||
64 | * core. Thanks to Randy Dunlap for pointing this problem out. | ||
65 | * | ||
66 | * (07/03/2001) gkh | ||
67 | * Fixed module paramater size. Thanks to John Brockmeyer for the pointer. | ||
68 | * Fixed vendor and product getting defined through the MODULE_PARM macro | ||
69 | * if the Generic driver wasn't compiled in. | ||
70 | * Fixed problem with generic_shutdown() not being called for drivers that | ||
71 | * don't have a shutdown() function. | ||
72 | * | ||
73 | * (06/06/2001) gkh | ||
74 | * added evil hack that is needed for the prolific pl2303 device due to the | ||
75 | * crazy way its endpoints are set up. | ||
76 | * | ||
77 | * (05/30/2001) gkh | ||
78 | * switched from using spinlock to a semaphore, which fixes lots of problems. | ||
79 | * | ||
80 | * (04/08/2001) gb | ||
81 | * Identify version on module load. | ||
82 | * | ||
83 | * 2001_02_05 gkh | ||
84 | * Fixed buffer overflows bug with the generic serial driver. Thanks to | ||
85 | * Todd Squires <squirest@ct0.com> for fixing this. | ||
86 | * | ||
87 | * (01/10/2001) gkh | ||
88 | * Fixed bug where the generic serial adaptor grabbed _any_ device that was | ||
89 | * offered to it. | ||
90 | * | ||
91 | * (12/12/2000) gkh | ||
92 | * Removed MOD_INC and MOD_DEC from poll and disconnect functions, and | ||
93 | * moved them to the serial_open and serial_close functions. | ||
94 | * Also fixed bug with there not being a MOD_DEC for the generic driver | ||
95 | * (thanks to Gary Brubaker for finding this.) | ||
96 | * | ||
97 | * (11/29/2000) gkh | ||
98 | * Small NULL pointer initialization cleanup which saves a bit of disk image | ||
99 | * | ||
100 | * (11/01/2000) Adam J. Richter | ||
101 | * instead of using idVendor/idProduct pairs, usb serial drivers | ||
102 | * now identify their hardware interest with usb_device_id tables, | ||
103 | * which they usually have anyhow for use with MODULE_DEVICE_TABLE. | ||
104 | * | ||
105 | * (10/05/2000) gkh | ||
106 | * Fixed bug with urb->dev not being set properly, now that the usb | ||
107 | * core needs it. | ||
108 | * | ||
109 | * (09/11/2000) gkh | ||
110 | * Removed DEBUG #ifdefs with call to usb_serial_debug_data | ||
111 | * | ||
112 | * (08/28/2000) gkh | ||
113 | * Added port_lock to port structure. | ||
114 | * Added locks for SMP safeness to generic driver | ||
115 | * Fixed the ability to open a generic device's port more than once. | ||
116 | * | ||
117 | * (07/23/2000) gkh | ||
118 | * Added bulk_out_endpointAddress to port structure. | ||
119 | * | ||
120 | * (07/19/2000) gkh, pberger, and borchers | ||
121 | * Modifications to allow usb-serial drivers to be modules. | ||
122 | * | ||
123 | * (07/03/2000) gkh | ||
124 | * Added more debugging to serial_ioctl call | ||
125 | * | ||
126 | * (06/25/2000) gkh | ||
127 | * Changed generic_write_bulk_callback to not call wake_up_interruptible | ||
128 | * directly, but to have port_softint do it at a safer time. | ||
129 | * | ||
130 | * (06/23/2000) gkh | ||
131 | * Cleaned up debugging statements in a quest to find UHCI timeout bug. | ||
132 | * | ||
133 | * (05/22/2000) gkh | ||
134 | * Changed the makefile, enabling the big CONFIG_USB_SERIAL_SOMTHING to be | ||
135 | * removed from the individual device source files. | ||
136 | * | ||
137 | * (05/03/2000) gkh | ||
138 | * Added the Digi Acceleport driver from Al Borchers and Peter Berger. | ||
139 | * | ||
140 | * (05/02/2000) gkh | ||
141 | * Changed devfs and tty register code to work properly now. This was based on | ||
142 | * the ACM driver changes by Vojtech Pavlik. | ||
143 | * | ||
144 | * (04/27/2000) Ryan VanderBijl | ||
145 | * Put calls to *_paranoia_checks into one function. | ||
146 | * | ||
147 | * (04/23/2000) gkh | ||
148 | * Fixed bug that Randy Dunlap found for Generic devices with no bulk out ports. | ||
149 | * Moved when the startup code printed out the devices that are supported. | ||
150 | * | ||
151 | * (04/19/2000) gkh | ||
152 | * Added driver for ZyXEL omni.net lcd plus ISDN TA | ||
153 | * Made startup info message specify which drivers were compiled in. | ||
154 | * | ||
155 | * (04/03/2000) gkh | ||
156 | * Changed the probe process to remove the module unload races. | ||
157 | * Changed where the tty layer gets initialized to have devfs work nicer. | ||
158 | * Added initial devfs support. | ||
159 | * | ||
160 | * (03/26/2000) gkh | ||
161 | * Split driver up into device specific pieces. | ||
162 | * | ||
163 | * (03/19/2000) gkh | ||
164 | * Fixed oops that could happen when device was removed while a program | ||
165 | * was talking to the device. | ||
166 | * Removed the static urbs and now all urbs are created and destroyed | ||
167 | * dynamically. | ||
168 | * Reworked the internal interface. Now everything is based on the | ||
169 | * usb_serial_port structure instead of the larger usb_serial structure. | ||
170 | * This fixes the bug that a multiport device could not have more than | ||
171 | * one port open at one time. | ||
172 | * | ||
173 | * (03/17/2000) gkh | ||
174 | * Added config option for debugging messages. | ||
175 | * Added patch for keyspan pda from Brian Warner. | ||
176 | * | ||
177 | * (03/06/2000) gkh | ||
178 | * Added the keyspan pda code from Brian Warner <warner@lothar.com> | ||
179 | * Moved a bunch of the port specific stuff into its own structure. This | ||
180 | * is in anticipation of the true multiport devices (there's a bug if you | ||
181 | * try to access more than one port of any multiport device right now) | ||
182 | * | ||
183 | * (02/21/2000) gkh | ||
184 | * Made it so that any serial devices only have to specify which functions | ||
185 | * they want to overload from the generic function calls (great, | ||
186 | * inheritance in C, in a driver, just what I wanted...) | ||
187 | * Added support for set_termios and ioctl function calls. No drivers take | ||
188 | * advantage of this yet. | ||
189 | * Removed the #ifdef MODULE, now there is no module specific code. | ||
190 | * Cleaned up a few comments in usb-serial.h that were wrong (thanks again | ||
191 | * to Miles Lott). | ||
192 | * Small fix to get_free_serial. | ||
193 | * | ||
194 | * (02/14/2000) gkh | ||
195 | * Removed the Belkin and Peracom functionality from the driver due to | ||
196 | * the lack of support from the vendor, and me not wanting people to | ||
197 | * accidenatly buy the device, expecting it to work with Linux. | ||
198 | * Added read_bulk_callback and write_bulk_callback to the type structure | ||
199 | * for the needs of the FTDI and WhiteHEAT driver. | ||
200 | * Changed all reverences to FTDI to FTDI_SIO at the request of Bill | ||
201 | * Ryder. | ||
202 | * Changed the output urb size back to the max endpoint size to make | ||
203 | * the ftdi_sio driver have it easier, and due to the fact that it didn't | ||
204 | * really increase the speed any. | ||
205 | * | ||
206 | * (02/11/2000) gkh | ||
207 | * Added VISOR_FUNCTION_CONSOLE to the visor startup function. This was a | ||
208 | * patch from Miles Lott (milos@insync.net). | ||
209 | * Fixed bug with not restoring the minor range that a device grabs, if | ||
210 | * the startup function fails (thanks Miles for finding this). | ||
211 | * | ||
212 | * (02/05/2000) gkh | ||
213 | * Added initial framework for the Keyspan PDA serial converter so that | ||
214 | * Brian Warner has a place to put his code. | ||
215 | * Made the ezusb specific functions generic enough that different | ||
216 | * devices can use them (whiteheat and keyspan_pda both need them). | ||
217 | * Split out a whole bunch of structure and other stuff to a separate | ||
218 | * usb-serial.h file. | ||
219 | * Made the Visor connection messages a little more understandable, now | ||
220 | * that Miles Lott (milos@insync.net) has gotten the Generic channel to | ||
221 | * work. Also made them always show up in the log file. | ||
222 | * | ||
223 | * (01/25/2000) gkh | ||
224 | * Added initial framework for FTDI serial converter so that Bill Ryder | ||
225 | * has a place to put his code. | ||
226 | * Added the vendor specific info from Handspring. Now we can print out | ||
227 | * informational debug messages as well as understand what is happening. | ||
228 | * | ||
229 | * (01/23/2000) gkh | ||
230 | * Fixed problem of crash when trying to open a port that didn't have a | ||
231 | * device assigned to it. Made the minor node finding a little smarter, | ||
232 | * now it looks to find a continuous space for the new device. | ||
233 | * | ||
234 | * (01/21/2000) gkh | ||
235 | * Fixed bug in visor_startup with patch from Miles Lott (milos@insync.net) | ||
236 | * Fixed get_serial_by_minor which was all messed up for multi port | ||
237 | * devices. Fixed multi port problem for generic devices. Now the number | ||
238 | * of ports is determined by the number of bulk out endpoints for the | ||
239 | * generic device. | ||
240 | * | ||
241 | * (01/19/2000) gkh | ||
242 | * Removed lots of cruft that was around from the old (pre urb) driver | ||
243 | * interface. | ||
244 | * Made the serial_table dynamic. This should save lots of memory when | ||
245 | * the number of minor nodes goes up to 256. | ||
246 | * Added initial support for devices that have more than one port. | ||
247 | * Added more debugging comments for the Visor, and added a needed | ||
248 | * set_configuration call. | ||
249 | * | ||
250 | * (01/17/2000) gkh | ||
251 | * Fixed the WhiteHEAT firmware (my processing tool had a bug) | ||
252 | * and added new debug loader firmware for it. | ||
253 | * Removed the put_char function as it isn't really needed. | ||
254 | * Added visor startup commands as found by the Win98 dump. | ||
255 | * | ||
256 | * (01/13/2000) gkh | ||
257 | * Fixed the vendor id for the generic driver to the one I meant it to be. | ||
258 | * | ||
259 | * (01/12/2000) gkh | ||
260 | * Forget the version numbering...that's pretty useless... | ||
261 | * Made the driver able to be compiled so that the user can select which | ||
262 | * converter they want to use. This allows people who only want the Visor | ||
263 | * support to not pay the memory size price of the WhiteHEAT. | ||
264 | * Fixed bug where the generic driver (idVendor=0000 and idProduct=0000) | ||
265 | * grabbed the root hub. Not good. | ||
266 | * | ||
267 | * version 0.4.0 (01/10/2000) gkh | ||
268 | * Added whiteheat.h containing the firmware for the ConnectTech WhiteHEAT | ||
269 | * device. Added startup function to allow firmware to be downloaded to | ||
270 | * a device if it needs to be. | ||
271 | * Added firmware download logic to the WhiteHEAT device. | ||
272 | * Started to add #defines to split up the different drivers for potential | ||
273 | * configuration option. | ||
274 | * | ||
275 | * version 0.3.1 (12/30/99) gkh | ||
276 | * Fixed problems with urb for bulk out. | ||
277 | * Added initial support for multiple sets of endpoints. This enables | ||
278 | * the Handspring Visor to be attached successfully. Only the first | ||
279 | * bulk in / bulk out endpoint pair is being used right now. | ||
280 | * | ||
281 | * version 0.3.0 (12/27/99) gkh | ||
282 | * Added initial support for the Handspring Visor based on a patch from | ||
283 | * Miles Lott (milos@sneety.insync.net) | ||
284 | * Cleaned up the code a bunch and converted over to using urbs only. | ||
285 | * | ||
286 | * version 0.2.3 (12/21/99) gkh | ||
287 | * Added initial support for the Connect Tech WhiteHEAT converter. | ||
288 | * Incremented the number of ports in expectation of getting the | ||
289 | * WhiteHEAT to work properly (4 ports per connection). | ||
290 | * Added notification on insertion and removal of what port the | ||
291 | * device is/was connected to (and what kind of device it was). | ||
292 | * | ||
293 | * version 0.2.2 (12/16/99) gkh | ||
294 | * Changed major number to the new allocated number. We're legal now! | ||
295 | * | ||
296 | * version 0.2.1 (12/14/99) gkh | ||
297 | * Fixed bug that happens when device node is opened when there isn't a | ||
298 | * device attached to it. Thanks to marek@webdesign.no for noticing this. | ||
299 | * | ||
300 | * version 0.2.0 (11/10/99) gkh | ||
301 | * Split up internals to make it easier to add different types of serial | ||
302 | * converters to the code. | ||
303 | * Added a "generic" driver that gets it's vendor and product id | ||
304 | * from when the module is loaded. Thanks to David E. Nelson (dnelson@jump.net) | ||
305 | * for the idea and sample code (from the usb scanner driver.) | ||
306 | * Cleared up any licensing questions by releasing it under the GNU GPL. | ||
307 | * | ||
308 | * version 0.1.2 (10/25/99) gkh | ||
309 | * Fixed bug in detecting device. | ||
310 | * | ||
311 | * version 0.1.1 (10/05/99) gkh | ||
312 | * Changed the major number to not conflict with anything else. | ||
313 | * | ||
314 | * version 0.1 (09/28/99) gkh | ||
315 | * Can recognize the two different devices and start up a read from | ||
316 | * device when asked to. Writes also work. No control signals yet, this | ||
317 | * all is vendor specific data (i.e. no spec), also no control for | ||
318 | * different baud rates or other bit settings. | ||
319 | * Currently we are using the same devid as the acm driver. This needs | ||
320 | * to change. | ||
321 | * | ||
322 | */ | 17 | */ |
323 | 18 | ||
324 | #include <linux/config.h> | 19 | #include <linux/config.h> |
@@ -342,7 +37,6 @@ | |||
342 | /* | 37 | /* |
343 | * Version Information | 38 | * Version Information |
344 | */ | 39 | */ |
345 | #define DRIVER_VERSION "v2.0" | ||
346 | #define DRIVER_AUTHOR "Greg Kroah-Hartman, greg@kroah.com, http://www.kroah.com/linux/" | 40 | #define DRIVER_AUTHOR "Greg Kroah-Hartman, greg@kroah.com, http://www.kroah.com/linux/" |
347 | #define DRIVER_DESC "USB Serial Driver core" | 41 | #define DRIVER_DESC "USB Serial Driver core" |
348 | 42 | ||
@@ -427,7 +121,7 @@ static void destroy_serial(struct kref *kref) | |||
427 | 121 | ||
428 | serial = to_usb_serial(kref); | 122 | serial = to_usb_serial(kref); |
429 | 123 | ||
430 | dbg ("%s - %s", __FUNCTION__, serial->type->name); | 124 | dbg("%s - %s", __FUNCTION__, serial->type->description); |
431 | 125 | ||
432 | serial->type->shutdown(serial); | 126 | serial->type->shutdown(serial); |
433 | 127 | ||
@@ -507,7 +201,7 @@ static int serial_open (struct tty_struct *tty, struct file * filp) | |||
507 | /* lock this module before we call it | 201 | /* lock this module before we call it |
508 | * this may fail, which means we must bail out, | 202 | * this may fail, which means we must bail out, |
509 | * safe because we are called with BKL held */ | 203 | * safe because we are called with BKL held */ |
510 | if (!try_module_get(serial->type->owner)) { | 204 | if (!try_module_get(serial->type->driver.owner)) { |
511 | retval = -ENODEV; | 205 | retval = -ENODEV; |
512 | goto bailout_kref_put; | 206 | goto bailout_kref_put; |
513 | } | 207 | } |
@@ -522,7 +216,7 @@ static int serial_open (struct tty_struct *tty, struct file * filp) | |||
522 | return 0; | 216 | return 0; |
523 | 217 | ||
524 | bailout_module_put: | 218 | bailout_module_put: |
525 | module_put(serial->type->owner); | 219 | module_put(serial->type->driver.owner); |
526 | bailout_kref_put: | 220 | bailout_kref_put: |
527 | kref_put(&serial->kref, destroy_serial); | 221 | kref_put(&serial->kref, destroy_serial); |
528 | port->open_count = 0; | 222 | port->open_count = 0; |
@@ -553,7 +247,7 @@ static void serial_close(struct tty_struct *tty, struct file * filp) | |||
553 | port->tty = NULL; | 247 | port->tty = NULL; |
554 | } | 248 | } |
555 | 249 | ||
556 | module_put(port->serial->type->owner); | 250 | module_put(port->serial->type->driver.owner); |
557 | } | 251 | } |
558 | 252 | ||
559 | kref_put(&port->serial->kref, destroy_serial); | 253 | kref_put(&port->serial->kref, destroy_serial); |
@@ -711,16 +405,16 @@ static int serial_read_proc (char *page, char **start, off_t off, int count, int | |||
711 | char tmp[40]; | 405 | char tmp[40]; |
712 | 406 | ||
713 | dbg("%s", __FUNCTION__); | 407 | dbg("%s", __FUNCTION__); |
714 | length += sprintf (page, "usbserinfo:1.0 driver:%s\n", DRIVER_VERSION); | 408 | length += sprintf (page, "usbserinfo:1.0 driver:2.0\n"); |
715 | for (i = 0; i < SERIAL_TTY_MINORS && length < PAGE_SIZE; ++i) { | 409 | for (i = 0; i < SERIAL_TTY_MINORS && length < PAGE_SIZE; ++i) { |
716 | serial = usb_serial_get_by_index(i); | 410 | serial = usb_serial_get_by_index(i); |
717 | if (serial == NULL) | 411 | if (serial == NULL) |
718 | continue; | 412 | continue; |
719 | 413 | ||
720 | length += sprintf (page+length, "%d:", i); | 414 | length += sprintf (page+length, "%d:", i); |
721 | if (serial->type->owner) | 415 | if (serial->type->driver.owner) |
722 | length += sprintf (page+length, " module:%s", module_name(serial->type->owner)); | 416 | length += sprintf (page+length, " module:%s", module_name(serial->type->driver.owner)); |
723 | length += sprintf (page+length, " name:\"%s\"", serial->type->name); | 417 | length += sprintf (page+length, " name:\"%s\"", serial->type->description); |
724 | length += sprintf (page+length, " vendor:%04x product:%04x", | 418 | length += sprintf (page+length, " vendor:%04x product:%04x", |
725 | le16_to_cpu(serial->dev->descriptor.idVendor), | 419 | le16_to_cpu(serial->dev->descriptor.idVendor), |
726 | le16_to_cpu(serial->dev->descriptor.idProduct)); | 420 | le16_to_cpu(serial->dev->descriptor.idProduct)); |
@@ -823,7 +517,7 @@ static void port_release(struct device *dev) | |||
823 | 517 | ||
824 | static struct usb_serial * create_serial (struct usb_device *dev, | 518 | static struct usb_serial * create_serial (struct usb_device *dev, |
825 | struct usb_interface *interface, | 519 | struct usb_interface *interface, |
826 | struct usb_serial_device_type *type) | 520 | struct usb_serial_driver *driver) |
827 | { | 521 | { |
828 | struct usb_serial *serial; | 522 | struct usb_serial *serial; |
829 | 523 | ||
@@ -834,22 +528,22 @@ static struct usb_serial * create_serial (struct usb_device *dev, | |||
834 | } | 528 | } |
835 | memset (serial, 0, sizeof(*serial)); | 529 | memset (serial, 0, sizeof(*serial)); |
836 | serial->dev = usb_get_dev(dev); | 530 | serial->dev = usb_get_dev(dev); |
837 | serial->type = type; | 531 | serial->type = driver; |
838 | serial->interface = interface; | 532 | serial->interface = interface; |
839 | kref_init(&serial->kref); | 533 | kref_init(&serial->kref); |
840 | 534 | ||
841 | return serial; | 535 | return serial; |
842 | } | 536 | } |
843 | 537 | ||
844 | static struct usb_serial_device_type *search_serial_device(struct usb_interface *iface) | 538 | static struct usb_serial_driver *search_serial_device(struct usb_interface *iface) |
845 | { | 539 | { |
846 | struct list_head *p; | 540 | struct list_head *p; |
847 | const struct usb_device_id *id; | 541 | const struct usb_device_id *id; |
848 | struct usb_serial_device_type *t; | 542 | struct usb_serial_driver *t; |
849 | 543 | ||
850 | /* List trough know devices and see if the usb id matches */ | 544 | /* List trough know devices and see if the usb id matches */ |
851 | list_for_each(p, &usb_serial_driver_list) { | 545 | list_for_each(p, &usb_serial_driver_list) { |
852 | t = list_entry(p, struct usb_serial_device_type, driver_list); | 546 | t = list_entry(p, struct usb_serial_driver, driver_list); |
853 | id = usb_match_id(iface, t->id_table); | 547 | id = usb_match_id(iface, t->id_table); |
854 | if (id != NULL) { | 548 | if (id != NULL) { |
855 | dbg("descriptor matches"); | 549 | dbg("descriptor matches"); |
@@ -872,7 +566,7 @@ int usb_serial_probe(struct usb_interface *interface, | |||
872 | struct usb_endpoint_descriptor *interrupt_out_endpoint[MAX_NUM_PORTS]; | 566 | struct usb_endpoint_descriptor *interrupt_out_endpoint[MAX_NUM_PORTS]; |
873 | struct usb_endpoint_descriptor *bulk_in_endpoint[MAX_NUM_PORTS]; | 567 | struct usb_endpoint_descriptor *bulk_in_endpoint[MAX_NUM_PORTS]; |
874 | struct usb_endpoint_descriptor *bulk_out_endpoint[MAX_NUM_PORTS]; | 568 | struct usb_endpoint_descriptor *bulk_out_endpoint[MAX_NUM_PORTS]; |
875 | struct usb_serial_device_type *type = NULL; | 569 | struct usb_serial_driver *type = NULL; |
876 | int retval; | 570 | int retval; |
877 | int minor; | 571 | int minor; |
878 | int buffer_size; | 572 | int buffer_size; |
@@ -900,7 +594,7 @@ int usb_serial_probe(struct usb_interface *interface, | |||
900 | if (type->probe) { | 594 | if (type->probe) { |
901 | const struct usb_device_id *id; | 595 | const struct usb_device_id *id; |
902 | 596 | ||
903 | if (!try_module_get(type->owner)) { | 597 | if (!try_module_get(type->driver.owner)) { |
904 | dev_err(&interface->dev, "module get failed, exiting\n"); | 598 | dev_err(&interface->dev, "module get failed, exiting\n"); |
905 | kfree (serial); | 599 | kfree (serial); |
906 | return -EIO; | 600 | return -EIO; |
@@ -908,7 +602,7 @@ int usb_serial_probe(struct usb_interface *interface, | |||
908 | 602 | ||
909 | id = usb_match_id(interface, type->id_table); | 603 | id = usb_match_id(interface, type->id_table); |
910 | retval = type->probe(serial, id); | 604 | retval = type->probe(serial, id); |
911 | module_put(type->owner); | 605 | module_put(type->driver.owner); |
912 | 606 | ||
913 | if (retval) { | 607 | if (retval) { |
914 | dbg ("sub driver rejected device"); | 608 | dbg ("sub driver rejected device"); |
@@ -992,7 +686,7 @@ int usb_serial_probe(struct usb_interface *interface, | |||
992 | #endif | 686 | #endif |
993 | 687 | ||
994 | /* found all that we need */ | 688 | /* found all that we need */ |
995 | dev_info(&interface->dev, "%s converter detected\n", type->name); | 689 | dev_info(&interface->dev, "%s converter detected\n", type->description); |
996 | 690 | ||
997 | #ifdef CONFIG_USB_SERIAL_GENERIC | 691 | #ifdef CONFIG_USB_SERIAL_GENERIC |
998 | if (type == &usb_serial_generic_device) { | 692 | if (type == &usb_serial_generic_device) { |
@@ -1007,13 +701,13 @@ int usb_serial_probe(struct usb_interface *interface, | |||
1007 | if (!num_ports) { | 701 | if (!num_ports) { |
1008 | /* if this device type has a calc_num_ports function, call it */ | 702 | /* if this device type has a calc_num_ports function, call it */ |
1009 | if (type->calc_num_ports) { | 703 | if (type->calc_num_ports) { |
1010 | if (!try_module_get(type->owner)) { | 704 | if (!try_module_get(type->driver.owner)) { |
1011 | dev_err(&interface->dev, "module get failed, exiting\n"); | 705 | dev_err(&interface->dev, "module get failed, exiting\n"); |
1012 | kfree (serial); | 706 | kfree (serial); |
1013 | return -EIO; | 707 | return -EIO; |
1014 | } | 708 | } |
1015 | num_ports = type->calc_num_ports (serial); | 709 | num_ports = type->calc_num_ports (serial); |
1016 | module_put(type->owner); | 710 | module_put(type->driver.owner); |
1017 | } | 711 | } |
1018 | if (!num_ports) | 712 | if (!num_ports) |
1019 | num_ports = type->num_ports; | 713 | num_ports = type->num_ports; |
@@ -1158,12 +852,12 @@ int usb_serial_probe(struct usb_interface *interface, | |||
1158 | 852 | ||
1159 | /* if this device type has an attach function, call it */ | 853 | /* if this device type has an attach function, call it */ |
1160 | if (type->attach) { | 854 | if (type->attach) { |
1161 | if (!try_module_get(type->owner)) { | 855 | if (!try_module_get(type->driver.owner)) { |
1162 | dev_err(&interface->dev, "module get failed, exiting\n"); | 856 | dev_err(&interface->dev, "module get failed, exiting\n"); |
1163 | goto probe_error; | 857 | goto probe_error; |
1164 | } | 858 | } |
1165 | retval = type->attach (serial); | 859 | retval = type->attach (serial); |
1166 | module_put(type->owner); | 860 | module_put(type->driver.owner); |
1167 | if (retval < 0) | 861 | if (retval < 0) |
1168 | goto probe_error; | 862 | goto probe_error; |
1169 | if (retval > 0) { | 863 | if (retval > 0) { |
@@ -1330,7 +1024,7 @@ static int __init usb_serial_init(void) | |||
1330 | goto exit_generic; | 1024 | goto exit_generic; |
1331 | } | 1025 | } |
1332 | 1026 | ||
1333 | info(DRIVER_DESC " " DRIVER_VERSION); | 1027 | info(DRIVER_DESC); |
1334 | 1028 | ||
1335 | return result; | 1029 | return result; |
1336 | 1030 | ||
@@ -1375,7 +1069,7 @@ module_exit(usb_serial_exit); | |||
1375 | } \ | 1069 | } \ |
1376 | } while (0) | 1070 | } while (0) |
1377 | 1071 | ||
1378 | static void fixup_generic(struct usb_serial_device_type *device) | 1072 | static void fixup_generic(struct usb_serial_driver *device) |
1379 | { | 1073 | { |
1380 | set_to_generic_if_null(device, open); | 1074 | set_to_generic_if_null(device, open); |
1381 | set_to_generic_if_null(device, write); | 1075 | set_to_generic_if_null(device, write); |
@@ -1387,30 +1081,33 @@ static void fixup_generic(struct usb_serial_device_type *device) | |||
1387 | set_to_generic_if_null(device, shutdown); | 1081 | set_to_generic_if_null(device, shutdown); |
1388 | } | 1082 | } |
1389 | 1083 | ||
1390 | int usb_serial_register(struct usb_serial_device_type *new_device) | 1084 | int usb_serial_register(struct usb_serial_driver *driver) |
1391 | { | 1085 | { |
1392 | int retval; | 1086 | int retval; |
1393 | 1087 | ||
1394 | fixup_generic(new_device); | 1088 | fixup_generic(driver); |
1089 | |||
1090 | if (!driver->description) | ||
1091 | driver->description = driver->driver.name; | ||
1395 | 1092 | ||
1396 | /* Add this device to our list of devices */ | 1093 | /* Add this device to our list of devices */ |
1397 | list_add(&new_device->driver_list, &usb_serial_driver_list); | 1094 | list_add(&driver->driver_list, &usb_serial_driver_list); |
1398 | 1095 | ||
1399 | retval = usb_serial_bus_register(new_device); | 1096 | retval = usb_serial_bus_register(driver); |
1400 | if (retval) { | 1097 | if (retval) { |
1401 | err("problem %d when registering driver %s", retval, new_device->name); | 1098 | err("problem %d when registering driver %s", retval, driver->description); |
1402 | list_del(&new_device->driver_list); | 1099 | list_del(&driver->driver_list); |
1403 | } | 1100 | } |
1404 | else | 1101 | else |
1405 | info("USB Serial support registered for %s", new_device->name); | 1102 | info("USB Serial support registered for %s", driver->description); |
1406 | 1103 | ||
1407 | return retval; | 1104 | return retval; |
1408 | } | 1105 | } |
1409 | 1106 | ||
1410 | 1107 | ||
1411 | void usb_serial_deregister(struct usb_serial_device_type *device) | 1108 | void usb_serial_deregister(struct usb_serial_driver *device) |
1412 | { | 1109 | { |
1413 | info("USB Serial deregistering driver %s", device->name); | 1110 | info("USB Serial deregistering driver %s", device->description); |
1414 | list_del(&device->driver_list); | 1111 | list_del(&device->driver_list); |
1415 | usb_serial_bus_deregister(device); | 1112 | usb_serial_bus_deregister(device); |
1416 | } | 1113 | } |
@@ -1429,7 +1126,6 @@ EXPORT_SYMBOL_GPL(usb_serial_port_softint); | |||
1429 | /* Module information */ | 1126 | /* Module information */ |
1430 | MODULE_AUTHOR( DRIVER_AUTHOR ); | 1127 | MODULE_AUTHOR( DRIVER_AUTHOR ); |
1431 | MODULE_DESCRIPTION( DRIVER_DESC ); | 1128 | MODULE_DESCRIPTION( DRIVER_DESC ); |
1432 | MODULE_VERSION( DRIVER_VERSION ); | ||
1433 | MODULE_LICENSE("GPL"); | 1129 | MODULE_LICENSE("GPL"); |
1434 | 1130 | ||
1435 | module_param(debug, bool, S_IRUGO | S_IWUSR); | 1131 | module_param(debug, bool, S_IRUGO | S_IWUSR); |
diff --git a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h index 57f92f054c75..238a5a871ed6 100644 --- a/drivers/usb/serial/usb-serial.h +++ b/drivers/usb/serial/usb-serial.h | |||
@@ -1,53 +1,13 @@ | |||
1 | /* | 1 | /* |
2 | * USB Serial Converter driver | 2 | * USB Serial Converter driver |
3 | * | 3 | * |
4 | * Copyright (C) 1999 - 2004 | 4 | * Copyright (C) 1999 - 2005 |
5 | * Greg Kroah-Hartman (greg@kroah.com) | 5 | * Greg Kroah-Hartman (greg@kroah.com) |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
9 | * the Free Software Foundation; either version 2 of the License, or | 9 | * the Free Software Foundation; either version 2 of the License. |
10 | * (at your option) any later version. | ||
11 | * | 10 | * |
12 | * See Documentation/usb/usb-serial.txt for more information on using this driver | ||
13 | * | ||
14 | * (03/26/2002) gkh | ||
15 | * removed the port->tty check from port_paranoia_check() due to serial | ||
16 | * consoles not having a tty device assigned to them. | ||
17 | * | ||
18 | * (12/03/2001) gkh | ||
19 | * removed active from the port structure. | ||
20 | * added documentation to the usb_serial_device_type structure | ||
21 | * | ||
22 | * (10/10/2001) gkh | ||
23 | * added vendor and product to serial structure. Needed to determine device | ||
24 | * owner when the device is disconnected. | ||
25 | * | ||
26 | * (05/30/2001) gkh | ||
27 | * added sem to port structure and removed port_lock | ||
28 | * | ||
29 | * (10/05/2000) gkh | ||
30 | * Added interrupt_in_endpointAddress and bulk_in_endpointAddress to help | ||
31 | * fix bug with urb->dev not being set properly, now that the usb core | ||
32 | * needs it. | ||
33 | * | ||
34 | * (09/11/2000) gkh | ||
35 | * Added usb_serial_debug_data function to help get rid of #DEBUG in the | ||
36 | * drivers. | ||
37 | * | ||
38 | * (08/28/2000) gkh | ||
39 | * Added port_lock to port structure. | ||
40 | * | ||
41 | * (08/08/2000) gkh | ||
42 | * Added open_count to port structure. | ||
43 | * | ||
44 | * (07/23/2000) gkh | ||
45 | * Added bulk_out_endpointAddress to port structure. | ||
46 | * | ||
47 | * (07/19/2000) gkh, pberger, and borchers | ||
48 | * Modifications to allow usb-serial drivers to be modules. | ||
49 | * | ||
50 | * | ||
51 | */ | 11 | */ |
52 | 12 | ||
53 | 13 | ||
@@ -143,7 +103,7 @@ static inline void usb_set_serial_port_data (struct usb_serial_port *port, void | |||
143 | /** | 103 | /** |
144 | * usb_serial - structure used by the usb-serial core for a device | 104 | * usb_serial - structure used by the usb-serial core for a device |
145 | * @dev: pointer to the struct usb_device for this device | 105 | * @dev: pointer to the struct usb_device for this device |
146 | * @type: pointer to the struct usb_serial_device_type for this device | 106 | * @type: pointer to the struct usb_serial_driver for this device |
147 | * @interface: pointer to the struct usb_interface for this device | 107 | * @interface: pointer to the struct usb_interface for this device |
148 | * @minor: the starting minor number for this device | 108 | * @minor: the starting minor number for this device |
149 | * @num_ports: the number of ports this device has | 109 | * @num_ports: the number of ports this device has |
@@ -159,7 +119,7 @@ static inline void usb_set_serial_port_data (struct usb_serial_port *port, void | |||
159 | */ | 119 | */ |
160 | struct usb_serial { | 120 | struct usb_serial { |
161 | struct usb_device * dev; | 121 | struct usb_device * dev; |
162 | struct usb_serial_device_type * type; | 122 | struct usb_serial_driver * type; |
163 | struct usb_interface * interface; | 123 | struct usb_interface * interface; |
164 | unsigned char minor; | 124 | unsigned char minor; |
165 | unsigned char num_ports; | 125 | unsigned char num_ports; |
@@ -188,13 +148,9 @@ static inline void usb_set_serial_data (struct usb_serial *serial, void *data) | |||
188 | } | 148 | } |
189 | 149 | ||
190 | /** | 150 | /** |
191 | * usb_serial_device_type - a structure that defines a usb serial device | 151 | * usb_serial_driver - describes a usb serial driver |
192 | * @owner: pointer to the module that owns this device. | 152 | * @description: pointer to a string that describes this driver. This string used |
193 | * @name: pointer to a string that describes this device. This string used | ||
194 | * in the syslog messages when a device is inserted or removed. | 153 | * in the syslog messages when a device is inserted or removed. |
195 | * @short_name: a pointer to a string that describes this device in | ||
196 | * KOBJ_NAME_LEN characters or less. This is used for the sysfs interface | ||
197 | * to describe the driver. | ||
198 | * @id_table: pointer to a list of usb_device_id structures that define all | 154 | * @id_table: pointer to a list of usb_device_id structures that define all |
199 | * of the devices this structure can support. | 155 | * of the devices this structure can support. |
200 | * @num_interrupt_in: the number of interrupt in endpoints this device will | 156 | * @num_interrupt_in: the number of interrupt in endpoints this device will |
@@ -221,16 +177,19 @@ static inline void usb_set_serial_data (struct usb_serial *serial, void *data) | |||
221 | * @shutdown: pointer to the driver's shutdown function. This will be | 177 | * @shutdown: pointer to the driver's shutdown function. This will be |
222 | * called when the device is removed from the system. | 178 | * called when the device is removed from the system. |
223 | * | 179 | * |
224 | * This structure is defines a USB Serial device. It provides all of | 180 | * This structure is defines a USB Serial driver. It provides all of |
225 | * the information that the USB serial core code needs. If the function | 181 | * the information that the USB serial core code needs. If the function |
226 | * pointers are defined, then the USB serial core code will call them when | 182 | * pointers are defined, then the USB serial core code will call them when |
227 | * the corresponding tty port functions are called. If they are not | 183 | * the corresponding tty port functions are called. If they are not |
228 | * called, the generic serial function will be used instead. | 184 | * called, the generic serial function will be used instead. |
185 | * | ||
186 | * The driver.owner field should be set to the module owner of this driver. | ||
187 | * The driver.name field should be set to the name of this driver (remember | ||
188 | * it will show up in sysfs, so it needs to be short and to the point. | ||
189 | * Useing the module name is a good idea.) | ||
229 | */ | 190 | */ |
230 | struct usb_serial_device_type { | 191 | struct usb_serial_driver { |
231 | struct module *owner; | 192 | const char *description; |
232 | char *name; | ||
233 | char *short_name; | ||
234 | const struct usb_device_id *id_table; | 193 | const struct usb_device_id *id_table; |
235 | char num_interrupt_in; | 194 | char num_interrupt_in; |
236 | char num_interrupt_out; | 195 | char num_interrupt_out; |
@@ -269,10 +228,10 @@ struct usb_serial_device_type { | |||
269 | void (*read_bulk_callback)(struct urb *urb, struct pt_regs *regs); | 228 | void (*read_bulk_callback)(struct urb *urb, struct pt_regs *regs); |
270 | void (*write_bulk_callback)(struct urb *urb, struct pt_regs *regs); | 229 | void (*write_bulk_callback)(struct urb *urb, struct pt_regs *regs); |
271 | }; | 230 | }; |
272 | #define to_usb_serial_driver(d) container_of(d, struct usb_serial_device_type, driver) | 231 | #define to_usb_serial_driver(d) container_of(d, struct usb_serial_driver, driver) |
273 | 232 | ||
274 | extern int usb_serial_register(struct usb_serial_device_type *new_device); | 233 | extern int usb_serial_register(struct usb_serial_driver *driver); |
275 | extern void usb_serial_deregister(struct usb_serial_device_type *device); | 234 | extern void usb_serial_deregister(struct usb_serial_driver *driver); |
276 | extern void usb_serial_port_softint(void *private); | 235 | extern void usb_serial_port_softint(void *private); |
277 | 236 | ||
278 | extern int usb_serial_probe(struct usb_interface *iface, const struct usb_device_id *id); | 237 | extern int usb_serial_probe(struct usb_interface *iface, const struct usb_device_id *id); |
@@ -303,10 +262,10 @@ extern void usb_serial_generic_shutdown (struct usb_serial *serial); | |||
303 | extern int usb_serial_generic_register (int debug); | 262 | extern int usb_serial_generic_register (int debug); |
304 | extern void usb_serial_generic_deregister (void); | 263 | extern void usb_serial_generic_deregister (void); |
305 | 264 | ||
306 | extern int usb_serial_bus_register (struct usb_serial_device_type *device); | 265 | extern int usb_serial_bus_register (struct usb_serial_driver *device); |
307 | extern void usb_serial_bus_deregister (struct usb_serial_device_type *device); | 266 | extern void usb_serial_bus_deregister (struct usb_serial_driver *device); |
308 | 267 | ||
309 | extern struct usb_serial_device_type usb_serial_generic_device; | 268 | extern struct usb_serial_driver usb_serial_generic_device; |
310 | extern struct bus_type usb_serial_bus_type; | 269 | extern struct bus_type usb_serial_bus_type; |
311 | extern struct tty_driver *usb_serial_tty_driver; | 270 | extern struct tty_driver *usb_serial_tty_driver; |
312 | 271 | ||
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c index 31c57adcb623..a473c1c34559 100644 --- a/drivers/usb/serial/visor.c +++ b/drivers/usb/serial/visor.c | |||
@@ -7,139 +7,10 @@ | |||
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
10 | * the Free Software Foundation; either version 2 of the License, or | 10 | * the Free Software Foundation; either version 2 of the License. |
11 | * (at your option) any later version. | ||
12 | * | 11 | * |
13 | * See Documentation/usb/usb-serial.txt for more information on using this driver | 12 | * See Documentation/usb/usb-serial.txt for more information on using this driver |
14 | * | 13 | * |
15 | * (06/03/2003) Judd Montgomery <judd at jpilot.org> | ||
16 | * Added support for module parameter options for untested/unknown | ||
17 | * devices. | ||
18 | * | ||
19 | * (03/09/2003) gkh | ||
20 | * Added support for the Sony Clie NZ90V device. Thanks to Martin Brachtl | ||
21 | * <brachtl@redgrep.cz> for the information. | ||
22 | * | ||
23 | * (03/05/2003) gkh | ||
24 | * Think Treo support is now working. | ||
25 | * | ||
26 | * (04/03/2002) gkh | ||
27 | * Added support for the Sony OS 4.1 devices. Thanks to Hiroyuki ARAKI | ||
28 | * <hiro@zob.ne.jp> for the information. | ||
29 | * | ||
30 | * (03/27/2002) gkh | ||
31 | * Removed assumptions that port->tty was always valid (is not true | ||
32 | * for usb serial console devices.) | ||
33 | * | ||
34 | * (03/23/2002) gkh | ||
35 | * Added support for the Palm i705 device, thanks to Thomas Riemer | ||
36 | * <tom@netmech.com> for the information. | ||
37 | * | ||
38 | * (03/21/2002) gkh | ||
39 | * Added support for the Palm m130 device, thanks to Udo Eisenbarth | ||
40 | * <udo.eisenbarth@web.de> for the information. | ||
41 | * | ||
42 | * (02/27/2002) gkh | ||
43 | * Reworked the urb handling logic. We have no more pool, but dynamically | ||
44 | * allocate the urb and the transfer buffer on the fly. In testing this | ||
45 | * does not incure any measurable overhead. This also relies on the fact | ||
46 | * that we have proper reference counting logic for urbs. | ||
47 | * | ||
48 | * (02/21/2002) SilaS | ||
49 | * Added initial support for the Palm m515 devices. | ||
50 | * | ||
51 | * (02/14/2002) gkh | ||
52 | * Added support for the Clie S-360 device. | ||
53 | * | ||
54 | * (12/18/2001) gkh | ||
55 | * Added better Clie support for 3.5 devices. Thanks to Geoffrey Levand | ||
56 | * for the patch. | ||
57 | * | ||
58 | * (11/11/2001) gkh | ||
59 | * Added support for the m125 devices, and added check to prevent oopses | ||
60 | * for Clié devices that lie about the number of ports they have. | ||
61 | * | ||
62 | * (08/30/2001) gkh | ||
63 | * Added support for the Clie devices, both the 3.5 and 4.0 os versions. | ||
64 | * Many thanks to Daniel Burke, and Bryan Payne for helping with this. | ||
65 | * | ||
66 | * (08/23/2001) gkh | ||
67 | * fixed a few potential bugs pointed out by Oliver Neukum. | ||
68 | * | ||
69 | * (05/30/2001) gkh | ||
70 | * switched from using spinlock to a semaphore, which fixes lots of problems. | ||
71 | * | ||
72 | * (05/28/2000) gkh | ||
73 | * Added initial support for the Palm m500 and Palm m505 devices. | ||
74 | * | ||
75 | * (04/08/2001) gb | ||
76 | * Identify version on module load. | ||
77 | * | ||
78 | * (01/21/2000) gkh | ||
79 | * Added write_room and chars_in_buffer, as they were previously using the | ||
80 | * generic driver versions which is all wrong now that we are using an urb | ||
81 | * pool. Thanks to Wolfgang Grandegger for pointing this out to me. | ||
82 | * Removed count assignment in the write function, which was not needed anymore | ||
83 | * either. Thanks to Al Borchers for pointing this out. | ||
84 | * | ||
85 | * (12/12/2000) gkh | ||
86 | * Moved MOD_DEC to end of visor_close to be nicer, as the final write | ||
87 | * message can sleep. | ||
88 | * | ||
89 | * (11/12/2000) gkh | ||
90 | * Fixed bug with data being dropped on the floor by forcing tty->low_latency | ||
91 | * to be on. Hopefully this fixes the OHCI issue! | ||
92 | * | ||
93 | * (11/01/2000) Adam J. Richter | ||
94 | * usb_device_id table support | ||
95 | * | ||
96 | * (10/05/2000) gkh | ||
97 | * Fixed bug with urb->dev not being set properly, now that the usb | ||
98 | * core needs it. | ||
99 | * | ||
100 | * (09/11/2000) gkh | ||
101 | * Got rid of always calling kmalloc for every urb we wrote out to the | ||
102 | * device. | ||
103 | * Added visor_read_callback so we can keep track of bytes in and out for | ||
104 | * those people who like to know the speed of their device. | ||
105 | * Removed DEBUG #ifdefs with call to usb_serial_debug_data | ||
106 | * | ||
107 | * (09/06/2000) gkh | ||
108 | * Fixed oops in visor_exit. Need to uncomment usb_unlink_urb call _after_ | ||
109 | * the host controller drivers set urb->dev = NULL when the urb is finished. | ||
110 | * | ||
111 | * (08/28/2000) gkh | ||
112 | * Added locks for SMP safeness. | ||
113 | * | ||
114 | * (08/08/2000) gkh | ||
115 | * Fixed endian problem in visor_startup. | ||
116 | * Fixed MOD_INC and MOD_DEC logic and the ability to open a port more | ||
117 | * than once. | ||
118 | * | ||
119 | * (07/23/2000) gkh | ||
120 | * Added pool of write urbs to speed up transfers to the visor. | ||
121 | * | ||
122 | * (07/19/2000) gkh | ||
123 | * Added module_init and module_exit functions to handle the fact that this | ||
124 | * driver is a loadable module now. | ||
125 | * | ||
126 | * (07/03/2000) gkh | ||
127 | * Added visor_set_ioctl and visor_set_termios functions (they don't do much | ||
128 | * of anything, but are good for debugging.) | ||
129 | * | ||
130 | * (06/25/2000) gkh | ||
131 | * Fixed bug in visor_unthrottle that should help with the disconnect in PPP | ||
132 | * bug that people have been reporting. | ||
133 | * | ||
134 | * (06/23/2000) gkh | ||
135 | * Cleaned up debugging statements in a quest to find UHCI timeout bug. | ||
136 | * | ||
137 | * (04/27/2000) Ryan VanderBijl | ||
138 | * Fixed memory leak in visor_close | ||
139 | * | ||
140 | * (03/26/2000) gkh | ||
141 | * Split driver up into device specific pieces. | ||
142 | * | ||
143 | */ | 14 | */ |
144 | 15 | ||
145 | #include <linux/config.h> | 16 | #include <linux/config.h> |
@@ -161,7 +32,6 @@ | |||
161 | /* | 32 | /* |
162 | * Version Information | 33 | * Version Information |
163 | */ | 34 | */ |
164 | #define DRIVER_VERSION "v2.1" | ||
165 | #define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>" | 35 | #define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>" |
166 | #define DRIVER_DESC "USB HandSpring Visor / Palm OS driver" | 36 | #define DRIVER_DESC "USB HandSpring Visor / Palm OS driver" |
167 | 37 | ||
@@ -311,10 +181,12 @@ static struct usb_driver visor_driver = { | |||
311 | }; | 181 | }; |
312 | 182 | ||
313 | /* All of the device info needed for the Handspring Visor, and Palm 4.0 devices */ | 183 | /* All of the device info needed for the Handspring Visor, and Palm 4.0 devices */ |
314 | static struct usb_serial_device_type handspring_device = { | 184 | static struct usb_serial_driver handspring_device = { |
315 | .owner = THIS_MODULE, | 185 | .driver = { |
316 | .name = "Handspring Visor / Palm OS", | 186 | .owner = THIS_MODULE, |
317 | .short_name = "visor", | 187 | .name = "visor", |
188 | }, | ||
189 | .description = "Handspring Visor / Palm OS", | ||
318 | .id_table = id_table, | 190 | .id_table = id_table, |
319 | .num_interrupt_in = NUM_DONT_CARE, | 191 | .num_interrupt_in = NUM_DONT_CARE, |
320 | .num_bulk_in = 2, | 192 | .num_bulk_in = 2, |
@@ -339,10 +211,12 @@ static struct usb_serial_device_type handspring_device = { | |||
339 | }; | 211 | }; |
340 | 212 | ||
341 | /* All of the device info needed for the Clie UX50, TH55 Palm 5.0 devices */ | 213 | /* All of the device info needed for the Clie UX50, TH55 Palm 5.0 devices */ |
342 | static struct usb_serial_device_type clie_5_device = { | 214 | static struct usb_serial_driver clie_5_device = { |
343 | .owner = THIS_MODULE, | 215 | .driver = { |
344 | .name = "Sony Clie 5.0", | 216 | .owner = THIS_MODULE, |
345 | .short_name = "clie_5", | 217 | .name = "clie_5", |
218 | }, | ||
219 | .description = "Sony Clie 5.0", | ||
346 | .id_table = clie_id_5_table, | 220 | .id_table = clie_id_5_table, |
347 | .num_interrupt_in = NUM_DONT_CARE, | 221 | .num_interrupt_in = NUM_DONT_CARE, |
348 | .num_bulk_in = 2, | 222 | .num_bulk_in = 2, |
@@ -367,10 +241,12 @@ static struct usb_serial_device_type clie_5_device = { | |||
367 | }; | 241 | }; |
368 | 242 | ||
369 | /* device info for the Sony Clie OS version 3.5 */ | 243 | /* device info for the Sony Clie OS version 3.5 */ |
370 | static struct usb_serial_device_type clie_3_5_device = { | 244 | static struct usb_serial_driver clie_3_5_device = { |
371 | .owner = THIS_MODULE, | 245 | .driver = { |
372 | .name = "Sony Clie 3.5", | 246 | .owner = THIS_MODULE, |
373 | .short_name = "clie_3.5", | 247 | .name = "clie_3.5", |
248 | }, | ||
249 | .description = "Sony Clie 3.5", | ||
374 | .id_table = clie_id_3_5_table, | 250 | .id_table = clie_id_3_5_table, |
375 | .num_interrupt_in = 0, | 251 | .num_interrupt_in = 0, |
376 | .num_bulk_in = 1, | 252 | .num_bulk_in = 1, |
@@ -782,7 +658,7 @@ static int palm_os_3_probe (struct usb_serial *serial, const struct usb_device_i | |||
782 | break; | 658 | break; |
783 | } | 659 | } |
784 | dev_info(dev, "%s: port %d, is for %s use\n", | 660 | dev_info(dev, "%s: port %d, is for %s use\n", |
785 | serial->type->name, | 661 | serial->type->description, |
786 | connection_info->connections[i].port, string); | 662 | connection_info->connections[i].port, string); |
787 | } | 663 | } |
788 | } | 664 | } |
@@ -791,11 +667,11 @@ static int palm_os_3_probe (struct usb_serial *serial, const struct usb_device_i | |||
791 | */ | 667 | */ |
792 | if (num_ports == 0 || num_ports > 2) { | 668 | if (num_ports == 0 || num_ports > 2) { |
793 | dev_warn (dev, "%s: No valid connect info available\n", | 669 | dev_warn (dev, "%s: No valid connect info available\n", |
794 | serial->type->name); | 670 | serial->type->description); |
795 | num_ports = 2; | 671 | num_ports = 2; |
796 | } | 672 | } |
797 | 673 | ||
798 | dev_info(dev, "%s: Number of ports: %d\n", serial->type->name, | 674 | dev_info(dev, "%s: Number of ports: %d\n", serial->type->description, |
799 | num_ports); | 675 | num_ports); |
800 | 676 | ||
801 | /* | 677 | /* |
@@ -1125,7 +1001,7 @@ static int __init visor_init (void) | |||
1125 | retval = usb_register(&visor_driver); | 1001 | retval = usb_register(&visor_driver); |
1126 | if (retval) | 1002 | if (retval) |
1127 | goto failed_usb_register; | 1003 | goto failed_usb_register; |
1128 | info(DRIVER_DESC " " DRIVER_VERSION); | 1004 | info(DRIVER_DESC); |
1129 | 1005 | ||
1130 | return 0; | 1006 | return 0; |
1131 | failed_usb_register: | 1007 | failed_usb_register: |
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c index cf3bc30675a1..18c3183be769 100644 --- a/drivers/usb/serial/whiteheat.c +++ b/drivers/usb/serial/whiteheat.c | |||
@@ -156,10 +156,12 @@ static void whiteheat_unthrottle (struct usb_serial_port *port); | |||
156 | static void whiteheat_read_callback (struct urb *urb, struct pt_regs *regs); | 156 | static void whiteheat_read_callback (struct urb *urb, struct pt_regs *regs); |
157 | static void whiteheat_write_callback (struct urb *urb, struct pt_regs *regs); | 157 | static void whiteheat_write_callback (struct urb *urb, struct pt_regs *regs); |
158 | 158 | ||
159 | static struct usb_serial_device_type whiteheat_fake_device = { | 159 | static struct usb_serial_driver whiteheat_fake_device = { |
160 | .owner = THIS_MODULE, | 160 | .driver = { |
161 | .name = "Connect Tech - WhiteHEAT - (prerenumeration)", | 161 | .owner = THIS_MODULE, |
162 | .short_name = "whiteheatnofirm", | 162 | .name = "whiteheatnofirm", |
163 | }, | ||
164 | .description = "Connect Tech - WhiteHEAT - (prerenumeration)", | ||
163 | .id_table = id_table_prerenumeration, | 165 | .id_table = id_table_prerenumeration, |
164 | .num_interrupt_in = NUM_DONT_CARE, | 166 | .num_interrupt_in = NUM_DONT_CARE, |
165 | .num_bulk_in = NUM_DONT_CARE, | 167 | .num_bulk_in = NUM_DONT_CARE, |
@@ -169,10 +171,12 @@ static struct usb_serial_device_type whiteheat_fake_device = { | |||
169 | .attach = whiteheat_firmware_attach, | 171 | .attach = whiteheat_firmware_attach, |
170 | }; | 172 | }; |
171 | 173 | ||
172 | static struct usb_serial_device_type whiteheat_device = { | 174 | static struct usb_serial_driver whiteheat_device = { |
173 | .owner = THIS_MODULE, | 175 | .driver = { |
174 | .name = "Connect Tech - WhiteHEAT", | 176 | .owner = THIS_MODULE, |
175 | .short_name = "whiteheat", | 177 | .name = "whiteheat", |
178 | }, | ||
179 | .description = "Connect Tech - WhiteHEAT", | ||
176 | .id_table = id_table_std, | 180 | .id_table = id_table_std, |
177 | .num_interrupt_in = NUM_DONT_CARE, | 181 | .num_interrupt_in = NUM_DONT_CARE, |
178 | .num_bulk_in = NUM_DONT_CARE, | 182 | .num_bulk_in = NUM_DONT_CARE, |
@@ -382,10 +386,10 @@ static int whiteheat_attach (struct usb_serial *serial) | |||
382 | usb_clear_halt(serial->dev, pipe); | 386 | usb_clear_halt(serial->dev, pipe); |
383 | ret = usb_bulk_msg (serial->dev, pipe, command, 2, &alen, COMMAND_TIMEOUT_MS); | 387 | ret = usb_bulk_msg (serial->dev, pipe, command, 2, &alen, COMMAND_TIMEOUT_MS); |
384 | if (ret) { | 388 | if (ret) { |
385 | err("%s: Couldn't send command [%d]", serial->type->name, ret); | 389 | err("%s: Couldn't send command [%d]", serial->type->description, ret); |
386 | goto no_firmware; | 390 | goto no_firmware; |
387 | } else if (alen != sizeof(command)) { | 391 | } else if (alen != sizeof(command)) { |
388 | err("%s: Send command incomplete [%d]", serial->type->name, alen); | 392 | err("%s: Send command incomplete [%d]", serial->type->description, alen); |
389 | goto no_firmware; | 393 | goto no_firmware; |
390 | } | 394 | } |
391 | 395 | ||
@@ -394,19 +398,19 @@ static int whiteheat_attach (struct usb_serial *serial) | |||
394 | usb_clear_halt(serial->dev, pipe); | 398 | usb_clear_halt(serial->dev, pipe); |
395 | ret = usb_bulk_msg (serial->dev, pipe, result, sizeof(*hw_info) + 1, &alen, COMMAND_TIMEOUT_MS); | 399 | ret = usb_bulk_msg (serial->dev, pipe, result, sizeof(*hw_info) + 1, &alen, COMMAND_TIMEOUT_MS); |
396 | if (ret) { | 400 | if (ret) { |
397 | err("%s: Couldn't get results [%d]", serial->type->name, ret); | 401 | err("%s: Couldn't get results [%d]", serial->type->description, ret); |
398 | goto no_firmware; | 402 | goto no_firmware; |
399 | } else if (alen != sizeof(result)) { | 403 | } else if (alen != sizeof(result)) { |
400 | err("%s: Get results incomplete [%d]", serial->type->name, alen); | 404 | err("%s: Get results incomplete [%d]", serial->type->description, alen); |
401 | goto no_firmware; | 405 | goto no_firmware; |
402 | } else if (result[0] != command[0]) { | 406 | } else if (result[0] != command[0]) { |
403 | err("%s: Command failed [%d]", serial->type->name, result[0]); | 407 | err("%s: Command failed [%d]", serial->type->description, result[0]); |
404 | goto no_firmware; | 408 | goto no_firmware; |
405 | } | 409 | } |
406 | 410 | ||
407 | hw_info = (struct whiteheat_hw_info *)&result[1]; | 411 | hw_info = (struct whiteheat_hw_info *)&result[1]; |
408 | 412 | ||
409 | info("%s: Driver %s: Firmware v%d.%02d", serial->type->name, | 413 | info("%s: Driver %s: Firmware v%d.%02d", serial->type->description, |
410 | DRIVER_VERSION, hw_info->sw_major_rev, hw_info->sw_minor_rev); | 414 | DRIVER_VERSION, hw_info->sw_major_rev, hw_info->sw_minor_rev); |
411 | 415 | ||
412 | for (i = 0; i < serial->num_ports; i++) { | 416 | for (i = 0; i < serial->num_ports; i++) { |
@@ -414,7 +418,7 @@ static int whiteheat_attach (struct usb_serial *serial) | |||
414 | 418 | ||
415 | info = (struct whiteheat_private *)kmalloc(sizeof(struct whiteheat_private), GFP_KERNEL); | 419 | info = (struct whiteheat_private *)kmalloc(sizeof(struct whiteheat_private), GFP_KERNEL); |
416 | if (info == NULL) { | 420 | if (info == NULL) { |
417 | err("%s: Out of memory for port structures\n", serial->type->name); | 421 | err("%s: Out of memory for port structures\n", serial->type->description); |
418 | goto no_private; | 422 | goto no_private; |
419 | } | 423 | } |
420 | 424 | ||
@@ -484,7 +488,7 @@ static int whiteheat_attach (struct usb_serial *serial) | |||
484 | 488 | ||
485 | command_info = (struct whiteheat_command_private *)kmalloc(sizeof(struct whiteheat_command_private), GFP_KERNEL); | 489 | command_info = (struct whiteheat_command_private *)kmalloc(sizeof(struct whiteheat_command_private), GFP_KERNEL); |
486 | if (command_info == NULL) { | 490 | if (command_info == NULL) { |
487 | err("%s: Out of memory for port structures\n", serial->type->name); | 491 | err("%s: Out of memory for port structures\n", serial->type->description); |
488 | goto no_command_private; | 492 | goto no_command_private; |
489 | } | 493 | } |
490 | 494 | ||
@@ -501,9 +505,9 @@ static int whiteheat_attach (struct usb_serial *serial) | |||
501 | 505 | ||
502 | no_firmware: | 506 | no_firmware: |
503 | /* Firmware likely not running */ | 507 | /* Firmware likely not running */ |
504 | err("%s: Unable to retrieve firmware version, try replugging\n", serial->type->name); | 508 | err("%s: Unable to retrieve firmware version, try replugging\n", serial->type->description); |
505 | err("%s: If the firmware is not running (status led not blinking)\n", serial->type->name); | 509 | err("%s: If the firmware is not running (status led not blinking)\n", serial->type->description); |
506 | err("%s: please contact support@connecttech.com\n", serial->type->name); | 510 | err("%s: please contact support@connecttech.com\n", serial->type->description); |
507 | return -ENODEV; | 511 | return -ENODEV; |
508 | 512 | ||
509 | no_command_private: | 513 | no_command_private: |