diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-12-25 07:51:46 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-25 07:51:46 -0500 |
commit | 0b271ef4521756010675b1611bef20fd3096790d (patch) | |
tree | 2c9d22a2c74122a9904e533df27f41d63ffef394 /drivers/usb/serial | |
parent | b19b3c74c7bbec45a848631b8f970ac110665a01 (diff) | |
parent | 4a6908a3a050aacc9c3a2f36b276b46c0629ad91 (diff) |
Merge commit 'v2.6.28' into core/core
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/console.c | 1 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 4 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio.h | 6 | ||||
-rw-r--r-- | drivers/usb/serial/option.c | 35 | ||||
-rw-r--r-- | drivers/usb/serial/pl2303.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/pl2303.h | 8 | ||||
-rw-r--r-- | drivers/usb/serial/ti_usb_3410_5052.c | 55 |
7 files changed, 58 insertions, 53 deletions
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c index 5b20de130e08..5b95009d2fbb 100644 --- a/drivers/usb/serial/console.c +++ b/drivers/usb/serial/console.c | |||
@@ -135,6 +135,7 @@ static int usb_console_setup(struct console *co, char *options) | |||
135 | err("no more memory"); | 135 | err("no more memory"); |
136 | goto reset_open_count; | 136 | goto reset_open_count; |
137 | } | 137 | } |
138 | kref_init(&tty->kref); | ||
138 | termios = kzalloc(sizeof(*termios), GFP_KERNEL); | 139 | termios = kzalloc(sizeof(*termios), GFP_KERNEL); |
139 | if (!termios) { | 140 | if (!termios) { |
140 | retval = -ENOMEM; | 141 | retval = -ENOMEM; |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 51d7bdea2869..fb6f2933b01b 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -143,6 +143,7 @@ static struct ftdi_sio_quirk ftdi_HE_TIRA1_quirk = { | |||
143 | static struct usb_device_id id_table_combined [] = { | 143 | static struct usb_device_id id_table_combined [] = { |
144 | { USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) }, | 144 | { USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) }, |
145 | { USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) }, | 145 | { USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) }, |
146 | { USB_DEVICE(FTDI_VID, FTDI_CANDAPTER_PID) }, | ||
146 | { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_0_PID) }, | 147 | { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_0_PID) }, |
147 | { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_1_PID) }, | 148 | { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_1_PID) }, |
148 | { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_2_PID) }, | 149 | { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_2_PID) }, |
@@ -166,6 +167,7 @@ static struct usb_device_id id_table_combined [] = { | |||
166 | { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_PID) }, | 167 | { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_PID) }, |
167 | { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) }, | 168 | { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) }, |
168 | { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) }, | 169 | { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) }, |
170 | { USB_DEVICE(FTDI_VID, FTDI_SPROG_II) }, | ||
169 | { USB_DEVICE(FTDI_VID, FTDI_XF_632_PID) }, | 171 | { USB_DEVICE(FTDI_VID, FTDI_XF_632_PID) }, |
170 | { USB_DEVICE(FTDI_VID, FTDI_XF_634_PID) }, | 172 | { USB_DEVICE(FTDI_VID, FTDI_XF_634_PID) }, |
171 | { USB_DEVICE(FTDI_VID, FTDI_XF_547_PID) }, | 173 | { USB_DEVICE(FTDI_VID, FTDI_XF_547_PID) }, |
@@ -1498,7 +1500,7 @@ static int ftdi_open(struct tty_struct *tty, | |||
1498 | priv->interface, buf, 0, WDR_TIMEOUT); | 1500 | priv->interface, buf, 0, WDR_TIMEOUT); |
1499 | 1501 | ||
1500 | /* Termios defaults are set by usb_serial_init. We don't change | 1502 | /* Termios defaults are set by usb_serial_init. We don't change |
1501 | port->tty->termios - this would loose speed settings, etc. | 1503 | port->tty->termios - this would lose speed settings, etc. |
1502 | This is same behaviour as serial.c/rs_open() - Kuba */ | 1504 | This is same behaviour as serial.c/rs_open() - Kuba */ |
1503 | 1505 | ||
1504 | /* ftdi_set_termios will send usb control messages */ | 1506 | /* ftdi_set_termios will send usb control messages */ |
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h index 07a3992abad2..373ee09975bb 100644 --- a/drivers/usb/serial/ftdi_sio.h +++ b/drivers/usb/serial/ftdi_sio.h | |||
@@ -40,6 +40,9 @@ | |||
40 | /* AlphaMicro Components AMC-232USB01 device */ | 40 | /* AlphaMicro Components AMC-232USB01 device */ |
41 | #define FTDI_AMC232_PID 0xFF00 /* Product Id */ | 41 | #define FTDI_AMC232_PID 0xFF00 /* Product Id */ |
42 | 42 | ||
43 | /* www.candapter.com Ewert Energy Systems CANdapter device */ | ||
44 | #define FTDI_CANDAPTER_PID 0x9F80 /* Product Id */ | ||
45 | |||
43 | /* SCS HF Radio Modems PID's (http://www.scs-ptc.com) */ | 46 | /* SCS HF Radio Modems PID's (http://www.scs-ptc.com) */ |
44 | /* the VID is the standard ftdi vid (FTDI_VID) */ | 47 | /* the VID is the standard ftdi vid (FTDI_VID) */ |
45 | #define FTDI_SCS_DEVICE_0_PID 0xD010 /* SCS PTC-IIusb */ | 48 | #define FTDI_SCS_DEVICE_0_PID 0xD010 /* SCS PTC-IIusb */ |
@@ -75,6 +78,9 @@ | |||
75 | /* OpenDCC (www.opendcc.de) product id */ | 78 | /* OpenDCC (www.opendcc.de) product id */ |
76 | #define FTDI_OPENDCC_PID 0xBFD8 | 79 | #define FTDI_OPENDCC_PID 0xBFD8 |
77 | 80 | ||
81 | /* Sprog II (Andrew Crosland's SprogII DCC interface) */ | ||
82 | #define FTDI_SPROG_II 0xF0C8 | ||
83 | |||
78 | /* www.crystalfontz.com devices - thanx for providing free devices for evaluation ! */ | 84 | /* www.crystalfontz.com devices - thanx for providing free devices for evaluation ! */ |
79 | /* they use the ftdi chipset for the USB interface and the vendor id is the same */ | 85 | /* they use the ftdi chipset for the USB interface and the vendor id is the same */ |
80 | #define FTDI_XF_632_PID 0xFC08 /* 632: 16x2 Character Display */ | 86 | #define FTDI_XF_632_PID 0xFC08 /* 632: 16x2 Character Display */ |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 6fa1ec441b61..809697b3c7fc 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -224,6 +224,7 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po | |||
224 | #define ONDA_VENDOR_ID 0x19d2 | 224 | #define ONDA_VENDOR_ID 0x19d2 |
225 | #define ONDA_PRODUCT_MSA501HS 0x0001 | 225 | #define ONDA_PRODUCT_MSA501HS 0x0001 |
226 | #define ONDA_PRODUCT_ET502HS 0x0002 | 226 | #define ONDA_PRODUCT_ET502HS 0x0002 |
227 | #define ONDA_PRODUCT_MT503HS 0x0200 | ||
227 | 228 | ||
228 | #define BANDRICH_VENDOR_ID 0x1A8D | 229 | #define BANDRICH_VENDOR_ID 0x1A8D |
229 | #define BANDRICH_PRODUCT_C100_1 0x1002 | 230 | #define BANDRICH_PRODUCT_C100_1 0x1002 |
@@ -413,6 +414,40 @@ static struct usb_device_id option_ids[] = { | |||
413 | { USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) }, | 414 | { USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) }, |
414 | { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_MSA501HS) }, | 415 | { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_MSA501HS) }, |
415 | { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_ET502HS) }, | 416 | { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_ET502HS) }, |
417 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0003) }, | ||
418 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0004) }, | ||
419 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0005) }, | ||
420 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0006) }, | ||
421 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0007) }, | ||
422 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0008) }, | ||
423 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0009) }, | ||
424 | { USB_DEVICE(ONDA_VENDOR_ID, 0x000a) }, | ||
425 | { USB_DEVICE(ONDA_VENDOR_ID, 0x000b) }, | ||
426 | { USB_DEVICE(ONDA_VENDOR_ID, 0x000c) }, | ||
427 | { USB_DEVICE(ONDA_VENDOR_ID, 0x000d) }, | ||
428 | { USB_DEVICE(ONDA_VENDOR_ID, 0x000e) }, | ||
429 | { USB_DEVICE(ONDA_VENDOR_ID, 0x000f) }, | ||
430 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0010) }, | ||
431 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0011) }, | ||
432 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0012) }, | ||
433 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0013) }, | ||
434 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0014) }, | ||
435 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0015) }, | ||
436 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0016) }, | ||
437 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0017) }, | ||
438 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0018) }, | ||
439 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0019) }, | ||
440 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0020) }, | ||
441 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0021) }, | ||
442 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0022) }, | ||
443 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0023) }, | ||
444 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0024) }, | ||
445 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0025) }, | ||
446 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0026) }, | ||
447 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0027) }, | ||
448 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0028) }, | ||
449 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0029) }, | ||
450 | { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_MT503HS) }, | ||
416 | { USB_DEVICE(YISO_VENDOR_ID, YISO_PRODUCT_U893) }, | 451 | { USB_DEVICE(YISO_VENDOR_ID, YISO_PRODUCT_U893) }, |
417 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, | 452 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, |
418 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, | 453 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, |
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 491c8857b644..1aed584be5eb 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -91,6 +91,8 @@ static struct usb_device_id id_table [] = { | |||
91 | { USB_DEVICE(WS002IN_VENDOR_ID, WS002IN_PRODUCT_ID) }, | 91 | { USB_DEVICE(WS002IN_VENDOR_ID, WS002IN_PRODUCT_ID) }, |
92 | { USB_DEVICE(COREGA_VENDOR_ID, COREGA_PRODUCT_ID) }, | 92 | { USB_DEVICE(COREGA_VENDOR_ID, COREGA_PRODUCT_ID) }, |
93 | { USB_DEVICE(YCCABLE_VENDOR_ID, YCCABLE_PRODUCT_ID) }, | 93 | { USB_DEVICE(YCCABLE_VENDOR_ID, YCCABLE_PRODUCT_ID) }, |
94 | { USB_DEVICE(SUPERIAL_VENDOR_ID, SUPERIAL_PRODUCT_ID) }, | ||
95 | { USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) }, | ||
94 | { } /* Terminating entry */ | 96 | { } /* Terminating entry */ |
95 | }; | 97 | }; |
96 | 98 | ||
diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h index a3bd039c78e9..54974f446a8c 100644 --- a/drivers/usb/serial/pl2303.h +++ b/drivers/usb/serial/pl2303.h | |||
@@ -110,3 +110,11 @@ | |||
110 | /* Y.C. Cable U.S.A., Inc - USB to RS-232 */ | 110 | /* Y.C. Cable U.S.A., Inc - USB to RS-232 */ |
111 | #define YCCABLE_VENDOR_ID 0x05ad | 111 | #define YCCABLE_VENDOR_ID 0x05ad |
112 | #define YCCABLE_PRODUCT_ID 0x0fba | 112 | #define YCCABLE_PRODUCT_ID 0x0fba |
113 | |||
114 | /* "Superial" USB - Serial */ | ||
115 | #define SUPERIAL_VENDOR_ID 0x5372 | ||
116 | #define SUPERIAL_PRODUCT_ID 0x2303 | ||
117 | |||
118 | /* Hewlett-Packard LD220-HP POS Pole Display */ | ||
119 | #define HP_VENDOR_ID 0x03f0 | ||
120 | #define HP_LD220_PRODUCT_ID 0x3524 | ||
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index 31c42d1cae13..01d0c70d60e9 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c | |||
@@ -16,56 +16,6 @@ | |||
16 | * For questions or problems with this driver, contact Texas Instruments | 16 | * For questions or problems with this driver, contact Texas Instruments |
17 | * technical support, or Al Borchers <alborchers@steinerpoint.com>, or | 17 | * technical support, or Al Borchers <alborchers@steinerpoint.com>, or |
18 | * Peter Berger <pberger@brimson.com>. | 18 | * Peter Berger <pberger@brimson.com>. |
19 | * | ||
20 | * This driver needs this hotplug script in /etc/hotplug/usb/ti_usb_3410_5052 | ||
21 | * or in /etc/hotplug.d/usb/ti_usb_3410_5052.hotplug to set the device | ||
22 | * configuration. | ||
23 | * | ||
24 | * #!/bin/bash | ||
25 | * | ||
26 | * BOOT_CONFIG=1 | ||
27 | * ACTIVE_CONFIG=2 | ||
28 | * | ||
29 | * if [[ "$ACTION" != "add" ]] | ||
30 | * then | ||
31 | * exit | ||
32 | * fi | ||
33 | * | ||
34 | * CONFIG_PATH=/sys${DEVPATH%/?*}/bConfigurationValue | ||
35 | * | ||
36 | * if [[ 0`cat $CONFIG_PATH` -ne $BOOT_CONFIG ]] | ||
37 | * then | ||
38 | * exit | ||
39 | * fi | ||
40 | * | ||
41 | * PRODUCT=${PRODUCT%/?*} # delete version | ||
42 | * VENDOR_ID=`printf "%d" 0x${PRODUCT%/?*}` | ||
43 | * PRODUCT_ID=`printf "%d" 0x${PRODUCT#*?/}` | ||
44 | * | ||
45 | * PARAM_PATH=/sys/module/ti_usb_3410_5052/parameters | ||
46 | * | ||
47 | * function scan() { | ||
48 | * s=$1 | ||
49 | * shift | ||
50 | * for i | ||
51 | * do | ||
52 | * if [[ $s -eq $i ]] | ||
53 | * then | ||
54 | * return 0 | ||
55 | * fi | ||
56 | * done | ||
57 | * return 1 | ||
58 | * } | ||
59 | * | ||
60 | * IFS=$IFS, | ||
61 | * | ||
62 | * if (scan $VENDOR_ID 1105 `cat $PARAM_PATH/vendor_3410` && | ||
63 | * scan $PRODUCT_ID 13328 `cat $PARAM_PATH/product_3410`) || | ||
64 | * (scan $VENDOR_ID 1105 `cat $PARAM_PATH/vendor_5052` && | ||
65 | * scan $PRODUCT_ID 20562 20818 20570 20575 `cat $PARAM_PATH/product_5052`) | ||
66 | * then | ||
67 | * echo $ACTIVE_CONFIG > $CONFIG_PATH | ||
68 | * fi | ||
69 | */ | 19 | */ |
70 | 20 | ||
71 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
@@ -457,9 +407,10 @@ static int ti_startup(struct usb_serial *serial) | |||
457 | goto free_tdev; | 407 | goto free_tdev; |
458 | } | 408 | } |
459 | 409 | ||
460 | /* the second configuration must be set (in sysfs by hotplug script) */ | 410 | /* the second configuration must be set */ |
461 | if (dev->actconfig->desc.bConfigurationValue == TI_BOOT_CONFIG) { | 411 | if (dev->actconfig->desc.bConfigurationValue == TI_BOOT_CONFIG) { |
462 | status = -ENODEV; | 412 | status = usb_driver_set_configuration(dev, TI_ACTIVE_CONFIG); |
413 | status = status ? status : -ENODEV; | ||
463 | goto free_tdev; | 414 | goto free_tdev; |
464 | } | 415 | } |
465 | 416 | ||