diff options
Diffstat (limited to 'drivers/usb/serial')
| -rw-r--r-- | drivers/usb/serial/Kconfig | 4 | ||||
| -rw-r--r-- | drivers/usb/serial/aircable.c | 1 | ||||
| -rw-r--r-- | drivers/usb/serial/ark3116.c | 1 | ||||
| -rw-r--r-- | drivers/usb/serial/bus.c | 1 | ||||
| -rw-r--r-- | drivers/usb/serial/ch341.c | 1 | ||||
| -rw-r--r-- | drivers/usb/serial/console.c | 1 | ||||
| -rw-r--r-- | drivers/usb/serial/cp210x.c | 5 | ||||
| -rw-r--r-- | drivers/usb/serial/cypress_m8.c | 2 | ||||
| -rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 7 | ||||
| -rw-r--r-- | drivers/usb/serial/ftdi_sio_ids.h | 7 | ||||
| -rw-r--r-- | drivers/usb/serial/generic.c | 49 | ||||
| -rw-r--r-- | drivers/usb/serial/navman.c | 1 | ||||
| -rw-r--r-- | drivers/usb/serial/opticon.c | 3 | ||||
| -rw-r--r-- | drivers/usb/serial/option.c | 64 | ||||
| -rw-r--r-- | drivers/usb/serial/pl2303.c | 2 | ||||
| -rw-r--r-- | drivers/usb/serial/pl2303.h | 5 | ||||
| -rw-r--r-- | drivers/usb/serial/qcaux.c | 10 | ||||
| -rw-r--r-- | drivers/usb/serial/qcserial.c | 29 | ||||
| -rw-r--r-- | drivers/usb/serial/safe_serial.c | 2 | ||||
| -rw-r--r-- | drivers/usb/serial/sierra.c | 2 | ||||
| -rw-r--r-- | drivers/usb/serial/symbolserial.c | 3 | ||||
| -rw-r--r-- | drivers/usb/serial/ti_usb_3410_5052.c | 26 | ||||
| -rw-r--r-- | drivers/usb/serial/ti_usb_3410_5052.h | 3 | ||||
| -rw-r--r-- | drivers/usb/serial/usb_debug.c | 1 | 
24 files changed, 188 insertions, 42 deletions
diff --git a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig index c78b255e3f8..a0ecb42cb33 100644 --- a/drivers/usb/serial/Kconfig +++ b/drivers/usb/serial/Kconfig @@ -474,14 +474,14 @@ config USB_SERIAL_OTI6858  config USB_SERIAL_QCAUX  	tristate "USB Qualcomm Auxiliary Serial Port Driver" -	---help--- +	help  	  Say Y here if you want to use the auxiliary serial ports provided  	  by many modems based on Qualcomm chipsets.  These ports often use  	  a proprietary protocol called DM and cannot be used for AT- or  	  PPP-based communication.  	  To compile this driver as a module, choose M here: the -	  module will be called moto_modem.  If unsure, choose N. +	  module will be called qcaux.  If unsure, choose N.  config USB_SERIAL_QUALCOMM  	tristate "USB Qualcomm Serial modem" diff --git a/drivers/usb/serial/aircable.c b/drivers/usb/serial/aircable.c index 365db1097bf..4fd7af98b1a 100644 --- a/drivers/usb/serial/aircable.c +++ b/drivers/usb/serial/aircable.c @@ -43,6 +43,7 @@   */  #include <linux/tty.h> +#include <linux/slab.h>  #include <linux/tty_flip.h>  #include <linux/circ_buf.h>  #include <linux/usb.h> diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c index 547c9448c28..9b66bf19f75 100644 --- a/drivers/usb/serial/ark3116.c +++ b/drivers/usb/serial/ark3116.c @@ -26,6 +26,7 @@  #include <linux/init.h>  #include <linux/ioctl.h>  #include <linux/tty.h> +#include <linux/slab.h>  #include <linux/tty_flip.h>  #include <linux/module.h>  #include <linux/usb.h> diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c index ba555c528cc..7f547dc3a59 100644 --- a/drivers/usb/serial/bus.c +++ b/drivers/usb/serial/bus.c @@ -11,6 +11,7 @@  #include <linux/kernel.h>  #include <linux/errno.h>  #include <linux/tty.h> +#include <linux/slab.h>  #include <linux/module.h>  #include <linux/usb.h>  #include <linux/usb/serial.h> diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index 9f4fed1968b..7e8e3981841 100644 --- a/drivers/usb/serial/ch341.c +++ b/drivers/usb/serial/ch341.c @@ -19,6 +19,7 @@  #include <linux/init.h>  #include <linux/tty.h>  #include <linux/module.h> +#include <linux/slab.h>  #include <linux/usb.h>  #include <linux/usb/serial.h>  #include <linux/serial.h> diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c index b22ac325852..f347da2ef00 100644 --- a/drivers/usb/serial/console.c +++ b/drivers/usb/serial/console.c @@ -181,6 +181,7 @@ static int usb_console_setup(struct console *co, char *options)  	/* The console is special in terms of closing the device so  	 * indicate this port is now acting as a system console. */  	port->console = 1; +	port->port.console = 1;  	mutex_unlock(&serial->disc_mutex);  	return retval; diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 507382b0a9e..ec9b0449ccf 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c @@ -313,11 +313,6 @@ static int cp210x_set_config(struct usb_serial_port *port, u8 request,  		return -EPROTO;  	} -	/* Single data value */ -	result = usb_control_msg(serial->dev, -			usb_sndctrlpipe(serial->dev, 0), -			request, REQTYPE_HOST_TO_DEVICE, data[0], -			0, NULL, 0, 300);  	return 0;  } diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index baf74b44e6e..e23c77925e7 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c @@ -152,7 +152,7 @@ struct cypress_private {  	int isthrottled;		   /* if throttled, discard reads */  	wait_queue_head_t delta_msr_wait;  /* used for TIOCMIWAIT */  	char prev_status, diff_status;	   /* used for TIOCMIWAIT */ -	/* we pass a pointer to this as the arguement sent to +	/* we pass a pointer to this as the argument sent to  	   cypress_set_termios old_termios */  	struct ktermios tmp_termios; 	   /* stores the old termios settings */  }; diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 6af0dfa5f5a..1d7c4fac02e 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -91,7 +91,7 @@ struct ftdi_private {  	unsigned long tx_outstanding_bytes;  	unsigned long tx_outstanding_urbs;  	unsigned short max_packet_size; -	struct mutex cfg_lock; /* Avoid mess by parallel calls of config ioctl() */ +	struct mutex cfg_lock; /* Avoid mess by parallel calls of config ioctl() and change_speed() */  };  /* struct ftdi_sio_quirk is used by devices requiring special attention. */ @@ -658,6 +658,7 @@ static struct usb_device_id id_table_combined [] = {  	{ USB_DEVICE(EVOLUTION_VID, EVOLUTION_ER1_PID) },  	{ USB_DEVICE(EVOLUTION_VID, EVO_HYBRID_PID) },  	{ USB_DEVICE(EVOLUTION_VID, EVO_RCM4_PID) }, +	{ USB_DEVICE(CONTEC_VID, CONTEC_COM1USBH_PID) },  	{ USB_DEVICE(FTDI_VID, FTDI_ARTEMIS_PID) },  	{ USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16_PID) },  	{ USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16C_PID) }, @@ -1272,8 +1273,8 @@ check_and_exit:  	     (priv->flags & ASYNC_SPD_MASK)) ||  	    (((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST) &&  	     (old_priv.custom_divisor != priv->custom_divisor))) { -		mutex_unlock(&priv->cfg_lock);  		change_speed(tty, port); +		mutex_unlock(&priv->cfg_lock);  	}  	else  		mutex_unlock(&priv->cfg_lock); @@ -2264,9 +2265,11 @@ static void ftdi_set_termios(struct tty_struct *tty,  		clear_mctrl(port, TIOCM_DTR | TIOCM_RTS);  	} else {  		/* set the baudrate determined before */ +		mutex_lock(&priv->cfg_lock);  		if (change_speed(tty, port))  			dev_err(&port->dev, "%s urb failed to set baudrate\n",  				__func__); +		mutex_unlock(&priv->cfg_lock);  		/* Ensure RTS and DTR are raised when baudrate changed from 0 */  		if (!old_termios || (old_termios->c_cflag & CBAUD) == B0)  			set_mctrl(port, TIOCM_DTR | TIOCM_RTS); diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h index 0727e198503..75482cbc399 100644 --- a/drivers/usb/serial/ftdi_sio_ids.h +++ b/drivers/usb/serial/ftdi_sio_ids.h @@ -501,6 +501,13 @@  #define CONTEC_COM1USBH_PID	0x8311	/* COM-1(USB)H */  /* + * Contec products (http://www.contec.com) + * Submitted by Daniel Sangorrin + */ +#define CONTEC_VID		0x06CE	/* Vendor ID */ +#define CONTEC_COM1USBH_PID	0x8311	/* COM-1(USB)H */ + +/*   * Definitions for B&B Electronics products.   */  #define BANDB_VID		0x0856	/* B&B Electronics Vendor ID */ diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 89fac36684c..f804acb138e 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c @@ -130,7 +130,7 @@ int usb_serial_generic_open(struct tty_struct *tty, struct usb_serial_port *port  	spin_unlock_irqrestore(&port->lock, flags);  	/* if we have a bulk endpoint, start reading from it */ -	if (serial->num_bulk_in) { +	if (port->bulk_in_size) {  		/* Start reading from the device */  		usb_fill_bulk_urb(port->read_urb, serial->dev,  				   usb_rcvbulkpipe(serial->dev, @@ -159,10 +159,10 @@ static void generic_cleanup(struct usb_serial_port *port)  	dbg("%s - port %d", __func__, port->number);  	if (serial->dev) { -		/* shutdown any bulk reads that might be going on */ -		if (serial->num_bulk_out) +		/* shutdown any bulk transfers that might be going on */ +		if (port->bulk_out_size)  			usb_kill_urb(port->write_urb); -		if (serial->num_bulk_in) +		if (port->bulk_in_size)  			usb_kill_urb(port->read_urb);  	}  } @@ -333,15 +333,15 @@ int usb_serial_generic_write(struct tty_struct *tty,  	dbg("%s - port %d", __func__, port->number); +	/* only do something if we have a bulk out endpoint */ +	if (!port->bulk_out_size) +		return -ENODEV; +  	if (count == 0) {  		dbg("%s - write request of 0 bytes", __func__);  		return 0;  	} -	/* only do something if we have a bulk out endpoint */ -	if (!serial->num_bulk_out) -		return 0; -  	if (serial->type->max_in_flight_urbs)  		return usb_serial_multi_urb_write(tty, port,  						  buf, count); @@ -364,14 +364,19 @@ int usb_serial_generic_write_room(struct tty_struct *tty)  	int room = 0;  	dbg("%s - port %d", __func__, port->number); + +	if (!port->bulk_out_size) +		return 0; +  	spin_lock_irqsave(&port->lock, flags);  	if (serial->type->max_in_flight_urbs) {  		if (port->urbs_in_flight < serial->type->max_in_flight_urbs)  			room = port->bulk_out_size *  				(serial->type->max_in_flight_urbs -  				 port->urbs_in_flight); -	} else if (serial->num_bulk_out) +	} else {  		room = kfifo_avail(&port->write_fifo); +	}  	spin_unlock_irqrestore(&port->lock, flags);  	dbg("%s - returns %d", __func__, room); @@ -382,15 +387,18 @@ int usb_serial_generic_chars_in_buffer(struct tty_struct *tty)  {  	struct usb_serial_port *port = tty->driver_data;  	struct usb_serial *serial = port->serial; -	int chars = 0;  	unsigned long flags; +	int chars;  	dbg("%s - port %d", __func__, port->number); +	if (!port->bulk_out_size) +		return 0; +  	spin_lock_irqsave(&port->lock, flags);  	if (serial->type->max_in_flight_urbs)  		chars = port->tx_bytes_flight; -	else if (serial->num_bulk_out) +	else  		chars = kfifo_len(&port->write_fifo);  	spin_unlock_irqrestore(&port->lock, flags); @@ -415,11 +423,13 @@ void usb_serial_generic_resubmit_read_urb(struct usb_serial_port *port,  			   ((serial->type->read_bulk_callback) ?  			     serial->type->read_bulk_callback :  			     usb_serial_generic_read_bulk_callback), port); +  	result = usb_submit_urb(urb, mem_flags); -	if (result) +	if (result && result != -EPERM) {  		dev_err(&port->dev,  			"%s - failed resubmitting read urb, error %d\n",  							__func__, result); +	}  }  EXPORT_SYMBOL_GPL(usb_serial_generic_resubmit_read_urb); @@ -498,23 +508,18 @@ void usb_serial_generic_write_bulk_callback(struct urb *urb)  		if (port->urbs_in_flight < 0)  			port->urbs_in_flight = 0;  		spin_unlock_irqrestore(&port->lock, flags); - -		if (status) { -			dbg("%s - nonzero multi-urb write bulk status " -				"received: %d", __func__, status); -			return; -		}  	} else {  		port->write_urb_busy = 0; -		if (status) { -			dbg("%s - nonzero multi-urb write bulk status " -				"received: %d", __func__, status); +		if (status)  			kfifo_reset_out(&port->write_fifo); -		} else +		else  			usb_serial_generic_write_start(port);  	} +	if (status) +		dbg("%s - non-zero urb status: %d", __func__, status); +  	usb_serial_port_softint(port);  }  EXPORT_SYMBOL_GPL(usb_serial_generic_write_bulk_callback); diff --git a/drivers/usb/serial/navman.c b/drivers/usb/serial/navman.c index 04a6cbbed2c..a6b207c8491 100644 --- a/drivers/usb/serial/navman.c +++ b/drivers/usb/serial/navman.c @@ -12,6 +12,7 @@   *	flags as the navman is rx only so cannot echo.   */ +#include <linux/gfp.h>  #include <linux/kernel.h>  #include <linux/init.h>  #include <linux/tty.h> diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c index f37476e2268..ed01f3b2de8 100644 --- a/drivers/usb/serial/opticon.c +++ b/drivers/usb/serial/opticon.c @@ -13,6 +13,7 @@  #include <linux/init.h>  #include <linux/tty.h>  #include <linux/tty_driver.h> +#include <linux/slab.h>  #include <linux/tty_flip.h>  #include <linux/serial.h>  #include <linux/module.h> @@ -115,7 +116,7 @@ static void opticon_bulk_callback(struct urb *urb)  		}  	} else {  		dev_dbg(&priv->udev->dev, -			"Improper ammount of data received from the device, " +			"Improper amount of data received from the device, "  			"%d bytes", urb->actual_length);  	} diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 847b805d63a..84d0edad8e4 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -37,6 +37,7 @@  #include <linux/errno.h>  #include <linux/tty.h>  #include <linux/tty_flip.h> +#include <linux/slab.h>  #include <linux/module.h>  #include <linux/bitops.h>  #include <linux/usb.h> @@ -288,7 +289,9 @@ static int  option_resume(struct usb_serial *serial);  #define QUALCOMM_VENDOR_ID			0x05C6 -#define MAXON_VENDOR_ID				0x16d8 +#define CMOTECH_VENDOR_ID			0x16d8 +#define CMOTECH_PRODUCT_6008			0x6008 +#define CMOTECH_PRODUCT_6280			0x6280  #define TELIT_VENDOR_ID				0x1bc7  #define TELIT_PRODUCT_UC864E			0x1003 @@ -302,6 +305,11 @@ static int  option_resume(struct usb_serial *serial);  #define ZTE_PRODUCT_CDMA_TECH			0xfffe  #define ZTE_PRODUCT_AC8710			0xfff1  #define ZTE_PRODUCT_AC2726			0xfff5 +#define ZTE_PRODUCT_AC8710T			0xffff + +/* ZTE PRODUCTS -- alternate vendor ID */ +#define ZTE_VENDOR_ID2				0x1d6b +#define ZTE_PRODUCT_MF_330			0x0002  #define BENQ_VENDOR_ID				0x04a5  #define BENQ_PRODUCT_H10			0x4068 @@ -309,6 +317,7 @@ static int  option_resume(struct usb_serial *serial);  #define DLINK_VENDOR_ID				0x1186  #define DLINK_PRODUCT_DWM_652			0x3e04  #define DLINK_PRODUCT_DWM_652_U5		0xce16 +#define DLINK_PRODUCT_DWM_652_U5A		0xce1e  #define QISDA_VENDOR_ID				0x1da5  #define QISDA_PRODUCT_H21_4512			0x4512 @@ -332,6 +341,24 @@ static int  option_resume(struct usb_serial *serial);  #define ALCATEL_VENDOR_ID			0x1bbb  #define ALCATEL_PRODUCT_X060S			0x0000 +#define PIRELLI_VENDOR_ID			0x1266 +#define PIRELLI_PRODUCT_C100_1			0x1002 +#define PIRELLI_PRODUCT_C100_2			0x1003 +#define PIRELLI_PRODUCT_1004			0x1004 +#define PIRELLI_PRODUCT_1005			0x1005 +#define PIRELLI_PRODUCT_1006			0x1006 +#define PIRELLI_PRODUCT_1007			0x1007 +#define PIRELLI_PRODUCT_1008			0x1008 +#define PIRELLI_PRODUCT_1009			0x1009 +#define PIRELLI_PRODUCT_100A			0x100a +#define PIRELLI_PRODUCT_100B			0x100b +#define PIRELLI_PRODUCT_100C			0x100c +#define PIRELLI_PRODUCT_100D			0x100d +#define PIRELLI_PRODUCT_100E			0x100e +#define PIRELLI_PRODUCT_100F			0x100f +#define PIRELLI_PRODUCT_1011			0x1011 +#define PIRELLI_PRODUCT_1012			0x1012 +  /* Airplus products */  #define AIRPLUS_VENDOR_ID			0x1011  #define AIRPLUS_PRODUCT_MCD650			0x3198 @@ -351,6 +378,8 @@ static int  option_resume(struct usb_serial *serial);  #define HAIER_VENDOR_ID				0x201e  #define HAIER_PRODUCT_CE100			0x2009 +#define CINTERION_VENDOR_ID			0x0681 +  /* some devices interfaces need special handling due to a number of reasons */  enum option_blacklist_reason {  		OPTION_BLACKLIST_NONE = 0, @@ -547,7 +576,8 @@ static const struct usb_device_id option_ids[] = {  	{ USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) },  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6000)}, /* ZTE AC8700 */  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ -	{ USB_DEVICE(MAXON_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */ +	{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6280) }, /* BP3-USB & BP3-EXT HSDPA */ +	{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6008) },  	{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) },  	{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864G) },  	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */ @@ -656,9 +686,12 @@ static const struct usb_device_id option_ids[] = {  	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) },  	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) },  	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, +	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710T, 0xff, 0xff, 0xff) }, +	{ USB_DEVICE(ZTE_VENDOR_ID2, ZTE_PRODUCT_MF_330) },  	{ USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) },  	{ USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) },  	{ USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5) }, /* Yes, ALINK_VENDOR_ID */ +	{ USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5A) },  	{ USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4512) },  	{ USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4523) },  	{ USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4515) }, @@ -666,7 +699,6 @@ static const struct usb_device_id option_ids[] = {  	{ USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_G450) },  	{ USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_HSDPA_MINICARD ) }, /* Toshiba 3G HSDPA == Novatel Expedite EU870D MiniCard */  	{ USB_DEVICE(ALINK_VENDOR_ID, 0x9000) }, -	{ USB_DEVICE(ALINK_VENDOR_ID, 0xce16) },  	{ USB_DEVICE_AND_INTERFACE_INFO(ALINK_VENDOR_ID, ALINK_PRODUCT_3GU, 0xff, 0xff, 0xff) },  	{ USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S) },  	{ USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) }, @@ -675,6 +707,25 @@ static const struct usb_device_id option_ids[] = {    	  .driver_info = (kernel_ulong_t)&four_g_w14_blacklist    	},  	{ USB_DEVICE(HAIER_VENDOR_ID, HAIER_PRODUCT_CE100) }, +	/* Pirelli  */ +	{ USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_1)}, +	{ USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_2)}, +	{ USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1004)}, +	{ USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1005)}, +	{ USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1006)}, +	{ USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1007)}, +	{ USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1008)}, +	{ USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1009)}, +	{ USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100A)}, +	{ USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100B) }, +	{ USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100C) }, +	{ USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100D) }, +	{ USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100E) }, +	{ USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100F) }, +	{ USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1011)}, +	{ USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1012)}, + +	{ USB_DEVICE(CINTERION_VENDOR_ID, 0x0047) },  	{ } /* Terminating entry */  };  MODULE_DEVICE_TABLE(usb, option_ids); @@ -798,12 +849,19 @@ static int option_probe(struct usb_serial *serial,  			const struct usb_device_id *id)  {  	struct option_intf_private *data; +  	/* D-Link DWM 652 still exposes CD-Rom emulation interface in modem mode */  	if (serial->dev->descriptor.idVendor == DLINK_VENDOR_ID &&  		serial->dev->descriptor.idProduct == DLINK_PRODUCT_DWM_652 &&  		serial->interface->cur_altsetting->desc.bInterfaceClass == 0x8)  		return -ENODEV; +	/* Bandrich modem and AT command interface is 0xff */ +	if ((serial->dev->descriptor.idVendor == BANDRICH_VENDOR_ID || +		serial->dev->descriptor.idVendor == PIRELLI_VENDOR_ID) && +		serial->interface->cur_altsetting->desc.bInterfaceClass != 0xff) +		return -ENODEV; +  	data = serial->private = kzalloc(sizeof(struct option_intf_private), GFP_KERNEL);  	if (!data)  		return -ENOMEM; diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 73d5f346d3e..c28b1607eac 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c @@ -59,6 +59,7 @@ static const struct usb_device_id id_table[] = {  	{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ALDIGA) },  	{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MMX) },  	{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_GPRS) }, +	{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_HCR331) },  	{ USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) },  	{ USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) },  	{ USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) }, @@ -97,6 +98,7 @@ static const struct usb_device_id id_table[] = {  	{ USB_DEVICE(CRESSI_VENDOR_ID, CRESSI_EDY_PRODUCT_ID) },  	{ USB_DEVICE(SONY_VENDOR_ID, SONY_QN3USB_PRODUCT_ID) },  	{ USB_DEVICE(SANWA_VENDOR_ID, SANWA_PRODUCT_ID) }, +	{ USB_DEVICE(ADLINK_VENDOR_ID, ADLINK_ND6530_PRODUCT_ID) },  	{ }					/* Terminating entry */  }; diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h index d640dc95156..23c09b38b9e 100644 --- a/drivers/usb/serial/pl2303.h +++ b/drivers/usb/serial/pl2303.h @@ -20,6 +20,7 @@  #define PL2303_PRODUCT_ID_ALDIGA	0x0611  #define PL2303_PRODUCT_ID_MMX		0x0612  #define PL2303_PRODUCT_ID_GPRS		0x0609 +#define PL2303_PRODUCT_ID_HCR331	0x331a  #define ATEN_VENDOR_ID		0x0557  #define ATEN_VENDOR_ID2		0x0547 @@ -134,3 +135,7 @@  /* Sanwa KB-USB2 multimeter cable (ID: 11ad:0001) */  #define SANWA_VENDOR_ID		0x11ad  #define SANWA_PRODUCT_ID	0x0001 + +/* ADLINK ND-6530 RS232,RS485 and RS422 adapter */ +#define ADLINK_VENDOR_ID        0x0b63 +#define ADLINK_ND6530_PRODUCT_ID       0x6530 diff --git a/drivers/usb/serial/qcaux.c b/drivers/usb/serial/qcaux.c index 0b936206171..7e3bea23600 100644 --- a/drivers/usb/serial/qcaux.c +++ b/drivers/usb/serial/qcaux.c @@ -42,6 +42,14 @@  #define CMOTECH_PRODUCT_CDU550			0x5553  #define CMOTECH_PRODUCT_CDX650			0x6512 +/* LG devices */ +#define LG_VENDOR_ID				0x1004 +#define LG_PRODUCT_VX4400_6000			0x6000 /* VX4400/VX6000/Rumor */ + +/* Sanyo devices */ +#define SANYO_VENDOR_ID				0x0474 +#define SANYO_PRODUCT_KATANA_LX			0x0754 /* SCP-3800 (Katana LX) */ +  static struct usb_device_id id_table[] = {  	{ USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, UTSTARCOM_PRODUCT_PC5740, 0xff, 0x00, 0x00) },  	{ USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, UTSTARCOM_PRODUCT_PC5750, 0xff, 0x00, 0x00) }, @@ -51,6 +59,8 @@ static struct usb_device_id id_table[] = {  	{ USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, UTSTARCOM_PRODUCT_UM175_ALLTEL, 0xff, 0x00, 0x00) },  	{ USB_DEVICE_AND_INTERFACE_INFO(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CDU550, 0xff, 0xff, 0x00) },  	{ USB_DEVICE_AND_INTERFACE_INFO(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CDX650, 0xff, 0xff, 0x00) }, +	{ USB_DEVICE_AND_INTERFACE_INFO(LG_VENDOR_ID, LG_PRODUCT_VX4400_6000, 0xff, 0xff, 0x00) }, +	{ USB_DEVICE_AND_INTERFACE_INFO(SANYO_VENDOR_ID, SANYO_PRODUCT_KATANA_LX, 0xff, 0xff, 0x00) },  	{ },  };  MODULE_DEVICE_TABLE(usb, id_table); diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c index 310ff6ec656..53a2d5a935a 100644 --- a/drivers/usb/serial/qcserial.c +++ b/drivers/usb/serial/qcserial.c @@ -47,6 +47,35 @@ static const struct usb_device_id id_table[] = {  	{USB_DEVICE(0x05c6, 0x9221)},	/* Generic Gobi QDL device */  	{USB_DEVICE(0x05c6, 0x9231)},	/* Generic Gobi QDL device */  	{USB_DEVICE(0x1f45, 0x0001)},	/* Unknown Gobi QDL device */ +	{USB_DEVICE(0x413c, 0x8185)},	/* Dell Gobi 2000 QDL device (N0218, VU936) */ +	{USB_DEVICE(0x413c, 0x8186)},	/* Dell Gobi 2000 Modem device (N0218, VU936) */ +	{USB_DEVICE(0x05c6, 0x9224)},	/* Sony Gobi 2000 QDL device (N0279, VU730) */ +	{USB_DEVICE(0x05c6, 0x9225)},	/* Sony Gobi 2000 Modem device (N0279, VU730) */ +	{USB_DEVICE(0x05c6, 0x9244)},	/* Samsung Gobi 2000 QDL device (VL176) */ +	{USB_DEVICE(0x05c6, 0x9245)},	/* Samsung Gobi 2000 Modem device (VL176) */ +	{USB_DEVICE(0x03f0, 0x241d)},	/* HP Gobi 2000 QDL device (VP412) */ +	{USB_DEVICE(0x03f0, 0x251d)},	/* HP Gobi 2000 Modem device (VP412) */ +	{USB_DEVICE(0x05c6, 0x9214)},	/* Acer Gobi 2000 QDL device (VP413) */ +	{USB_DEVICE(0x05c6, 0x9215)},	/* Acer Gobi 2000 Modem device (VP413) */ +	{USB_DEVICE(0x05c6, 0x9264)},	/* Asus Gobi 2000 QDL device (VR305) */ +	{USB_DEVICE(0x05c6, 0x9265)},	/* Asus Gobi 2000 Modem device (VR305) */ +	{USB_DEVICE(0x05c6, 0x9234)},	/* Top Global Gobi 2000 QDL device (VR306) */ +	{USB_DEVICE(0x05c6, 0x9235)},	/* Top Global Gobi 2000 Modem device (VR306) */ +	{USB_DEVICE(0x05c6, 0x9274)},	/* iRex Technologies Gobi 2000 QDL device (VR307) */ +	{USB_DEVICE(0x05c6, 0x9275)},	/* iRex Technologies Gobi 2000 Modem device (VR307) */ +	{USB_DEVICE(0x1199, 0x9000)},	/* Sierra Wireless Gobi 2000 QDL device (VT773) */ +	{USB_DEVICE(0x1199, 0x9001)},	/* Sierra Wireless Gobi 2000 Modem device (VT773) */ +	{USB_DEVICE(0x1199, 0x9002)},	/* Sierra Wireless Gobi 2000 Modem device (VT773) */ +	{USB_DEVICE(0x1199, 0x9003)},	/* Sierra Wireless Gobi 2000 Modem device (VT773) */ +	{USB_DEVICE(0x1199, 0x9004)},	/* Sierra Wireless Gobi 2000 Modem device (VT773) */ +	{USB_DEVICE(0x1199, 0x9005)},	/* Sierra Wireless Gobi 2000 Modem device (VT773) */ +	{USB_DEVICE(0x1199, 0x9006)},	/* Sierra Wireless Gobi 2000 Modem device (VT773) */ +	{USB_DEVICE(0x1199, 0x9007)},	/* Sierra Wireless Gobi 2000 Modem device (VT773) */ +	{USB_DEVICE(0x1199, 0x9008)},	/* Sierra Wireless Gobi 2000 Modem device (VT773) */ +	{USB_DEVICE(0x1199, 0x9009)},	/* Sierra Wireless Gobi 2000 Modem device (VT773) */ +	{USB_DEVICE(0x1199, 0x900a)},	/* Sierra Wireless Gobi 2000 Modem device (VT773) */ +	{USB_DEVICE(0x16d8, 0x8001)},	/* CMDTech Gobi 2000 QDL device (VU922) */ +	{USB_DEVICE(0x16d8, 0x8002)},	/* CMDTech Gobi 2000 Modem device (VU922) */  	{ }				/* Terminating entry */  };  MODULE_DEVICE_TABLE(usb, id_table); diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c index 4b463cd140e..43a0cadd578 100644 --- a/drivers/usb/serial/safe_serial.c +++ b/drivers/usb/serial/safe_serial.c @@ -64,8 +64,8 @@  #include <linux/kernel.h>  #include <linux/errno.h> +#include <linux/gfp.h>  #include <linux/init.h> -#include <linux/slab.h>  #include <linux/tty.h>  #include <linux/tty_driver.h>  #include <linux/tty_flip.h> diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 34e6f894cba..ef0bdb08d78 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -26,6 +26,7 @@  #include <linux/jiffies.h>  #include <linux/errno.h>  #include <linux/tty.h> +#include <linux/slab.h>  #include <linux/tty_flip.h>  #include <linux/module.h>  #include <linux/usb.h> @@ -229,6 +230,7 @@ static const struct sierra_iface_info direct_ip_interface_blacklist = {  static const struct usb_device_id id_table[] = {  	{ USB_DEVICE(0x0F3D, 0x0112) }, /* Airprime/Sierra PC 5220 */  	{ USB_DEVICE(0x03F0, 0x1B1D) },	/* HP ev2200 a.k.a MC5720 */ +	{ USB_DEVICE(0x03F0, 0x211D) }, /* HP ev2210 a.k.a MC5725 */  	{ USB_DEVICE(0x03F0, 0x1E1D) },	/* HP hs2300 a.k.a MC8775 */  	{ USB_DEVICE(0x1199, 0x0017) },	/* Sierra Wireless EM5625 */ diff --git a/drivers/usb/serial/symbolserial.c b/drivers/usb/serial/symbolserial.c index 72398888858..d9457bd4fe1 100644 --- a/drivers/usb/serial/symbolserial.c +++ b/drivers/usb/serial/symbolserial.c @@ -12,6 +12,7 @@  #include <linux/kernel.h>  #include <linux/init.h>  #include <linux/tty.h> +#include <linux/slab.h>  #include <linux/tty_driver.h>  #include <linux/tty_flip.h>  #include <linux/module.h> @@ -94,7 +95,7 @@ static void symbol_int_callback(struct urb *urb)  		}  	} else {  		dev_dbg(&priv->udev->dev, -			"Improper ammount of data received from the device, " +			"Improper amount of data received from the device, "  			"%d bytes", urb->actual_length);  	} diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index 0afe5c71c17..e1bfda33f5b 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c @@ -172,7 +172,7 @@ static unsigned int product_5052_count;  /* the array dimension is the number of default entries plus */  /* TI_EXTRA_VID_PID_COUNT user defined entries plus 1 terminating */  /* null entry */ -static struct usb_device_id ti_id_table_3410[10+TI_EXTRA_VID_PID_COUNT+1] = { +static struct usb_device_id ti_id_table_3410[13+TI_EXTRA_VID_PID_COUNT+1] = {  	{ USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) },  	{ USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) },  	{ USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) }, @@ -180,6 +180,9 @@ static struct usb_device_id ti_id_table_3410[10+TI_EXTRA_VID_PID_COUNT+1] = {  	{ USB_DEVICE(MTS_VENDOR_ID, MTS_CDMA_PRODUCT_ID) },  	{ USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_PRODUCT_ID) },  	{ USB_DEVICE(MTS_VENDOR_ID, MTS_EDGE_PRODUCT_ID) }, +	{ USB_DEVICE(MTS_VENDOR_ID, MTS_MT9234MU_PRODUCT_ID) }, +	{ USB_DEVICE(MTS_VENDOR_ID, MTS_MT9234ZBA_PRODUCT_ID) }, +	{ USB_DEVICE(MTS_VENDOR_ID, MTS_MT9234ZBAOLD_PRODUCT_ID) },  	{ USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) },  	{ USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) },  	{ USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, @@ -192,7 +195,7 @@ static struct usb_device_id ti_id_table_5052[5+TI_EXTRA_VID_PID_COUNT+1] = {  	{ USB_DEVICE(TI_VENDOR_ID, TI_5052_FIRMWARE_PRODUCT_ID) },  }; -static struct usb_device_id ti_id_table_combined[14+2*TI_EXTRA_VID_PID_COUNT+1] = { +static struct usb_device_id ti_id_table_combined[17+2*TI_EXTRA_VID_PID_COUNT+1] = {  	{ USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) },  	{ USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) },  	{ USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) }, @@ -200,6 +203,9 @@ static struct usb_device_id ti_id_table_combined[14+2*TI_EXTRA_VID_PID_COUNT+1]  	{ USB_DEVICE(MTS_VENDOR_ID, MTS_CDMA_PRODUCT_ID) },  	{ USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_PRODUCT_ID) },  	{ USB_DEVICE(MTS_VENDOR_ID, MTS_EDGE_PRODUCT_ID) }, +	{ USB_DEVICE(MTS_VENDOR_ID, MTS_MT9234MU_PRODUCT_ID) }, +	{ USB_DEVICE(MTS_VENDOR_ID, MTS_MT9234ZBA_PRODUCT_ID) }, +	{ USB_DEVICE(MTS_VENDOR_ID, MTS_MT9234ZBAOLD_PRODUCT_ID) },  	{ USB_DEVICE(TI_VENDOR_ID, TI_5052_BOOT_PRODUCT_ID) },  	{ USB_DEVICE(TI_VENDOR_ID, TI_5152_BOOT_PRODUCT_ID) },  	{ USB_DEVICE(TI_VENDOR_ID, TI_5052_EEPROM_PRODUCT_ID) }, @@ -287,6 +293,8 @@ MODULE_FIRMWARE("ti_5052.fw");  MODULE_FIRMWARE("mts_cdma.fw");  MODULE_FIRMWARE("mts_gsm.fw");  MODULE_FIRMWARE("mts_edge.fw"); +MODULE_FIRMWARE("mts_mt9234mu.fw"); +MODULE_FIRMWARE("mts_mt9234zba.fw");  module_param(debug, bool, S_IRUGO | S_IWUSR);  MODULE_PARM_DESC(debug, "Enable debugging, 0=no, 1=yes"); @@ -1687,6 +1695,7 @@ static int ti_download_firmware(struct ti_device *tdev)  	const struct firmware *fw_p;  	char buf[32]; +	dbg("%s\n", __func__);  	/* try ID specific firmware first, then try generic firmware */  	sprintf(buf, "ti_usb-v%04x-p%04x.fw", dev->descriptor.idVendor,  	    dev->descriptor.idProduct); @@ -1703,7 +1712,15 @@ static int ti_download_firmware(struct ti_device *tdev)  			case MTS_EDGE_PRODUCT_ID:  				strcpy(buf, "mts_edge.fw");  				break; -			} +			case MTS_MT9234MU_PRODUCT_ID: +				strcpy(buf, "mts_mt9234mu.fw"); +				break; +			case MTS_MT9234ZBA_PRODUCT_ID: +				strcpy(buf, "mts_mt9234zba.fw"); +				break; +			case MTS_MT9234ZBAOLD_PRODUCT_ID: +				strcpy(buf, "mts_mt9234zba.fw"); +				break;			}  		}  		if (buf[0] == '\0') {  			if (tdev->td_is_3410) @@ -1718,7 +1735,7 @@ static int ti_download_firmware(struct ti_device *tdev)  		return -ENOENT;  	}  	if (fw_p->size > TI_FIRMWARE_BUF_SIZE) { -		dev_err(&dev->dev, "%s - firmware too large\n", __func__); +		dev_err(&dev->dev, "%s - firmware too large %zu\n", __func__, fw_p->size);  		return -ENOENT;  	} @@ -1730,6 +1747,7 @@ static int ti_download_firmware(struct ti_device *tdev)  		status = ti_do_download(dev, pipe, buffer, fw_p->size);  		kfree(buffer);  	} else { +		dbg("%s ENOMEM\n", __func__);  		status = -ENOMEM;  	}  	release_firmware(fw_p); diff --git a/drivers/usb/serial/ti_usb_3410_5052.h b/drivers/usb/serial/ti_usb_3410_5052.h index f323c602585..2aac1953993 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.h +++ b/drivers/usb/serial/ti_usb_3410_5052.h @@ -45,6 +45,9 @@  #define MTS_CDMA_PRODUCT_ID		0xF110  #define MTS_GSM_PRODUCT_ID		0xF111  #define MTS_EDGE_PRODUCT_ID		0xF112 +#define MTS_MT9234MU_PRODUCT_ID		0xF114 +#define MTS_MT9234ZBA_PRODUCT_ID	0xF115 +#define MTS_MT9234ZBAOLD_PRODUCT_ID	0x0319  /* Commands */  #define TI_GET_VERSION			0x01 diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c index 252cc2d993b..28026b47344 100644 --- a/drivers/usb/serial/usb_debug.c +++ b/drivers/usb/serial/usb_debug.c @@ -8,6 +8,7 @@   *	2 as published by the Free Software Foundation.   */ +#include <linux/gfp.h>  #include <linux/kernel.h>  #include <linux/init.h>  #include <linux/tty.h>  |