diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-17 14:51:12 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-17 14:51:12 -0800 |
commit | 315a8bf8f699a49fa0776eef151ebf086278d441 (patch) | |
tree | b231d460acb2bc21245ce0f6b0b496ffeedc9e56 /usb | |
parent | 31b40935a7b27f690d87143caf47148d72c80997 (diff) | |
download | patches-315a8bf8f699a49fa0776eef151ebf086278d441.tar.gz |
usb, pci and kobject patches
Diffstat (limited to 'usb')
-rw-r--r-- | usb/navman-usb-serial.patch | 198 | ||||
-rw-r--r-- | usb/usb-cp2101-add-new-device-ids.patch | 37 | ||||
-rw-r--r-- | usb/usb-fix-irda-usb-use-after-use.patch | 47 | ||||
-rw-r--r-- | usb/usb-ftdi_sio-add-icom-id1-usb-product-and-vendor-ids.patch | 50 | ||||
-rw-r--r-- | usb/usb-rtl8150-small-fix.patch | 37 |
5 files changed, 369 insertions, 0 deletions
diff --git a/usb/navman-usb-serial.patch b/usb/navman-usb-serial.patch new file mode 100644 index 0000000000000..3d51e986cdc0e --- /dev/null +++ b/usb/navman-usb-serial.patch @@ -0,0 +1,198 @@ +From: Greg Kroah-Hartman <gregkh@suse.de> +Subject: USB serial: add navman driver + + +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/Kconfig | 7 + + drivers/usb/serial/Makefile | 1 + drivers/usb/serial/navman.c | 157 ++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 165 insertions(+) + +--- gregkh-2.6.orig/drivers/usb/serial/Kconfig ++++ gregkh-2.6/drivers/usb/serial/Kconfig +@@ -403,6 +403,13 @@ config USB_SERIAL_MCT_U232 + To compile this driver as a module, choose M here: the + module will be called mct_u232. + ++config USB_SERIAL_NAVMAN ++ tristate "USB Navman GPS device" ++ depends on USB_SERIAL ++ help ++ To compile this driver as a module, choose M here: the ++ module will be called navman. ++ + config USB_SERIAL_PL2303 + tristate "USB Prolific 2303 Single Port Serial Driver" + depends on USB_SERIAL +--- gregkh-2.6.orig/drivers/usb/serial/Makefile ++++ gregkh-2.6/drivers/usb/serial/Makefile +@@ -32,6 +32,7 @@ obj-$(CONFIG_USB_SERIAL_KEYSPAN_PDA) += + obj-$(CONFIG_USB_SERIAL_KLSI) += kl5kusb105.o + obj-$(CONFIG_USB_SERIAL_KOBIL_SCT) += kobil_sct.o + obj-$(CONFIG_USB_SERIAL_MCT_U232) += mct_u232.o ++obj-$(CONFIG_USB_SERIAL_NAVMAN) += navman.o + obj-$(CONFIG_USB_SERIAL_OMNINET) += omninet.o + obj-$(CONFIG_USB_SERIAL_OPTION) += option.o + obj-$(CONFIG_USB_SERIAL_PL2303) += pl2303.o +--- /dev/null ++++ gregkh-2.6/drivers/usb/serial/navman.c +@@ -0,0 +1,157 @@ ++/* ++ * Navman Serial USB driver ++ * ++ * Copyright (C) 2006 Greg Kroah-Hartman <gregkh@suse.de> ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ */ ++ ++#include <linux/kernel.h> ++#include <linux/init.h> ++#include <linux/tty.h> ++#include <linux/tty_flip.h> ++#include <linux/module.h> ++#include <linux/usb.h> ++#include "usb-serial.h" ++ ++static int debug; ++ ++static struct usb_device_id id_table [] = { ++ { USB_DEVICE(0x0a99, 0x0001) }, /* Talon Technology device */ ++ { }, ++}; ++MODULE_DEVICE_TABLE(usb, id_table); ++ ++static struct usb_driver navman_driver = { ++ .name = "navman", ++ .probe = usb_serial_probe, ++ .disconnect = usb_serial_disconnect, ++ .id_table = id_table, ++ .no_dynamic_id = 1, ++}; ++ ++static void navman_read_int_callback(struct urb *urb, struct pt_regs *regs) ++{ ++ struct usb_serial_port *port = urb->context; ++ unsigned char *data = urb->transfer_buffer; ++ struct tty_struct *tty; ++ int result; ++ ++ switch (urb->status) { ++ case 0: ++ /* success */ ++ break; ++ case -ECONNRESET: ++ case -ENOENT: ++ case -ESHUTDOWN: ++ /* this urb is terminated, clean up */ ++ dbg("%s - urb shutting down with status: %d", ++ __FUNCTION__, urb->status); ++ return; ++ default: ++ dbg("%s - nonzero urb status received: %d", ++ __FUNCTION__, urb->status); ++ goto exit; ++ } ++ ++ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, ++ urb->actual_length, data); ++ ++ tty = port->tty; ++ if (tty && urb->actual_length) { ++ tty_buffer_request_room(tty, urb->actual_length); ++ tty_insert_flip_string(tty, data, urb->actual_length); ++ tty_flip_buffer_push(tty); ++ } ++ ++exit: ++ result = usb_submit_urb(urb, GFP_ATOMIC); ++ if (result) ++ dev_err(&urb->dev->dev, ++ "%s - Error %d submitting interrupt urb\n", ++ __FUNCTION__, result); ++} ++ ++static int navman_open(struct usb_serial_port *port, struct file *filp) ++{ ++ int result = 0; ++ ++ dbg("%s - port %d", __FUNCTION__, port->number); ++ ++ if (port->interrupt_in_urb) { ++ dbg("%s - adding interrupt input for treo", __FUNCTION__); ++ result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); ++ if (result) ++ dev_err(&port->dev, ++ "%s - failed submitting interrupt urb, error %d\n", ++ __FUNCTION__, result); ++ } ++ return result; ++} ++ ++static void navman_close(struct usb_serial_port *port, struct file *filp) ++{ ++ dbg("%s - port %d", __FUNCTION__, port->number); ++ ++ if (port->interrupt_in_urb) ++ usb_kill_urb(port->interrupt_in_urb); ++} ++ ++static int navman_write(struct usb_serial_port *port, ++ const unsigned char *buf, int count) ++{ ++ dbg("%s - port %d", __FUNCTION__, port->number); ++ ++ /* ++ * This device can't write any data, only read from the device ++ * so we just silently eat all data sent to us and say it was ++ * successfully sent. ++ * Evil, I know, but do you have a better idea? ++ */ ++ ++ return count; ++} ++ ++static struct usb_serial_driver navman_device = { ++ .driver = { ++ .owner = THIS_MODULE, ++ .name = "navman", ++ }, ++ .id_table = id_table, ++ .num_interrupt_in = NUM_DONT_CARE, ++ .num_bulk_in = NUM_DONT_CARE, ++ .num_bulk_out = NUM_DONT_CARE, ++ .num_ports = 1, ++ .open = navman_open, ++ .close = navman_close, ++ .write = navman_write, ++ .read_int_callback = navman_read_int_callback, ++}; ++ ++static int __init navman_init(void) ++{ ++ int retval; ++ ++ retval = usb_serial_register(&navman_device); ++ if (retval) ++ return retval; ++ retval = usb_register(&navman_driver); ++ if (retval) ++ usb_serial_deregister(&navman_device); ++ return retval; ++} ++ ++static void __exit navman_exit(void) ++{ ++ usb_deregister(&navman_driver); ++ usb_serial_deregister(&navman_device); ++} ++ ++module_init(navman_init); ++module_exit(navman_exit); ++MODULE_LICENSE("GPL"); ++ ++module_param(debug, bool, S_IRUGO | S_IWUSR); ++MODULE_PARM_DESC(debug, "Debug enabled or not"); diff --git a/usb/usb-cp2101-add-new-device-ids.patch b/usb/usb-cp2101-add-new-device-ids.patch new file mode 100644 index 0000000000000..e7dbd888bffbc --- /dev/null +++ b/usb/usb-cp2101-add-new-device-ids.patch @@ -0,0 +1,37 @@ +From craig@microtron.org.uk Sat Mar 11 03:26:16 2006 +From: Craig Shelley <craig@microtron.org.uk> +Subject: USB: cp2101: add new device IDs +To: linux-usb-devel@lists.sourceforge.net +Cc: Greg KH <greg@kroah.com> +Date: Sat, 11 Mar 2006 11:29:02 +0000 +Message-Id: <1142076542.19343.30.camel@teratron.lan.etheus.net> + +This patch adds a new device ID to the cp2101 driver + +Signed-off-by: Craig Shelley <craig@microtron.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + + +--- + drivers/usb/serial/cp2101.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- gregkh-2.6.orig/drivers/usb/serial/cp2101.c ++++ gregkh-2.6/drivers/usb/serial/cp2101.c +@@ -32,7 +32,7 @@ + /* + * Version Information + */ +-#define DRIVER_VERSION "v0.06" ++#define DRIVER_VERSION "v0.07" + #define DRIVER_DESC "Silicon Labs CP2101/CP2102 RS232 serial adaptor driver" + + /* +@@ -58,6 +58,7 @@ static struct usb_device_id id_table [] + { USB_DEVICE(0x10A6, 0xAA26) }, /* Knock-off DCU-11 cable */ + { USB_DEVICE(0x10AB, 0x10C5) }, /* Siemens MC60 Cable */ + { USB_DEVICE(0x10B5, 0xAC70) }, /* Nokia CA-42 USB */ ++ { USB_DEVICE(0x10C4, 0x803B) }, /* Pololu USB-serial converter */ + { USB_DEVICE(0x10C4, 0x807A) }, /* Crumb128 board */ + { USB_DEVICE(0x10C4, 0x80CA) }, /* Degree Controls Inc */ + { USB_DEVICE(0x10C4, 0x80F6) }, /* Suunto sports instrument */ diff --git a/usb/usb-fix-irda-usb-use-after-use.patch b/usb/usb-fix-irda-usb-use-after-use.patch new file mode 100644 index 0000000000000..68dd9debca1eb --- /dev/null +++ b/usb/usb-fix-irda-usb-use-after-use.patch @@ -0,0 +1,47 @@ +From akpm@osdl.org Wed Mar 15 14:55:13 2006 +Message-Id: <200603152255.k2FMt0sE006736@shell0.pdx.osdl.net> +From: Eugene Teo <eugene.teo@eugeneteo.net> +Subject: USB: Fix irda-usb use after use +To: eugene.teo@eugeneteo.net, davem@davemloft.net, greg@kroah.com +Date: Wed, 15 Mar 2006 14:57:19 -0800 + +From: Eugene Teo <eugene.teo@eugeneteo.net> + +Don't read from free'd memory after calling netif_rx(). docopy is used as +a boolean (0 and 1) so unsigned int is sufficient. + +Coverity bug #928 + +Signed-off-by: Eugene Teo <eugene.teo@eugeneteo.net> +Cc: "David S. Miller" <davem@davemloft.net> +Signed-off-by: Andrew Morton <akpm@osdl.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + + drivers/net/irda/irda-usb.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- gregkh-2.6.orig/drivers/net/irda/irda-usb.c ++++ gregkh-2.6/drivers/net/irda/irda-usb.c +@@ -740,7 +740,7 @@ static void irda_usb_receive(struct urb + struct sk_buff *newskb; + struct sk_buff *dataskb; + struct urb *next_urb; +- int docopy; ++ unsigned int len, docopy; + + IRDA_DEBUG(2, "%s(), len=%d\n", __FUNCTION__, urb->actual_length); + +@@ -851,10 +851,11 @@ static void irda_usb_receive(struct urb + dataskb->dev = self->netdev; + dataskb->mac.raw = dataskb->data; + dataskb->protocol = htons(ETH_P_IRDA); ++ len = dataskb->len; + netif_rx(dataskb); + + /* Keep stats up to date */ +- self->stats.rx_bytes += dataskb->len; ++ self->stats.rx_bytes += len; + self->stats.rx_packets++; + self->netdev->last_rx = jiffies; + diff --git a/usb/usb-ftdi_sio-add-icom-id1-usb-product-and-vendor-ids.patch b/usb/usb-ftdi_sio-add-icom-id1-usb-product-and-vendor-ids.patch new file mode 100644 index 0000000000000..68a4802b110d3 --- /dev/null +++ b/usb/usb-ftdi_sio-add-icom-id1-usb-product-and-vendor-ids.patch @@ -0,0 +1,50 @@ +From bottoms@airborne.nrl.navy.mil Tue Mar 14 15:44:28 2006 +Message-ID: <17431.21847.295167.980061@airborne.nrl.navy.mil> +Date: Tue, 14 Mar 2006 18:44:23 -0500 +From: "A. Maitland Bottoms" <bottoms@debian.org> +To: Greg KH <greg@kroah.com>, Bill Ryder <bryder@sgi.com>, + Kuba Ober <kuba@mareimbrium.org> +Cc: Vojtech Pavlik <vojtech@suse.cz> +Subject: USB: ftdi_sio: add Icom ID1 USB product and vendor ids + +From: "A. Maitland Bottoms" <bottoms@debian.org> + +The Icom ID-1 1.2 GHz band digital transceiver is a new radio +that has a USB interface. With this patch, the ftdi_sio driver +will report "Detected FT8U232AM" and provide a serial device +interface. + +Signed-off-by: "A. Maitland Bottoms" <bottoms@debian.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/ftdi_sio.c | 1 + + drivers/usb/serial/ftdi_sio.h | 7 +++++++ + 2 files changed, 8 insertions(+) + +--- gregkh-2.6.orig/drivers/usb/serial/ftdi_sio.c ++++ gregkh-2.6/drivers/usb/serial/ftdi_sio.c +@@ -492,6 +492,7 @@ static struct usb_device_id id_table_com + { USB_DEVICE(FTDI_VID, FTDI_WESTREX_MODEL_777_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_WESTREX_MODEL_8900F_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_PCDJ_DAC2_PID) }, ++ { USB_DEVICE(ICOM_ID1_VID, ICOM_ID1_PID) }, + { }, /* Optional parameter entry */ + { } /* Terminating entry */ + }; +--- gregkh-2.6.orig/drivers/usb/serial/ftdi_sio.h ++++ gregkh-2.6/drivers/usb/serial/ftdi_sio.h +@@ -146,6 +146,13 @@ + #define KOBIL_CONV_KAAN_PID 0x2021 /* KOBIL_Konverter for KAAN */ + + /* ++ * Icom ID-1 digital transceiver ++ */ ++ ++#define ICOM_ID1_VID 0x0C26 ++#define ICOM_ID1_PID 0x0004 ++ ++/* + * DSS-20 Sync Station for Sony Ericsson P800 + */ + diff --git a/usb/usb-rtl8150-small-fix.patch b/usb/usb-rtl8150-small-fix.patch new file mode 100644 index 0000000000000..ec92259f1ec0d --- /dev/null +++ b/usb/usb-rtl8150-small-fix.patch @@ -0,0 +1,37 @@ +From petkan@nucleusys.com Wed Mar 15 06:29:32 2006 +Date: Wed, 15 Mar 2006 16:29:38 +0200 (EET) +From: Petko Manolov <petkan@nucleusys.com> +To: Greg KH <greg@kroah.com> +Subject: USB: rtl8150 small fix +Message-ID: <Pine.LNX.4.62.0603151626570.2354@localhost.localdomain> + +This one is about announcing the device registration after the last check +has been made. + +From: Petko Manolov <petkan@nucleusys.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/net/rtl8150.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- gregkh-2.6.orig/drivers/usb/net/rtl8150.c ++++ gregkh-2.6/drivers/usb/net/rtl8150.c +@@ -880,7 +880,6 @@ static int rtl8150_probe(struct usb_inte + } + fill_skb_pool(dev); + set_ethernet_addr(dev); +- info("%s: rtl8150 is detected", netdev->name); + + usb_set_intfdata(intf, dev); + SET_NETDEV_DEV(netdev, &intf->dev); +@@ -888,6 +887,9 @@ static int rtl8150_probe(struct usb_inte + err("couldn't register the device"); + goto out2; + } ++ ++ info("%s: rtl8150 is detected", netdev->name); ++ + return 0; + + out2: |