diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-12 14:35:59 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-12 14:35:59 -0700 |
| commit | 1b7f0118b6230122c54406c62c9a446b93667456 (patch) | |
| tree | a347e2aa67aa99b4aa7b71eee03da869ea53586a /usb.current | |
| parent | f32abb8c7a4b184000d1c7cbef8b14db7c131147 (diff) | |
| download | patches-1b7f0118b6230122c54406c62c9a446b93667456.tar.gz | |
bug fixes
Diffstat (limited to 'usb.current')
6 files changed, 339 insertions, 0 deletions
diff --git a/usb.current/usb-add-device-ids-for-igotu-to-navman.patch b/usb.current/usb-add-device-ids-for-igotu-to-navman.patch new file mode 100644 index 00000000000000..81840fa98092de --- /dev/null +++ b/usb.current/usb-add-device-ids-for-igotu-to-navman.patch @@ -0,0 +1,43 @@ +From ross@linux.intel.com Thu Aug 12 13:46:35 2010 +Subject: USB: add device IDs for igotu to navman +From: Ross Burton <ross@linux.intel.com> +To: linux-kernel@vger.kernel.org +Cc: gregkh@suse.de +Date: Fri, 06 Aug 2010 16:36:39 +0100 +Message-ID: <1281108999.3781.50.camel@flashheart.burtonini.com> + + +I recently bought a i-gotU USB GPS, and whilst hunting around for linux +support discovered this post by you back in 2009: + +http://kerneltrap.org/mailarchive/linux-usb/2009/3/12/5148644 + +>Try the navman driver instead. You can either add the device id to the +> driver and rebuild it, or do this before you plug the device in: +> modprobe navman +> echo -n "0x0df7 0x0900" > /sys/bus/usb-serial/drivers/navman/new_id +> +> and then plug your device in and see if that works. + +I can confirm that the navman driver works with the right device IDs on +my i-gotU GT-600, which has the same device IDs. Attached is a patch +adding the IDs. + +From: Ross Burton <ross@linux.intel.com> +Cc: stable <stable@kernel.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/navman.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/serial/navman.c ++++ b/drivers/usb/serial/navman.c +@@ -25,6 +25,7 @@ static int debug; + + static const struct usb_device_id id_table[] = { + { USB_DEVICE(0x0a99, 0x0001) }, /* Talon Technology device */ ++ { USB_DEVICE(0x0df7, 0x0900) }, /* Mobile Action i-gotU */ + { }, + }; + MODULE_DEVICE_TABLE(usb, id_table); diff --git a/usb.current/usb-isp1760-use-a-write-barrier-to-ensure-proper-ndelay-timing.patch b/usb.current/usb-isp1760-use-a-write-barrier-to-ensure-proper-ndelay-timing.patch new file mode 100644 index 00000000000000..82c3a63c557a94 --- /dev/null +++ b/usb.current/usb-isp1760-use-a-write-barrier-to-ensure-proper-ndelay-timing.patch @@ -0,0 +1,49 @@ +From vapier@gentoo.org Thu Aug 12 13:45:44 2010 +From: Mike Frysinger <vapier@gentoo.org> +To: linux-usb@vger.kernel.org, Greg Kroah-Hartman <gregkh@suse.de> +Cc: uclinux-dist-devel@blackfin.uclinux.org, + Michael Hennerich <michael.hennerich@analog.com> +Subject: USB: isp1760: use a write barrier to ensure proper ndelay timing +Date: Thu, 5 Aug 2010 17:53:57 -0400 +Message-Id: <1281045237-21967-1-git-send-email-vapier@gentoo.org> + +From: Michael Hennerich <michael.hennerich@analog.com> + +The ISP1760 has some timing requirements where it has to delay a short +period after a write to a register has started. However, this delay is +from the time the write hits the USB chip (the ISP1760), not from the +time where the processor started processing the write. So on a quick +enough processor, it is sometimes possible for the write to not hit the +device before we start delaying, and we then violate the part's timing +requirements, so things stop working. + +To avoid all this, insert a write barrier after the register write and +before the timing delay/register read so we can guarantee we only start +counting time after the write has hit the device. + +Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/host/isp1760-hcd.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/usb/host/isp1760-hcd.c ++++ b/drivers/usb/host/isp1760-hcd.c +@@ -829,6 +829,7 @@ static void enqueue_an_ATL_packet(struct + * almost immediately. With ISP1761, this register requires a delay of + * 195ns between a write and subsequent read (see section 15.1.1.3). + */ ++ mmiowb(); + ndelay(195); + skip_map = isp1760_readl(hcd->regs + HC_ATL_PTD_SKIPMAP_REG); + +@@ -870,6 +871,7 @@ static void enqueue_an_INT_packet(struct + * almost immediately. With ISP1761, this register requires a delay of + * 195ns between a write and subsequent read (see section 15.1.1.3). + */ ++ mmiowb(); + ndelay(195); + skip_map = isp1760_readl(hcd->regs + HC_INT_PTD_SKIPMAP_REG); + diff --git a/usb.current/usb-option-add-celot-ct-650.patch b/usb.current/usb-option-add-celot-ct-650.patch new file mode 100644 index 00000000000000..a8fab4b979e353 --- /dev/null +++ b/usb.current/usb-option-add-celot-ct-650.patch @@ -0,0 +1,43 @@ +From mjt@tls.msk.ru Thu Aug 12 13:43:49 2010 +Message-ID: <4C5C20F1.6060704@msgid.tls.msk.ru> +Date: Fri, 06 Aug 2010 18:49:21 +0400 +From: Michael Tokarev <mjt@tls.msk.ru> +To: Greg KH <greg@kroah.com> +CC: Oliver Neukum <oneukum@suse.de> +Subject: USB: option: add Celot CT-650 + + +Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> +Cc: stable <stable@kernel.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + + +--- + drivers/usb/serial/option.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -365,6 +365,10 @@ static void option_instat_callback(struc + #define OLIVETTI_VENDOR_ID 0x0b3c + #define OLIVETTI_PRODUCT_OLICARD100 0xc000 + ++/* Celot products */ ++#define CELOT_VENDOR_ID 0x211f ++#define CELOT_PRODUCT_CT680M 0x6801 ++ + /* some devices interfaces need special handling due to a number of reasons */ + enum option_blacklist_reason { + OPTION_BLACKLIST_NONE = 0, +@@ -887,10 +891,9 @@ static const struct usb_device_id option + { 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) }, +- + { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100) }, ++ { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */ + { } /* Terminating entry */ + }; + MODULE_DEVICE_TABLE(usb, option_ids); diff --git a/usb.current/usb-pl2303-new-vendor-and-product-id.patch b/usb.current/usb-pl2303-new-vendor-and-product-id.patch new file mode 100644 index 00000000000000..1441d24001f728 --- /dev/null +++ b/usb.current/usb-pl2303-new-vendor-and-product-id.patch @@ -0,0 +1,50 @@ +From linux-usb-owner@vger.kernel.org Thu Aug 12 13:53:19 2010 +From: Jef Driesen <jefdriesen@telenet.be> +To: Greg Kroah-Hartman <gregkh@suse.de>, + Johan Hovold <jhovold@gmail.com>, + Frank Schaefer <schaefer.frank@gmx.net>, + Alan Cox <alan@linux.intel.com>, + Pawel Ludwikow <pludwiko@rab.ict.pwr.wroc.pl>, + Manuel Jander <manuel.jander@gmail.com> +Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, + Jef Driesen <jefdriesen@telenet.be> +Subject: USB: pl2303: New vendor and product id +Date: Mon, 9 Aug 2010 15:55:32 +0200 +Message-Id: <1281362132-9106-1-git-send-email-jefdriesen@telenet.be> + +Add support for the Zeagle N2iTiON3 dive computer interface. Since +Zeagle devices are actually manufactured by Seiko, this patch will +support other Seiko based models as well. + +Signed-off-by: Jef Driesen <jefdriesen@telenet.be> +Cc: stable <stable@kernel.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/pl2303.c | 1 + + drivers/usb/serial/pl2303.h | 4 ++++ + 2 files changed, 5 insertions(+) + +--- a/drivers/usb/serial/pl2303.c ++++ b/drivers/usb/serial/pl2303.c +@@ -86,6 +86,7 @@ static const struct usb_device_id id_tab + { USB_DEVICE(SUPERIAL_VENDOR_ID, SUPERIAL_PRODUCT_ID) }, + { USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) }, + { USB_DEVICE(CRESSI_VENDOR_ID, CRESSI_EDY_PRODUCT_ID) }, ++ { USB_DEVICE(ZEAGLE_VENDOR_ID, ZEAGLE_N2ITION3_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) }, +--- a/drivers/usb/serial/pl2303.h ++++ b/drivers/usb/serial/pl2303.h +@@ -128,6 +128,10 @@ + #define CRESSI_VENDOR_ID 0x04b8 + #define CRESSI_EDY_PRODUCT_ID 0x0521 + ++/* Zeagle dive computer interface */ ++#define ZEAGLE_VENDOR_ID 0x04b8 ++#define ZEAGLE_N2ITION3_PRODUCT_ID 0x0522 ++ + /* Sony, USB data cable for CMD-Jxx mobile phones */ + #define SONY_VENDOR_ID 0x054c + #define SONY_QN3USB_PRODUCT_ID 0x0437 diff --git a/usb.current/usb-serial-fix-leak-of-usb-serial-module-refrence-count.patch b/usb.current/usb-serial-fix-leak-of-usb-serial-module-refrence-count.patch new file mode 100644 index 00000000000000..3e5fed200af458 --- /dev/null +++ b/usb.current/usb-serial-fix-leak-of-usb-serial-module-refrence-count.patch @@ -0,0 +1,117 @@ +From tom.leiming@gmail.com Thu Aug 12 13:50:12 2010 +From: tom.leiming@gmail.com +To: greg@kroah.com, + stern@rowland.harvard.edu +Cc: linux-usb@vger.kernel.org, Ming Lei <tom.leiming@gmail.com>, Johan Hovold <jhovold@gmail.com>, Andi Kleen <ak@linux.intel.com> +Subject: USB: serial: fix leak of usb serial module refrence count +Date: Sat, 7 Aug 2010 16:20:35 +0800 +Message-Id: <1281169235-4883-1-git-send-email-tom.leiming@gmail.com> + +From: Ming Lei <tom.leiming@gmail.com> + +The patch with title below makes reference count of usb serial module +always more than one after driver is bound. + + USB-BKL: Remove BKL use for usb serial driver probing + +In fact, the patch above only replaces lock_kernel() with try_module_get() +, and does not use module_put() to do what unlock_kernel() did, so casue leak +of reference count of usb serial module and the module can not be unloaded +after serial driver is bound with device. + +This patch fixes the issue, also simplifies such things: + -only call try_module_get() once in the entry of usb_serial_probe() + -only call module_put() once in the exit of usb_serial_probe + +Signed-off-by: Ming Lei <tom.leiming@gmail.com> +Cc: Johan Hovold <jhovold@gmail.com> +Cc: Andi Kleen <ak@linux.intel.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/usb-serial.c | 23 +++++++---------------- + 1 file changed, 7 insertions(+), 16 deletions(-) + +--- a/drivers/usb/serial/usb-serial.c ++++ b/drivers/usb/serial/usb-serial.c +@@ -736,6 +736,7 @@ int usb_serial_probe(struct usb_interfac + + serial = create_serial(dev, interface, type); + if (!serial) { ++ module_put(type->driver.owner); + dev_err(&interface->dev, "%s - out of memory\n", __func__); + return -ENOMEM; + } +@@ -746,11 +747,11 @@ int usb_serial_probe(struct usb_interfac + + id = get_iface_id(type, interface); + retval = type->probe(serial, id); +- module_put(type->driver.owner); + + if (retval) { + dbg("sub driver rejected device"); + kfree(serial); ++ module_put(type->driver.owner); + return retval; + } + } +@@ -822,6 +823,7 @@ int usb_serial_probe(struct usb_interfac + if (num_bulk_in == 0 || num_bulk_out == 0) { + dev_info(&interface->dev, "PL-2303 hack: descriptors matched but endpoints did not\n"); + kfree(serial); ++ module_put(type->driver.owner); + return -ENODEV; + } + } +@@ -835,22 +837,15 @@ int usb_serial_probe(struct usb_interfac + dev_err(&interface->dev, + "Generic device with no bulk out, not allowed.\n"); + kfree(serial); ++ module_put(type->driver.owner); + return -EIO; + } + } + #endif + if (!num_ports) { + /* if this device type has a calc_num_ports function, call it */ +- if (type->calc_num_ports) { +- if (!try_module_get(type->driver.owner)) { +- dev_err(&interface->dev, +- "module get failed, exiting\n"); +- kfree(serial); +- return -EIO; +- } ++ if (type->calc_num_ports) + num_ports = type->calc_num_ports(serial); +- module_put(type->driver.owner); +- } + if (!num_ports) + num_ports = type->num_ports; + } +@@ -1039,13 +1034,7 @@ int usb_serial_probe(struct usb_interfac + + /* if this device type has an attach function, call it */ + if (type->attach) { +- if (!try_module_get(type->driver.owner)) { +- dev_err(&interface->dev, +- "module get failed, exiting\n"); +- goto probe_error; +- } + retval = type->attach(serial); +- module_put(type->driver.owner); + if (retval < 0) + goto probe_error; + serial->attached = 1; +@@ -1088,10 +1077,12 @@ int usb_serial_probe(struct usb_interfac + exit: + /* success */ + usb_set_intfdata(interface, serial); ++ module_put(type->driver.owner); + return 0; + + probe_error: + usb_serial_put(serial); ++ module_put(type->driver.owner); + return -EIO; + } + EXPORT_SYMBOL_GPL(usb_serial_probe); diff --git a/usb.current/usb-uvc_v4l2-cleanup-test-for-end-of-loop.patch b/usb.current/usb-uvc_v4l2-cleanup-test-for-end-of-loop.patch new file mode 100644 index 00000000000000..042018b1a81f88 --- /dev/null +++ b/usb.current/usb-uvc_v4l2-cleanup-test-for-end-of-loop.patch @@ -0,0 +1,37 @@ +From linux-usb-owner@vger.kernel.org Thu Aug 12 13:42:22 2010 +Date: Thu, 12 Aug 2010 09:59:58 +0200 +From: Dan Carpenter <error27@gmail.com> +To: David Brownell <dbrownell@users.sourceforge.net> +Cc: Greg Kroah-Hartman <gregkh@suse.de>, + Laurent Pinchart <laurent.pinchart@ideasonboard.com>, + Mauro Carvalho Chehab <mchehab@redhat.com>, + linux-usb@vger.kernel.org, kernel-janitors@vger.kernel.org +Subject: USB: uvc_v4l2: cleanup test for end of loop +Message-ID: <20100812075958.GP645@bicker> +Content-Disposition: inline + +We're trying to test for the the end of the loop here. "format" is +never NULL. We don't know what "format->fcc" is because we're past the +end of the loop and I think "fmt->fmt.pix.pixelformat" comes from the +user so we don't know what that is either. It works, but it's cleaner +to just test to see if (i == ARRAY_SIZE(uvc_formats). + +Signed-off-by: Dan Carpenter <error27@gmail.com> +Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/gadget/uvc_v4l2.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/gadget/uvc_v4l2.c ++++ b/drivers/usb/gadget/uvc_v4l2.c +@@ -94,7 +94,7 @@ uvc_v4l2_set_format(struct uvc_video *vi + break; + } + +- if (format == NULL || format->fcc != fmt->fmt.pix.pixelformat) { ++ if (i == ARRAY_SIZE(uvc_formats)) { + printk(KERN_INFO "Unsupported format 0x%08x.\n", + fmt->fmt.pix.pixelformat); + return -EINVAL; |
