Series short description
Subsystems (4)
cover Series short description
These are some small fixes that didn't quite make the window. Nothing big here except in file size. The ti_usb_3410 changes fix a bug in the id handling code and add support for the mts chips - the handling of the rest isn't changed.
The other bits remove two bogus NULL checks and fix the pty kerneldoc before Randy Dunlap notices ;)
---
Alan Cox (3):
usb-serial: remove NULL check
neo: Remove a bogus NULL check
pty: Fix documentation
Chris Adams (3):
ti_usb_3410_5052: add Multi-Tech firmware
ti_usb_3410_5052: add Multi-Tech modem support
ti_usb_3410_5052: support alternate firmwaredrivers/char/pty.c | 4 drivers/serial/jsm/jsm_neo.c | 3 drivers/usb/serial/ti_usb_3410_5052.c | 73 ++- drivers/usb/serial/ti_usb_3410_5052.h | 8 drivers/usb/serial/usb-serial.c | 3 firmware/Makefile | 3 firmware/WHENCE | 16 + firmware/mts_cdma.fw.ihex | 867 ++++++++++++++++++++++++++++++++ firmware/mts_edge.fw.ihex | 881 +++++++++++++++++++++++++++++++++ firmware/mts_gsm.fw.ihex | 867 ++++++++++++++++++++++++++++++++ 10 files changed, 2699 insertions(+), 26 deletions(-) create mode 100644 firmware/mts_cdma.fw.ihex create mode 100644 firmware/mts_edge.fw.ihex create mode 100644 firmware/mts_gsm.fw.ihex
Signature · 1 line
Signature
PATCH 1/6 pty: Fix documentation
From: Alan Cox <[email protected]>
The pty changes and updates for window sizing forgot to correct the kerneldoc
---
drivers/char/pty.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/char/pty.c +1 -3
@@ -230,9 +230,7 @@ static void pty_set_termios(struct tty_struct *tty,/** * pty_do_resize - resize event * @tty: tty being resized -* @real_tty: real tty (not the same as tty if using a pty/tty pair) -* @rows: rows (character) -* @cols: cols (character) +* @ws: window size being set. * * Update the termios variables and send the neccessary signals to * peform a terminal resize correctly
PATCH 2/6 neo: Remove a bogus NULL check
In reply to Alan CoxFrom: Alan Cox <[email protected]>
Julia Lawall found an un-needed check in the neo driver. Her patch moves the check to cover the code dereferencing it, however it cannot be NULL anyway so remove the NULL check instead.
---
drivers/serial/jsm/jsm_neo.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
drivers/serial/jsm/jsm_neo.c +0 -3
@@ -577,9 +577,6 @@ static void neo_parse_modem(struct jsm_channel *ch, u8 signals)jsm_printk (MSIGS ,INFO , &ch->ch_bd->pci_dev,"neo_parse_modem: port: %d msignals: %x\n" , ch->ch_portnum, msignals); -if (!ch) -return ; -/* Scrub off lower bits. They signify delta's, which I don't care about */ /* Keep DDCD and DDSR though */ msignals &=0xf8 ;
PATCH 3/6 usb-serial: remove NULL check
In reply to Alan CoxFrom: Alan Cox <[email protected]>
Julia Lawell found a case where a NULL check was misplaced in the usb-serial code. However as the object in question cannot be NULL the check can simply be removed.
---
drivers/usb/serial/usb-serial.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
drivers/usb/serial/usb-serial.c +0 -3
@@ -511,9 +511,6 @@ static void usb_serial_port_work(struct work_struct *work)dbg ("%s - port %d" , __func__, port->number); -if (!port) -return ; - tty =tty_port_tty_get (&port->port);if (!tty)return ;
PATCH 4/6 ti_usb_3410_5052: support alternate firmware
In reply to Alan CoxFrom: Chris Adams <[email protected]>
The TI USB serial driver supports specifying alternate vendor and product IDs (since the chips can and are used in devices under other vendor/product IDs). However, the alternate IDs were not loaded in the combined product table. This patch also adds support for loading alternate firmware for alternate vendor/product IDs.
---
drivers/usb/serial/ti_usb_3410_5052.c | 44 ++++++++++++++++++++++----------- 1 files changed, 29 insertions(+), 15 deletions(-)
drivers/usb/serial/ti_usb_3410_5052.c +29 -15
@@ -145,7 +145,7 @@ static int ti_command_in_sync(struct ti_device *tdev, __u8 command,static int ti_write_byte (struct ti_device *tdev,unsigned long addr,__u8 mask,__u8 byte); -static int ti_download_firmware (struct ti_device *tdev,int type); +static int ti_download_firmware (struct ti_device *tdev);/* circular buffer */ static struct circ_buf *ti_buf_alloc (void );
@@ -176,7 +176,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[1 +TI_EXTRA_VID_PID_COUNT +1 ] = { +static struct usb_device_id ti_id_table_3410[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 ) }, };
@@ -188,7 +188,7 @@ static struct usb_device_id ti_id_table_5052[4+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[] = { +static struct usb_device_id ti_id_table_combined[6 +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(TI_VENDOR_ID, TI_5052_BOOT_PRODUCT_ID) },
@@ -304,21 +304,28 @@ MODULE_DEVICE_TABLE(usb, ti_id_table_combined);static int __init ti_init (void ) { -int i, j; +int i, j, c;int ret;/* insert extra vendor and product ids */ + c =ARRAY_SIZE (ti_id_table_combined) -2 *TI_EXTRA_VID_PID_COUNT -1 ; j =ARRAY_SIZE (ti_id_table_3410) -TI_EXTRA_VID_PID_COUNT -1 ; -for (i =0 ; i <min (vendor_3410_count, product_3410_count); i++, j++) { +for (i =0 ; i <min (vendor_3410_count, product_3410_count); i++, j++, c++) { ti_id_table_3410[j].idVendor = vendor_3410[i]; ti_id_table_3410[j].idProduct = product_3410[i]; ti_id_table_3410[j].match_flags =USB_DEVICE_ID_MATCH_DEVICE ; + ti_id_table_combined[c].idVendor = vendor_3410[i]; + ti_id_table_combined[c].idProduct = product_3410[i]; + ti_id_table_combined[c].match_flags =USB_DEVICE_ID_MATCH_DEVICE ; } j =ARRAY_SIZE (ti_id_table_5052) -TI_EXTRA_VID_PID_COUNT -1 ; -for (i =0 ; i <min (vendor_5052_count, product_5052_count); i++, j++) { +for (i =0 ; i <min (vendor_5052_count, product_5052_count); i++, j++, c++) { ti_id_table_5052[j].idVendor = vendor_5052[i]; ti_id_table_5052[j].idProduct = product_5052[i]; ti_id_table_5052[j].match_flags =USB_DEVICE_ID_MATCH_DEVICE ; + ti_id_table_combined[c].idVendor = vendor_5052[i]; + ti_id_table_combined[c].idProduct = product_5052[i]; + ti_id_table_combined[c].match_flags =USB_DEVICE_ID_MATCH_DEVICE ; } ret =usb_serial_register (&ti_1port_device);
@@ -390,11 +397,7 @@ static int ti_startup(struct usb_serial *serial)/* if we have only 1 configuration, download firmware */ if (dev->descriptor.bNumConfigurations ==1 ) { -if (tdev->td_is_3410) - status =ti_download_firmware (tdev,3410 ); -else - status =ti_download_firmware (tdev,5052 ); -if (status) +if ((status =ti_download_firmware (tdev)) !=0 ) goto free_tdev;/* 3410 must be reset, 5052 resets itself */
@@ -1671,9 +1674,9 @@ static int ti_do_download(struct usb_device *dev, int pipe,return status; } -static int ti_download_firmware (struct ti_device *tdev,int type) +static int ti_download_firmware (struct ti_device *tdev) { -int status = -ENOMEM ; +int status;int buffer_size;__u8 *buffer;struct usb_device *dev = tdev->td_serial->dev;
@@ -1681,9 +1684,18 @@ static int ti_download_firmware(struct ti_device *tdev, int type) tdev->td_serial->port[0]->bulk_out_endpointAddress);const struct firmware *fw_p;char buf[32 ]; -sprintf (buf,"ti_usb-%d.bin" , type); -if (request_firmware (&fw_p, buf, &dev->dev)) { +/* try ID specific firmware first, then try generic firmware */ +sprintf (buf,"ti_usb-v%04x-p%04x.fw" , dev->descriptor.idVendor, + dev->descriptor.idProduct); +if ((status =request_firmware (&fw_p, buf, &dev->dev)) !=0 ) { +if (tdev->td_is_3410) +strcpy (buf,"ti_3410.fw" ); +else +strcpy (buf,"ti_5052.fw" ); + status =request_firmware (&fw_p, buf, &dev->dev); + } +if (status) {dev_err (&dev->dev,"%s - firmware not found\n" , __func__);return -ENOENT ; }
@@ -1699,6 +1711,8 @@ static int ti_download_firmware(struct ti_device *tdev, int type)memset (buffer + fw_p->size,0xff , buffer_size - fw_p->size); status =ti_do_download (dev, pipe, buffer, fw_p->size);kfree (buffer); + }else { + status = -ENOMEM ; }release_firmware (fw_p);if (status) {
PATCH 5/6 ti_usb_3410_5052: add Multi-Tech modem support
In reply to Alan CoxFrom: Chris Adams <[email protected]>
Add Multi-Tech cellular modem support to the ti_usb_3410_5052 driver.
---
drivers/usb/serial/ti_usb_3410_5052.c | 36 ++++++++++++++++++++++++++++----- drivers/usb/serial/ti_usb_3410_5052.h | 8 +++++++ 2 files changed, 39 insertions(+), 5 deletions(-)
drivers/usb/serial/ti_usb_3410_5052.c +31 -5
@@ -176,9 +176,14 @@ 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[2 +TI_EXTRA_VID_PID_COUNT +1 ] = { +static struct usb_device_id ti_id_table_3410[7 +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 ) }, + {USB_DEVICE (MTS_VENDOR_ID ,MTS_CDMA_NO_FW_PRODUCT_ID ) }, + {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 ) }, };static struct usb_device_id ti_id_table_5052[4 +TI_EXTRA_VID_PID_COUNT +1 ] = {
@@ -191,6 +196,11 @@ static struct usb_device_id ti_id_table_5052[4+TI_EXTRA_VID_PID_COUNT+1] = {static struct usb_device_id ti_id_table_combined[6 +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 ) }, + {USB_DEVICE (MTS_VENDOR_ID ,MTS_CDMA_NO_FW_PRODUCT_ID ) }, + {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 (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 ) },
@@ -1689,10 +1699,26 @@ static int ti_download_firmware(struct ti_device *tdev)sprintf (buf,"ti_usb-v%04x-p%04x.fw" , dev->descriptor.idVendor, dev->descriptor.idProduct);if ((status =request_firmware (&fw_p, buf, &dev->dev)) !=0 ) { -if (tdev->td_is_3410) -strcpy (buf,"ti_3410.fw" ); -else -strcpy (buf,"ti_5052.fw" ); + buf[0 ] ='\0' ; +if (dev->descriptor.idVendor ==MTS_VENDOR_ID ) { +switch (dev->descriptor.idProduct) { +case MTS_CDMA_PRODUCT_ID : +strcpy (buf,"mts_cdma.fw" ); +break ; +case MTS_GSM_PRODUCT_ID : +strcpy (buf,"mts_gsm.fw" ); +break ; +case MTS_EDGE_PRODUCT_ID : +strcpy (buf,"mts_edge.fw" ); +break ; + } + } +if (buf[0 ] =='\0' ) { +if (tdev->td_is_3410) +strcpy (buf,"ti_3410.fw" ); +else +strcpy (buf,"ti_5052.fw" ); + } status =request_firmware (&fw_p, buf, &dev->dev); }if (status) {
drivers/usb/serial/ti_usb_3410_5052.h +8 -0
@@ -34,6 +34,14 @@#define TI_5052_EEPROM_PRODUCT_ID 0x505A/* EEPROM, no firmware */ #define TI_5052_FIRMWARE_PRODUCT_ID 0x505F/* firmware is running */ +/* Multi-Tech vendor and product ids */ +#define MTS_VENDOR_ID 0x06E0 +#define MTS_GSM_NO_FW_PRODUCT_ID 0xF108 +#define MTS_CDMA_NO_FW_PRODUCT_ID 0xF109 +#define MTS_CDMA_PRODUCT_ID 0xF110 +#define MTS_GSM_PRODUCT_ID 0xF111 +#define MTS_EDGE_PRODUCT_ID 0xF112 +/* Commands */ #define TI_GET_VERSION 0x01#define TI_GET_PORT_STATUS 0x02