* [PATCH 1/6] pty: Fix documentation
@ 2009-01-11 19:46 Alan Cox
0 siblings, 0 replies; 7+ messages in thread
From: Alan Cox @ 2009-01-11 19:46 UTC (permalink / raw)
To: torvalds, linux-serial
From: Alan Cox <alan@redhat.com>
The pty changes and updates for window sizing forgot to correct the
kerneldoc
Signed-off-by: Alan Cox <alan@redhat.com>
---
drivers/char/pty.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/char/pty.c b/drivers/char/pty.c
index 146c976..31038a0 100644
--- a/drivers/char/pty.c
+++ b/drivers/char/pty.c
@@ -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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 0/6] Series short description
@ 2009-01-11 19:48 Alan Cox
2009-01-11 19:48 ` [PATCH 1/6] pty: Fix documentation Alan Cox
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Alan Cox @ 2009-01-11 19:48 UTC (permalink / raw)
To: torvalds, linux-serial
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 firmware
drivers/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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/6] pty: Fix documentation
2009-01-11 19:48 [PATCH 0/6] Series short description Alan Cox
@ 2009-01-11 19:48 ` Alan Cox
2009-01-11 19:48 ` [PATCH 2/6] neo: Remove a bogus NULL check Alan Cox
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Alan Cox @ 2009-01-11 19:48 UTC (permalink / raw)
To: torvalds, linux-serial
From: Alan Cox <alan@redhat.com>
The pty changes and updates for window sizing forgot to correct the
kerneldoc
Signed-off-by: Alan Cox <alan@redhat.com>
---
drivers/char/pty.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/char/pty.c b/drivers/char/pty.c
index 146c976..31038a0 100644
--- a/drivers/char/pty.c
+++ b/drivers/char/pty.c
@@ -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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/6] neo: Remove a bogus NULL check
2009-01-11 19:48 [PATCH 0/6] Series short description Alan Cox
2009-01-11 19:48 ` [PATCH 1/6] pty: Fix documentation Alan Cox
@ 2009-01-11 19:48 ` Alan Cox
2009-01-11 19:48 ` [PATCH 3/6] usb-serial: remove " Alan Cox
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Alan Cox @ 2009-01-11 19:48 UTC (permalink / raw)
To: torvalds, linux-serial
From: Alan Cox <alan@redhat.com>
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.
Signed-off-by: Alan Cox <alan@redhat.com>
---
drivers/serial/jsm/jsm_neo.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/drivers/serial/jsm/jsm_neo.c b/drivers/serial/jsm/jsm_neo.c
index b7584ca..e6390d0 100644
--- a/drivers/serial/jsm/jsm_neo.c
+++ b/drivers/serial/jsm/jsm_neo.c
@@ -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;
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/6] usb-serial: remove NULL check
2009-01-11 19:48 [PATCH 0/6] Series short description Alan Cox
2009-01-11 19:48 ` [PATCH 1/6] pty: Fix documentation Alan Cox
2009-01-11 19:48 ` [PATCH 2/6] neo: Remove a bogus NULL check Alan Cox
@ 2009-01-11 19:48 ` Alan Cox
2009-01-11 19:48 ` [PATCH 4/6] ti_usb_3410_5052: support alternate firmware Alan Cox
2009-01-11 19:49 ` [PATCH 5/6] ti_usb_3410_5052: add Multi-Tech modem support Alan Cox
4 siblings, 0 replies; 7+ messages in thread
From: Alan Cox @ 2009-01-11 19:48 UTC (permalink / raw)
To: torvalds, linux-serial
From: Alan Cox <alan@redhat.com>
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.
Signed-off-by: Alan Cox <alan@redhat.com>
---
drivers/usb/serial/usb-serial.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 080ade2..cfcfd5a 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -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;
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/6] ti_usb_3410_5052: support alternate firmware
2009-01-11 19:48 [PATCH 0/6] Series short description Alan Cox
` (2 preceding siblings ...)
2009-01-11 19:48 ` [PATCH 3/6] usb-serial: remove " Alan Cox
@ 2009-01-11 19:48 ` Alan Cox
2009-01-11 19:49 ` [PATCH 5/6] ti_usb_3410_5052: add Multi-Tech modem support Alan Cox
4 siblings, 0 replies; 7+ messages in thread
From: Alan Cox @ 2009-01-11 19:48 UTC (permalink / raw)
To: torvalds, linux-serial
From: Chris Adams <cmadams@hiwaay.net>
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.
Signed-off-by: Chris Adams <cmadams@hiwaay.net>
Signed-off-by: Alan Cox <alan@redhat.com>
---
drivers/usb/serial/ti_usb_3410_5052.c | 44 ++++++++++++++++++++++-----------
1 files changed, 29 insertions(+), 15 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
index 01d0c70..1cdb151 100644
--- a/drivers/usb/serial/ti_usb_3410_5052.c
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
@@ -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) {
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/6] ti_usb_3410_5052: add Multi-Tech modem support
2009-01-11 19:48 [PATCH 0/6] Series short description Alan Cox
` (3 preceding siblings ...)
2009-01-11 19:48 ` [PATCH 4/6] ti_usb_3410_5052: support alternate firmware Alan Cox
@ 2009-01-11 19:49 ` Alan Cox
4 siblings, 0 replies; 7+ messages in thread
From: Alan Cox @ 2009-01-11 19:49 UTC (permalink / raw)
To: torvalds, linux-serial
From: Chris Adams <cmadams@hiwaay.net>
Add Multi-Tech cellular modem support to the ti_usb_3410_5052 driver.
Signed-off-by: Chris Adams <cmadams@hiwaay.net>
Signed-off-by: Alan Cox <alan@redhat.com>
---
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(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
index 1cdb151..dbae994 100644
--- a/drivers/usb/serial/ti_usb_3410_5052.c
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
@@ -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) {
diff --git a/drivers/usb/serial/ti_usb_3410_5052.h b/drivers/usb/serial/ti_usb_3410_5052.h
index b5541bf..7e4752f 100644
--- a/drivers/usb/serial/ti_usb_3410_5052.h
+++ b/drivers/usb/serial/ti_usb_3410_5052.h
@@ -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
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-01-11 19:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-11 19:48 [PATCH 0/6] Series short description Alan Cox
2009-01-11 19:48 ` [PATCH 1/6] pty: Fix documentation Alan Cox
2009-01-11 19:48 ` [PATCH 2/6] neo: Remove a bogus NULL check Alan Cox
2009-01-11 19:48 ` [PATCH 3/6] usb-serial: remove " Alan Cox
2009-01-11 19:48 ` [PATCH 4/6] ti_usb_3410_5052: support alternate firmware Alan Cox
2009-01-11 19:49 ` [PATCH 5/6] ti_usb_3410_5052: add Multi-Tech modem support Alan Cox
-- strict thread matches above, loose matches on Subject: below --
2009-01-11 19:46 [PATCH 1/6] pty: Fix documentation Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox