mirror of
https://github.com/torvalds/linux.git
synced 2024-11-05 11:32:04 +00:00
USB-serial fixes for v3.18-rc3
These updates remove two allocations of unused buffers from kobil_sct and add some new device ids. Signed-off-by: Johan Hovold <johan@kernel.org> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABAgAGBQJUUK1CAAoJEEEN5E/e4bSVVusQAM3DJ2pS2YvygoZ8+O9AUkIQ beDoRV5mAV1qEnEq9+reO90qKC4KvVwJbsi1b+m4tc488mjNCOTgty9YweWatvte 3BrAl7r5Y3vy26waFSjLoixS+R/SesTwnOu7jiRDIv3Cx4ppSuVjBJ6xWrFsEJyy mOMGY34nt51SSPl4MDUBqdAVpnqy2epwG186i6/092jDBo3bbhtO2sh4qfFSAn2H ypKjWNnG0BXx/gwrVFkpDJuiO1CY68orvSKzTIpWqipn3lTGSU7gMuz0W3NeLXkL 1LGHhtA8C+k/7PeYT5pRUuOfbr3GbLPsTiy3yP05DbeS1whtJ4gXzlQuNvE0beuY RV/5auz9zXrE62p1uR3uY14OamUi300NKriOYTLDSKrp0SzTu+5LEwM6DHfbxxiN Cr8Bd6XW/UegHPnWKUvMWViVyUpSjBCy3j7aSmrXmv9HRnaP+shXvIZjuRcVUfwE 6UskyFd/4tPeYbQo5FASh8vrAmoYKqS/0pNZGi1oM1+rrxIIqveNBkfKebwH5q1Z hCMfFysEohlf0sbSgJWjGEdqfmfDOHlE36ovY83ytGqBBVYh7f5pW1jMZSaTqomB GRAcuJNs61BVaigRiQFmluEFTETrUrZy1Z5AuAfUXRJPsE+Jz/N5E5FXT8rVkjc4 JfeP/L3uVME6GYww7Qsj =PSiW -----END PGP SIGNATURE----- Merge tag 'usb-serial-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for v3.18-rc3 These updates remove two allocations of unused buffers from kobil_sct and add some new device ids. Signed-off-by: Johan Hovold <johan@kernel.org>
This commit is contained in:
commit
9c19db5b11
@ -155,6 +155,7 @@ static const struct usb_device_id id_table[] = {
|
||||
{ USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
|
||||
{ USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */
|
||||
{ USB_DEVICE(0x1B1C, 0x1C00) }, /* Corsair USB Dongle */
|
||||
{ USB_DEVICE(0x1BA4, 0x0002) }, /* Silicon Labs 358x factory default */
|
||||
{ USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */
|
||||
{ USB_DEVICE(0x1D6F, 0x0010) }, /* Seluxit ApS RF Dongle */
|
||||
{ USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */
|
||||
|
@ -140,6 +140,7 @@ static struct ftdi_sio_quirk ftdi_8u2232c_quirk = {
|
||||
* /sys/bus/usb-serial/drivers/ftdi_sio/new_id and send a patch or report.
|
||||
*/
|
||||
static const struct usb_device_id id_table_combined[] = {
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_BRICK_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_ZEITCONTROL_TAGTRACE_MIFARE_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_CTI_MINI_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_CTI_NANO_PID) },
|
||||
@ -661,6 +662,8 @@ static const struct usb_device_id id_table_combined[] = {
|
||||
{ USB_DEVICE(FTDI_VID, XSENS_CONVERTER_5_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, XSENS_CONVERTER_6_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, XSENS_CONVERTER_7_PID) },
|
||||
{ USB_DEVICE(XSENS_VID, XSENS_AWINDA_DONGLE_PID) },
|
||||
{ USB_DEVICE(XSENS_VID, XSENS_AWINDA_STATION_PID) },
|
||||
{ USB_DEVICE(XSENS_VID, XSENS_CONVERTER_PID) },
|
||||
{ USB_DEVICE(XSENS_VID, XSENS_MTW_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_OMNI1509) },
|
||||
|
@ -30,6 +30,12 @@
|
||||
|
||||
/*** third-party PIDs (using FTDI_VID) ***/
|
||||
|
||||
/*
|
||||
* Certain versions of the official Windows FTDI driver reprogrammed
|
||||
* counterfeit FTDI devices to PID 0. Support these devices anyway.
|
||||
*/
|
||||
#define FTDI_BRICK_PID 0x0000
|
||||
|
||||
#define FTDI_LUMEL_PD12_PID 0x6002
|
||||
|
||||
/*
|
||||
@ -143,8 +149,12 @@
|
||||
* Xsens Technologies BV products (http://www.xsens.com).
|
||||
*/
|
||||
#define XSENS_VID 0x2639
|
||||
#define XSENS_CONVERTER_PID 0xD00D /* Xsens USB-serial converter */
|
||||
#define XSENS_AWINDA_STATION_PID 0x0101
|
||||
#define XSENS_AWINDA_DONGLE_PID 0x0102
|
||||
#define XSENS_MTW_PID 0x0200 /* Xsens MTw */
|
||||
#define XSENS_CONVERTER_PID 0xD00D /* Xsens USB-serial converter */
|
||||
|
||||
/* Xsens devices using FTDI VID */
|
||||
#define XSENS_CONVERTER_0_PID 0xD388 /* Xsens USB converter */
|
||||
#define XSENS_CONVERTER_1_PID 0xD389 /* Xsens Wireless Receiver */
|
||||
#define XSENS_CONVERTER_2_PID 0xD38A
|
||||
|
@ -414,8 +414,6 @@ static int kobil_tiocmset(struct tty_struct *tty,
|
||||
int result;
|
||||
int dtr = 0;
|
||||
int rts = 0;
|
||||
unsigned char *transfer_buffer;
|
||||
int transfer_buffer_length = 8;
|
||||
|
||||
/* FIXME: locking ? */
|
||||
priv = usb_get_serial_port_data(port);
|
||||
@ -425,11 +423,6 @@ static int kobil_tiocmset(struct tty_struct *tty,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* allocate memory for transfer buffer */
|
||||
transfer_buffer = kzalloc(transfer_buffer_length, GFP_KERNEL);
|
||||
if (!transfer_buffer)
|
||||
return -ENOMEM;
|
||||
|
||||
if (set & TIOCM_RTS)
|
||||
rts = 1;
|
||||
if (set & TIOCM_DTR)
|
||||
@ -469,7 +462,6 @@ static int kobil_tiocmset(struct tty_struct *tty,
|
||||
KOBIL_TIMEOUT);
|
||||
}
|
||||
dev_dbg(dev, "%s - Send set_status_line URB returns: %i\n", __func__, result);
|
||||
kfree(transfer_buffer);
|
||||
return (result < 0) ? result : 0;
|
||||
}
|
||||
|
||||
@ -530,8 +522,6 @@ static int kobil_ioctl(struct tty_struct *tty,
|
||||
{
|
||||
struct usb_serial_port *port = tty->driver_data;
|
||||
struct kobil_private *priv = usb_get_serial_port_data(port);
|
||||
unsigned char *transfer_buffer;
|
||||
int transfer_buffer_length = 8;
|
||||
int result;
|
||||
|
||||
if (priv->device_type == KOBIL_USBTWIN_PRODUCT_ID ||
|
||||
@ -541,10 +531,6 @@ static int kobil_ioctl(struct tty_struct *tty,
|
||||
|
||||
switch (cmd) {
|
||||
case TCFLSH:
|
||||
transfer_buffer = kmalloc(transfer_buffer_length, GFP_KERNEL);
|
||||
if (!transfer_buffer)
|
||||
return -ENOBUFS;
|
||||
|
||||
result = usb_control_msg(port->serial->dev,
|
||||
usb_sndctrlpipe(port->serial->dev, 0),
|
||||
SUSBCRequest_Misc,
|
||||
@ -559,7 +545,6 @@ static int kobil_ioctl(struct tty_struct *tty,
|
||||
dev_dbg(&port->dev,
|
||||
"%s - Send reset_all_queues (FLUSH) URB returns: %i\n",
|
||||
__func__, result);
|
||||
kfree(transfer_buffer);
|
||||
return (result < 0) ? -EIO: 0;
|
||||
default:
|
||||
return -ENOIOCTLCMD;
|
||||
|
@ -269,6 +269,7 @@ static void option_instat_callback(struct urb *urb);
|
||||
#define TELIT_PRODUCT_DE910_DUAL 0x1010
|
||||
#define TELIT_PRODUCT_UE910_V2 0x1012
|
||||
#define TELIT_PRODUCT_LE920 0x1200
|
||||
#define TELIT_PRODUCT_LE910 0x1201
|
||||
|
||||
/* ZTE PRODUCTS */
|
||||
#define ZTE_VENDOR_ID 0x19d2
|
||||
@ -362,6 +363,7 @@ static void option_instat_callback(struct urb *urb);
|
||||
|
||||
/* Haier products */
|
||||
#define HAIER_VENDOR_ID 0x201e
|
||||
#define HAIER_PRODUCT_CE81B 0x10f8
|
||||
#define HAIER_PRODUCT_CE100 0x2009
|
||||
|
||||
/* Cinterion (formerly Siemens) products */
|
||||
@ -589,6 +591,11 @@ static const struct option_blacklist_info zte_1255_blacklist = {
|
||||
.reserved = BIT(3) | BIT(4),
|
||||
};
|
||||
|
||||
static const struct option_blacklist_info telit_le910_blacklist = {
|
||||
.sendsetup = BIT(0),
|
||||
.reserved = BIT(1) | BIT(2),
|
||||
};
|
||||
|
||||
static const struct option_blacklist_info telit_le920_blacklist = {
|
||||
.sendsetup = BIT(0),
|
||||
.reserved = BIT(1) | BIT(5),
|
||||
@ -1138,6 +1145,8 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_SINGLE) },
|
||||
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_DE910_DUAL) },
|
||||
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UE910_V2) },
|
||||
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910),
|
||||
.driver_info = (kernel_ulong_t)&telit_le910_blacklist },
|
||||
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920),
|
||||
.driver_info = (kernel_ulong_t)&telit_le920_blacklist },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */
|
||||
@ -1621,6 +1630,7 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE(LONGCHEER_VENDOR_ID, ZOOM_PRODUCT_4597) },
|
||||
{ USB_DEVICE(LONGCHEER_VENDOR_ID, IBALL_3_5G_CONNECT) },
|
||||
{ USB_DEVICE(HAIER_VENDOR_ID, HAIER_PRODUCT_CE100) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(HAIER_VENDOR_ID, HAIER_PRODUCT_CE81B, 0xff, 0xff, 0xff) },
|
||||
/* Pirelli */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_1, 0xff) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_2, 0xff) },
|
||||
|
Loading…
Reference in New Issue
Block a user