aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/airprime.c1
-rw-r--r--drivers/usb/serial/belkin_sa.c4
-rw-r--r--drivers/usb/serial/ftdi_sio.c2
-rw-r--r--drivers/usb/serial/ftdi_sio.h3
-rw-r--r--drivers/usb/serial/garmin_gps.c93
-rw-r--r--drivers/usb/serial/ipaq.c1
-rw-r--r--drivers/usb/serial/option.c10
-rw-r--r--drivers/usb/serial/oti6858.c10
-rw-r--r--drivers/usb/serial/safe_serial.c6
-rw-r--r--drivers/usb/serial/visor.c2
-rw-r--r--drivers/usb/serial/visor.h3
11 files changed, 76 insertions, 59 deletions
diff --git a/drivers/usb/serial/airprime.c b/drivers/usb/serial/airprime.c
index cff6fd190a28..77bb893bf2e9 100644
--- a/drivers/usb/serial/airprime.c
+++ b/drivers/usb/serial/airprime.c
@@ -18,7 +18,6 @@
18 18
19static struct usb_device_id id_table [] = { 19static struct usb_device_id id_table [] = {
20 { USB_DEVICE(0x0c88, 0x17da) }, /* Kyocera Wireless KPC650/Passport */ 20 { USB_DEVICE(0x0c88, 0x17da) }, /* Kyocera Wireless KPC650/Passport */
21 { USB_DEVICE(0x413c, 0x8115) }, /* Dell Wireless HSDPA 5500 */
22 { }, 21 { },
23}; 22};
24MODULE_DEVICE_TABLE(usb, id_table); 23MODULE_DEVICE_TABLE(usb, id_table);
diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c
index e67ce25f7512..86724e885704 100644
--- a/drivers/usb/serial/belkin_sa.c
+++ b/drivers/usb/serial/belkin_sa.c
@@ -383,6 +383,10 @@ static void belkin_sa_set_termios (struct usb_serial_port *port, struct ktermios
383 } 383 }
384 384
385 baud = tty_get_baud_rate(port->tty); 385 baud = tty_get_baud_rate(port->tty);
386 if (baud == 0) {
387 dbg("%s - tty_get_baud_rate says 0 baud", __FUNCTION__);
388 return;
389 }
386 urb_value = BELKIN_SA_BAUD(baud); 390 urb_value = BELKIN_SA_BAUD(baud);
387 /* Clip to maximum speed */ 391 /* Clip to maximum speed */
388 if (urb_value == 0) 392 if (urb_value == 0)
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 7b1673a44077..1370c423d7c2 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -538,6 +538,8 @@ static struct usb_device_id id_table_combined [] = {
538 { USB_DEVICE(FTDI_VID, FTDI_TERATRONIK_VCP_PID) }, 538 { USB_DEVICE(FTDI_VID, FTDI_TERATRONIK_VCP_PID) },
539 { USB_DEVICE(FTDI_VID, FTDI_TERATRONIK_D2XX_PID) }, 539 { USB_DEVICE(FTDI_VID, FTDI_TERATRONIK_D2XX_PID) },
540 { USB_DEVICE(EVOLUTION_VID, EVOLUTION_ER1_PID) }, 540 { USB_DEVICE(EVOLUTION_VID, EVOLUTION_ER1_PID) },
541 { USB_DEVICE(EVOLUTION_VID, EVO_HYBRID_PID) },
542 { USB_DEVICE(EVOLUTION_VID, EVO_RCM4_PID) },
541 { USB_DEVICE(FTDI_VID, FTDI_ARTEMIS_PID) }, 543 { USB_DEVICE(FTDI_VID, FTDI_ARTEMIS_PID) },
542 { USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16_PID) }, 544 { USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16_PID) },
543 { USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16C_PID) }, 545 { USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16C_PID) },
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h
index d9e49716db13..c70e1de6389e 100644
--- a/drivers/usb/serial/ftdi_sio.h
+++ b/drivers/usb/serial/ftdi_sio.h
@@ -430,6 +430,9 @@
430 */ 430 */
431#define EVOLUTION_VID 0xDEEE /* Vendor ID */ 431#define EVOLUTION_VID 0xDEEE /* Vendor ID */
432#define EVOLUTION_ER1_PID 0x0300 /* ER1 Control Module */ 432#define EVOLUTION_ER1_PID 0x0300 /* ER1 Control Module */
433#define EVO_8U232AM_PID 0x02FF /* Evolution robotics RCM2 (FT232AM)*/
434#define EVO_HYBRID_PID 0x0302 /* Evolution robotics RCM4 PID (FT232BM)*/
435#define EVO_RCM4_PID 0x0303 /* Evolution robotics RCM4 PID */
433 436
434/* Pyramid Computer GmbH */ 437/* Pyramid Computer GmbH */
435#define FTDI_PYRAMID_PID 0xE6C8 /* Pyramid Appliance Display */ 438#define FTDI_PYRAMID_PID 0xE6C8 /* Pyramid Appliance Display */
diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c
index 04bd3b7a2985..f1c90cfe7251 100644
--- a/drivers/usb/serial/garmin_gps.c
+++ b/drivers/usb/serial/garmin_gps.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Garmin GPS driver 2 * Garmin GPS driver
3 * 3 *
4 * Copyright (C) 2006 Hermann Kneissel herkne@users.sourceforge.net 4 * Copyright (C) 2006,2007 Hermann Kneissel herkne@users.sourceforge.net
5 * 5 *
6 * The latest version of the driver can be found at 6 * The latest version of the driver can be found at
7 * http://sourceforge.net/projects/garmin-gps/ 7 * http://sourceforge.net/projects/garmin-gps/
@@ -34,6 +34,7 @@
34#include <linux/module.h> 34#include <linux/module.h>
35#include <linux/spinlock.h> 35#include <linux/spinlock.h>
36#include <asm/uaccess.h> 36#include <asm/uaccess.h>
37#include <asm/atomic.h>
37#include <linux/usb.h> 38#include <linux/usb.h>
38#include <linux/usb/serial.h> 39#include <linux/usb/serial.h>
39 40
@@ -52,7 +53,7 @@ static int debug = 0;
52 */ 53 */
53 54
54#define VERSION_MAJOR 0 55#define VERSION_MAJOR 0
55#define VERSION_MINOR 28 56#define VERSION_MINOR 31
56 57
57#define _STR(s) #s 58#define _STR(s) #s
58#define _DRIVER_VERSION(a,b) "v" _STR(a) "." _STR(b) 59#define _DRIVER_VERSION(a,b) "v" _STR(a) "." _STR(b)
@@ -141,6 +142,8 @@ struct garmin_data {
141 __u8 inbuffer [GPS_IN_BUFSIZ]; /* tty -> usb */ 142 __u8 inbuffer [GPS_IN_BUFSIZ]; /* tty -> usb */
142 __u8 outbuffer[GPS_OUT_BUFSIZ]; /* usb -> tty */ 143 __u8 outbuffer[GPS_OUT_BUFSIZ]; /* usb -> tty */
143 __u8 privpkt[4*6]; 144 __u8 privpkt[4*6];
145 atomic_t req_count;
146 atomic_t resp_count;
144 spinlock_t lock; 147 spinlock_t lock;
145 struct list_head pktlist; 148 struct list_head pktlist;
146}; 149};
@@ -171,8 +174,6 @@ struct garmin_data {
171#define CLEAR_HALT_REQUIRED 0x0001 174#define CLEAR_HALT_REQUIRED 0x0001
172 175
173#define FLAGS_QUEUING 0x0100 176#define FLAGS_QUEUING 0x0100
174#define FLAGS_APP_RESP_SEEN 0x0200
175#define FLAGS_APP_REQ_SEEN 0x0400
176#define FLAGS_DROP_DATA 0x0800 177#define FLAGS_DROP_DATA 0x0800
177 178
178#define FLAGS_GSP_SKIP 0x1000 179#define FLAGS_GSP_SKIP 0x1000
@@ -186,7 +187,8 @@ struct garmin_data {
186/* function prototypes */ 187/* function prototypes */
187static void gsp_next_packet(struct garmin_data * garmin_data_p); 188static void gsp_next_packet(struct garmin_data * garmin_data_p);
188static int garmin_write_bulk(struct usb_serial_port *port, 189static int garmin_write_bulk(struct usb_serial_port *port,
189 const unsigned char *buf, int count); 190 const unsigned char *buf, int count,
191 int dismiss_ack);
190 192
191/* some special packets to be send or received */ 193/* some special packets to be send or received */
192static unsigned char const GARMIN_START_SESSION_REQ[] 194static unsigned char const GARMIN_START_SESSION_REQ[]
@@ -233,9 +235,7 @@ static struct usb_driver garmin_driver = {
233 235
234static inline int noResponseFromAppLayer(struct garmin_data * garmin_data_p) 236static inline int noResponseFromAppLayer(struct garmin_data * garmin_data_p)
235{ 237{
236 return ((garmin_data_p->flags 238 return atomic_read(&garmin_data_p->req_count) == atomic_read(&garmin_data_p->resp_count);
237 & (FLAGS_APP_REQ_SEEN|FLAGS_APP_RESP_SEEN))
238 == FLAGS_APP_REQ_SEEN);
239} 239}
240 240
241 241
@@ -463,7 +463,7 @@ static int gsp_rec_packet(struct garmin_data * garmin_data_p, int count)
463 usbdata[2] = __cpu_to_le32(size); 463 usbdata[2] = __cpu_to_le32(size);
464 464
465 garmin_write_bulk (garmin_data_p->port, garmin_data_p->inbuffer, 465 garmin_write_bulk (garmin_data_p->port, garmin_data_p->inbuffer,
466 GARMIN_PKTHDR_LENGTH+size); 466 GARMIN_PKTHDR_LENGTH+size, 0);
467 467
468 /* if this was an abort-transfer command, flush all 468 /* if this was an abort-transfer command, flush all
469 queued data. */ 469 queued data. */
@@ -818,7 +818,7 @@ static int nat_receive(struct garmin_data * garmin_data_p,
818 if (garmin_data_p->insize >= len) { 818 if (garmin_data_p->insize >= len) {
819 garmin_write_bulk (garmin_data_p->port, 819 garmin_write_bulk (garmin_data_p->port,
820 garmin_data_p->inbuffer, 820 garmin_data_p->inbuffer,
821 len); 821 len, 0);
822 garmin_data_p->insize = 0; 822 garmin_data_p->insize = 0;
823 823
824 /* if this was an abort-transfer command, 824 /* if this was an abort-transfer command,
@@ -893,10 +893,11 @@ static int garmin_clear(struct garmin_data * garmin_data_p)
893 893
894 struct usb_serial_port *port = garmin_data_p->port; 894 struct usb_serial_port *port = garmin_data_p->port;
895 895
896 if (port != NULL && garmin_data_p->flags & FLAGS_APP_RESP_SEEN) { 896 if (port != NULL && atomic_read(&garmin_data_p->resp_count)) {
897 /* send a terminate command */ 897 /* send a terminate command */
898 status = garmin_write_bulk(port, GARMIN_STOP_TRANSFER_REQ, 898 status = garmin_write_bulk(port, GARMIN_STOP_TRANSFER_REQ,
899 sizeof(GARMIN_STOP_TRANSFER_REQ)); 899 sizeof(GARMIN_STOP_TRANSFER_REQ),
900 1);
900 } 901 }
901 902
902 /* flush all queued data */ 903 /* flush all queued data */
@@ -939,7 +940,8 @@ static int garmin_init_session(struct usb_serial_port *port)
939 dbg("%s - starting session ...", __FUNCTION__); 940 dbg("%s - starting session ...", __FUNCTION__);
940 garmin_data_p->state = STATE_ACTIVE; 941 garmin_data_p->state = STATE_ACTIVE;
941 status = garmin_write_bulk(port, GARMIN_START_SESSION_REQ, 942 status = garmin_write_bulk(port, GARMIN_START_SESSION_REQ,
942 sizeof(GARMIN_START_SESSION_REQ)); 943 sizeof(GARMIN_START_SESSION_REQ),
944 0);
943 945
944 if (status >= 0) { 946 if (status >= 0) {
945 947
@@ -950,7 +952,8 @@ static int garmin_init_session(struct usb_serial_port *port)
950 /* not needed, but the win32 driver does it too ... */ 952 /* not needed, but the win32 driver does it too ... */
951 status = garmin_write_bulk(port, 953 status = garmin_write_bulk(port,
952 GARMIN_START_SESSION_REQ2, 954 GARMIN_START_SESSION_REQ2,
953 sizeof(GARMIN_START_SESSION_REQ2)); 955 sizeof(GARMIN_START_SESSION_REQ2),
956 0);
954 if (status >= 0) { 957 if (status >= 0) {
955 status = 0; 958 status = 0;
956 spin_lock_irqsave(&garmin_data_p->lock, flags); 959 spin_lock_irqsave(&garmin_data_p->lock, flags);
@@ -987,6 +990,8 @@ static int garmin_open (struct usb_serial_port *port, struct file *filp)
987 garmin_data_p->mode = initial_mode; 990 garmin_data_p->mode = initial_mode;
988 garmin_data_p->count = 0; 991 garmin_data_p->count = 0;
989 garmin_data_p->flags = 0; 992 garmin_data_p->flags = 0;
993 atomic_set(&garmin_data_p->req_count, 0);
994 atomic_set(&garmin_data_p->resp_count, 0);
990 spin_unlock_irqrestore(&garmin_data_p->lock, flags); 995 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
991 996
992 /* shutdown any bulk reads that might be going on */ 997 /* shutdown any bulk reads that might be going on */
@@ -1035,28 +1040,39 @@ static void garmin_write_bulk_callback (struct urb *urb)
1035{ 1040{
1036 unsigned long flags; 1041 unsigned long flags;
1037 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 1042 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
1038 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
1039 int status = urb->status; 1043 int status = urb->status;
1040 1044
1041 /* free up the transfer buffer, as usb_free_urb() does not do this */ 1045 if (port) {
1042 kfree (urb->transfer_buffer); 1046 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
1043 1047
1044 dbg("%s - port %d", __FUNCTION__, port->number); 1048 dbg("%s - port %d", __FUNCTION__, port->number);
1045 1049
1046 if (status) { 1050 if (GARMIN_LAYERID_APPL == getLayerId(urb->transfer_buffer)
1047 dbg("%s - nonzero write bulk status received: %d", 1051 && (garmin_data_p->mode == MODE_GARMIN_SERIAL)) {
1048 __FUNCTION__, status); 1052 gsp_send_ack(garmin_data_p, ((__u8 *)urb->transfer_buffer)[4]);
1049 spin_lock_irqsave(&garmin_data_p->lock, flags); 1053 }
1050 garmin_data_p->flags |= CLEAR_HALT_REQUIRED; 1054
1051 spin_unlock_irqrestore(&garmin_data_p->lock, flags); 1055 if (status) {
1056 dbg("%s - nonzero write bulk status received: %d",
1057 __FUNCTION__, urb->status);
1058 spin_lock_irqsave(&garmin_data_p->lock, flags);
1059 garmin_data_p->flags |= CLEAR_HALT_REQUIRED;
1060 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
1061 }
1062
1063 usb_serial_port_softint(port);
1052 } 1064 }
1053 1065
1054 usb_serial_port_softint(port); 1066 /* Ignore errors that resulted from garmin_write_bulk with dismiss_ack=1 */
1067
1068 /* free up the transfer buffer, as usb_free_urb() does not do this */
1069 kfree (urb->transfer_buffer);
1055} 1070}
1056 1071
1057 1072
1058static int garmin_write_bulk (struct usb_serial_port *port, 1073static int garmin_write_bulk (struct usb_serial_port *port,
1059 const unsigned char *buf, int count) 1074 const unsigned char *buf, int count,
1075 int dismiss_ack)
1060{ 1076{
1061 unsigned long flags; 1077 unsigned long flags;
1062 struct usb_serial *serial = port->serial; 1078 struct usb_serial *serial = port->serial;
@@ -1093,13 +1109,12 @@ static int garmin_write_bulk (struct usb_serial_port *port,
1093 usb_sndbulkpipe (serial->dev, 1109 usb_sndbulkpipe (serial->dev,
1094 port->bulk_out_endpointAddress), 1110 port->bulk_out_endpointAddress),
1095 buffer, count, 1111 buffer, count,
1096 garmin_write_bulk_callback, port); 1112 garmin_write_bulk_callback,
1113 dismiss_ack ? NULL : port);
1097 urb->transfer_flags |= URB_ZERO_PACKET; 1114 urb->transfer_flags |= URB_ZERO_PACKET;
1098 1115
1099 if (GARMIN_LAYERID_APPL == getLayerId(buffer)) { 1116 if (GARMIN_LAYERID_APPL == getLayerId(buffer)) {
1100 spin_lock_irqsave(&garmin_data_p->lock, flags); 1117 atomic_inc(&garmin_data_p->req_count);
1101 garmin_data_p->flags |= FLAGS_APP_REQ_SEEN;
1102 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
1103 if (garmin_data_p->mode == MODE_GARMIN_SERIAL) { 1118 if (garmin_data_p->mode == MODE_GARMIN_SERIAL) {
1104 pkt_clear(garmin_data_p); 1119 pkt_clear(garmin_data_p);
1105 garmin_data_p->state = STATE_GSP_WAIT_DATA; 1120 garmin_data_p->state = STATE_GSP_WAIT_DATA;
@@ -1114,13 +1129,6 @@ static int garmin_write_bulk (struct usb_serial_port *port,
1114 "failed with status = %d\n", 1129 "failed with status = %d\n",
1115 __FUNCTION__, status); 1130 __FUNCTION__, status);
1116 count = status; 1131 count = status;
1117 } else {
1118
1119 if (GARMIN_LAYERID_APPL == getLayerId(buffer)
1120 && (garmin_data_p->mode == MODE_GARMIN_SERIAL)) {
1121
1122 gsp_send_ack(garmin_data_p, buffer[4]);
1123 }
1124 } 1132 }
1125 1133
1126 /* we are done with this urb, so let the host driver 1134 /* we are done with this urb, so let the host driver
@@ -1135,7 +1143,6 @@ static int garmin_write_bulk (struct usb_serial_port *port,
1135static int garmin_write (struct usb_serial_port *port, 1143static int garmin_write (struct usb_serial_port *port,
1136 const unsigned char *buf, int count) 1144 const unsigned char *buf, int count)
1137{ 1145{
1138 unsigned long flags;
1139 int pktid, pktsiz, len; 1146 int pktid, pktsiz, len;
1140 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port); 1147 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
1141 __le32 *privpkt = (__le32 *)garmin_data_p->privpkt; 1148 __le32 *privpkt = (__le32 *)garmin_data_p->privpkt;
@@ -1186,9 +1193,7 @@ static int garmin_write (struct usb_serial_port *port,
1186 break; 1193 break;
1187 1194
1188 case PRIV_PKTID_RESET_REQ: 1195 case PRIV_PKTID_RESET_REQ:
1189 spin_lock_irqsave(&garmin_data_p->lock, flags); 1196 atomic_inc(&garmin_data_p->req_count);
1190 garmin_data_p->flags |= FLAGS_APP_REQ_SEEN;
1191 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
1192 break; 1197 break;
1193 1198
1194 case PRIV_PKTID_SET_DEF_MODE: 1199 case PRIV_PKTID_SET_DEF_MODE:
@@ -1241,8 +1246,6 @@ static int garmin_chars_in_buffer (struct usb_serial_port *port)
1241static void garmin_read_process(struct garmin_data * garmin_data_p, 1246static void garmin_read_process(struct garmin_data * garmin_data_p,
1242 unsigned char *data, unsigned data_length) 1247 unsigned char *data, unsigned data_length)
1243{ 1248{
1244 unsigned long flags;
1245
1246 if (garmin_data_p->flags & FLAGS_DROP_DATA) { 1249 if (garmin_data_p->flags & FLAGS_DROP_DATA) {
1247 /* abort-transfer cmd is actice */ 1250 /* abort-transfer cmd is actice */
1248 dbg("%s - pkt dropped", __FUNCTION__); 1251 dbg("%s - pkt dropped", __FUNCTION__);
@@ -1254,9 +1257,7 @@ static void garmin_read_process(struct garmin_data * garmin_data_p,
1254 the device */ 1257 the device */
1255 if (0 == memcmp(data, GARMIN_APP_LAYER_REPLY, 1258 if (0 == memcmp(data, GARMIN_APP_LAYER_REPLY,
1256 sizeof(GARMIN_APP_LAYER_REPLY))) { 1259 sizeof(GARMIN_APP_LAYER_REPLY))) {
1257 spin_lock_irqsave(&garmin_data_p->lock, flags); 1260 atomic_inc(&garmin_data_p->resp_count);
1258 garmin_data_p->flags |= FLAGS_APP_RESP_SEEN;
1259 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
1260 } 1261 }
1261 1262
1262 /* if throttling is active or postprecessing is required 1263 /* if throttling is active or postprecessing is required
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c
index 0455c1552ae9..6a3a704b5849 100644
--- a/drivers/usb/serial/ipaq.c
+++ b/drivers/usb/serial/ipaq.c
@@ -545,6 +545,7 @@ static struct usb_device_id ipaq_id_table [] = {
545 { USB_DEVICE(0x413C, 0x4009) }, /* Dell Axim USB Sync */ 545 { USB_DEVICE(0x413C, 0x4009) }, /* Dell Axim USB Sync */
546 { USB_DEVICE(0x4505, 0x0010) }, /* Smartphone */ 546 { USB_DEVICE(0x4505, 0x0010) }, /* Smartphone */
547 { USB_DEVICE(0x5E04, 0xCE00) }, /* SAGEM Wireless Assistant */ 547 { USB_DEVICE(0x5E04, 0xCE00) }, /* SAGEM Wireless Assistant */
548 { USB_DEVICE(0x0BB4, 0x00CF) }, /* HTC smartphone modems */
548 { } /* Terminating entry */ 549 { } /* Terminating entry */
549}; 550};
550 551
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 84c12b5f1271..4cb3c165742b 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -110,6 +110,7 @@ static int option_send_setup(struct usb_serial_port *port);
110#define HUAWEI_PRODUCT_E220 0x1003 110#define HUAWEI_PRODUCT_E220 0x1003
111 111
112#define NOVATELWIRELESS_VENDOR_ID 0x1410 112#define NOVATELWIRELESS_VENDOR_ID 0x1410
113#define DELL_VENDOR_ID 0x413C
113 114
114#define ANYDATA_VENDOR_ID 0x16d5 115#define ANYDATA_VENDOR_ID 0x16d5
115#define ANYDATA_PRODUCT_ADU_E100A 0x6501 116#define ANYDATA_PRODUCT_ADU_E100A 0x6501
@@ -119,8 +120,6 @@ static int option_send_setup(struct usb_serial_port *port);
119#define BANDRICH_PRODUCT_C100_1 0x1002 120#define BANDRICH_PRODUCT_C100_1 0x1002
120#define BANDRICH_PRODUCT_C100_2 0x1003 121#define BANDRICH_PRODUCT_C100_2 0x1003
121 122
122#define DELL_VENDOR_ID 0x413C
123
124static struct usb_device_id option_ids[] = { 123static struct usb_device_id option_ids[] = {
125 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, 124 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
126 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, 125 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
@@ -171,11 +170,16 @@ static struct usb_device_id option_ids[] = {
171 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2110) }, /* Novatel Merlin ES620 / Merlin ES720 / Ovation U720 */ 170 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2110) }, /* Novatel Merlin ES620 / Merlin ES720 / Ovation U720 */
172 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2130) }, /* Novatel Merlin ES620 SM Bus */ 171 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2130) }, /* Novatel Merlin ES620 SM Bus */
173 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2410) }, /* Novatel EU740 */ 172 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2410) }, /* Novatel EU740 */
173 { USB_DEVICE(DELL_VENDOR_ID, 0x8114) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite EV620 CDMA/EV-DO */
174 { USB_DEVICE(DELL_VENDOR_ID, 0x8115) }, /* Dell Wireless 5500 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */
175 { USB_DEVICE(DELL_VENDOR_ID, 0x8116) }, /* Dell Wireless 5505 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */
176 { USB_DEVICE(DELL_VENDOR_ID, 0x8117) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO ExpressCard == Novatel Merlin XV620 CDMA/EV-DO */
177 { USB_DEVICE(DELL_VENDOR_ID, 0x8118) }, /* Dell Wireless 5510 Mobile Broadband HSDPA ExpressCard == Novatel Merlin XU870 HSDPA/3G */
178 { USB_DEVICE(DELL_VENDOR_ID, 0x8128) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite E720 CDMA/EV-DO */
174 { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, 179 { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) },
175 { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, 180 { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) },
176 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, 181 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) },
177 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, 182 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) },
178 { USB_DEVICE(DELL_VENDOR_ID, 0x8118) }, /* Dell Wireless 5510 Mobile Broadband HSDPA ExpressCard */
179 { } /* Terminating entry */ 183 { } /* Terminating entry */
180}; 184};
181MODULE_DEVICE_TABLE(usb, option_ids); 185MODULE_DEVICE_TABLE(usb, option_ids);
diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c
index d7db71eca520..833ada47fc54 100644
--- a/drivers/usb/serial/oti6858.c
+++ b/drivers/usb/serial/oti6858.c
@@ -818,19 +818,17 @@ static int oti6858_ioctl(struct usb_serial_port *port, struct file *file,
818 818
819 switch (cmd) { 819 switch (cmd) {
820 case TCGETS: 820 case TCGETS:
821 if (copy_to_user(user_arg, port->tty->termios, 821 if (kernel_termios_to_user_termios((struct ktermios __user *)arg,
822 sizeof(struct ktermios))) { 822 port->tty->termios))
823 return -EFAULT; 823 return -EFAULT;
824 }
825 return 0; 824 return 0;
826 825
827 case TCSETS: 826 case TCSETS:
828 case TCSETSW: /* FIXME: this is not the same! */ 827 case TCSETSW: /* FIXME: this is not the same! */
829 case TCSETSF: /* FIXME: this is not the same! */ 828 case TCSETSF: /* FIXME: this is not the same! */
830 if (copy_from_user(port->tty->termios, user_arg, 829 if (user_termios_to_kernel_termios(port->tty->termios,
831 sizeof(struct ktermios))) { 830 (struct ktermios __user *)arg))
832 return -EFAULT; 831 return -EFAULT;
833 }
834 oti6858_set_termios(port, NULL); 832 oti6858_set_termios(port, NULL);
835 return 0; 833 return 0;
836 834
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c
index 86899d55d8d8..51669b7622bb 100644
--- a/drivers/usb/serial/safe_serial.c
+++ b/drivers/usb/serial/safe_serial.c
@@ -74,13 +74,13 @@
74#include <linux/usb/serial.h> 74#include <linux/usb/serial.h>
75 75
76 76
77#ifndef CONFIG_USB_SAFE_PADDED 77#ifndef CONFIG_USB_SERIAL_SAFE_PADDED
78#define CONFIG_USB_SAFE_PADDED 0 78#define CONFIG_USB_SERIAL_SAFE_PADDED 0
79#endif 79#endif
80 80
81static int debug; 81static int debug;
82static int safe = 1; 82static int safe = 1;
83static int padded = CONFIG_USB_SAFE_PADDED; 83static int padded = CONFIG_USB_SERIAL_SAFE_PADDED;
84 84
85#define DRIVER_VERSION "v0.0b" 85#define DRIVER_VERSION "v0.0b"
86#define DRIVER_AUTHOR "sl@lineo.com, tbr@lineo.com" 86#define DRIVER_AUTHOR "sl@lineo.com, tbr@lineo.com"
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
index 7d84a7647e81..30e08c0bcdc2 100644
--- a/drivers/usb/serial/visor.c
+++ b/drivers/usb/serial/visor.c
@@ -104,6 +104,8 @@ static struct usb_device_id id_table [] = {
104 .driver_info = (kernel_ulong_t)&palm_os_4_probe }, 104 .driver_info = (kernel_ulong_t)&palm_os_4_probe },
105 { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_TJ25_ID), 105 { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_TJ25_ID),
106 .driver_info = (kernel_ulong_t)&palm_os_4_probe }, 106 .driver_info = (kernel_ulong_t)&palm_os_4_probe },
107 { USB_DEVICE(ACER_VENDOR_ID, ACER_S10_ID),
108 .driver_info = (kernel_ulong_t)&palm_os_4_probe },
107 { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_SCH_I330_ID), 109 { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_SCH_I330_ID),
108 .driver_info = (kernel_ulong_t)&palm_os_4_probe }, 110 .driver_info = (kernel_ulong_t)&palm_os_4_probe },
109 { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_SPH_I500_ID), 111 { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_SPH_I500_ID),
diff --git a/drivers/usb/serial/visor.h b/drivers/usb/serial/visor.h
index 4ce6f62a6f39..57229cf66477 100644
--- a/drivers/usb/serial/visor.h
+++ b/drivers/usb/serial/visor.h
@@ -48,6 +48,9 @@
48#define SONY_CLIE_UX50_ID 0x0144 48#define SONY_CLIE_UX50_ID 0x0144
49#define SONY_CLIE_TJ25_ID 0x0169 49#define SONY_CLIE_TJ25_ID 0x0169
50 50
51#define ACER_VENDOR_ID 0x0502
52#define ACER_S10_ID 0x0001
53
51#define SAMSUNG_VENDOR_ID 0x04E8 54#define SAMSUNG_VENDOR_ID 0x04E8
52#define SAMSUNG_SCH_I330_ID 0x8001 55#define SAMSUNG_SCH_I330_ID 0x8001
53#define SAMSUNG_SPH_I500_ID 0x6601 56#define SAMSUNG_SPH_I500_ID 0x6601