diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-16 13:46:56 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-16 13:46:56 -0700 |
| commit | 0f1dc22952d8dd30606a3a2f829624cca69f8603 (patch) | |
| tree | 295c56cc6a87a17e3689a58487e7de84e02527ef /usb.current | |
| parent | f080c4868aeb061562f4addeffb9deedf9300766 (diff) | |
| download | patches-0f1dc22952d8dd30606a3a2f829624cca69f8603.tar.gz | |
more patches
Diffstat (limited to 'usb.current')
5 files changed, 263 insertions, 0 deletions
diff --git a/usb.current/usb-cp210x-remove-double-usb_control_msg-from-cp210x_set_config.patch b/usb.current/usb-cp210x-remove-double-usb_control_msg-from-cp210x_set_config.patch new file mode 100644 index 00000000000000..b94c1d23476f66 --- /dev/null +++ b/usb.current/usb-cp210x-remove-double-usb_control_msg-from-cp210x_set_config.patch @@ -0,0 +1,35 @@ +From mibru@gmx.de Tue Mar 16 13:27:47 2010 +From: Michael Brunner <mibru@gmx.de> +Date: Wed, 10 Mar 2010 23:26:37 +0100 +Subject: USB: cp210x: Remove double usb_control_msg from cp210x_set_config +To: craig@microtron.org.uk, gregkh@suse.de +Message-ID: <20100310232637.7e14e773@mail.gmx.de> + + +This patch removes a double usb_control_msg that sets the cp210x +configuration registers a second time when calling cp210x_set_config. +For data sizes >2 the second write gets corrupted. +The patch has been created against 2.6.34-rc1, but all cp210x driver +revisions are affected. + +Signed-off-by: Michael Brunner <mibru@gmx.de> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/cp210x.c | 5 ----- + 1 file changed, 5 deletions(-) + +--- a/drivers/usb/serial/cp210x.c ++++ b/drivers/usb/serial/cp210x.c +@@ -313,11 +313,6 @@ static int cp210x_set_config(struct usb_ + return -EPROTO; + } + +- /* Single data value */ +- result = usb_control_msg(serial->dev, +- usb_sndctrlpipe(serial->dev, 0), +- request, REQTYPE_HOST_TO_DEVICE, data[0], +- 0, NULL, 0, 300); + return 0; + } + diff --git a/usb.current/usb-fix-usb_fill_int_urb-for-superspeed-devices.patch b/usb.current/usb-fix-usb_fill_int_urb-for-superspeed-devices.patch new file mode 100644 index 00000000000000..b3a29a1cadf4a4 --- /dev/null +++ b/usb.current/usb-fix-usb_fill_int_urb-for-superspeed-devices.patch @@ -0,0 +1,85 @@ +From sarah.a.sharp@linux.intel.com Tue Mar 16 13:37:38 2010 +From: Matthew Wilcox <willy@linux.intel.com> +Date: Tue, 16 Mar 2010 12:55:44 -0700 +Subject: USB: Fix usb_fill_int_urb for SuperSpeed devices +To: Greg KH <gregkh@suse.de> +Cc: linux-usb@vger.kernel.org, Matthew Wilcox <willy@linux.intel.com> +Message-ID: <20100316195351.GA28341@xanatos> +Content-Disposition: inline + + +From: Matthew Wilcox <willy@linux.intel.com> + +USB 3 and Wireless USB specify a logarithmic encoding of the endpoint +interval that matches the USB 2 specification. usb_fill_int_urb() didn't +know that and was filling in the interval as if it was USB 1.1. Fix +usb_fill_int_urb() for SuperSpeed devices, but leave the wireless case +alone, because David Vrabel wants to keep the old encoding. + +Update the struct urb kernel doc to note that SuperSpeed URBs must have +urb->interval specified in microframes. + +Add a missing break statement in the usb_submit_urb() interrupt URB +checking, since wireless USB and SuperSpeed USB encode urb->interval +differently. This allows xHCI roothubs to actually register with khubd. + +Signed-off-by: Matthew Wilcox <willy@linux.intel.com> +Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/core/urb.c | 1 + + include/linux/usb.h | 18 +++++++++++++----- + 2 files changed, 14 insertions(+), 5 deletions(-) + +--- a/drivers/usb/core/urb.c ++++ b/drivers/usb/core/urb.c +@@ -453,6 +453,7 @@ int usb_submit_urb(struct urb *urb, gfp_ + if (urb->interval > (1 << 15)) + return -EINVAL; + max = 1 << 15; ++ break; + case USB_SPEED_WIRELESS: + if (urb->interval > 16) + return -EINVAL; +--- a/include/linux/usb.h ++++ b/include/linux/usb.h +@@ -1055,7 +1055,8 @@ typedef void (*usb_complete_t)(struct ur + * @number_of_packets: Lists the number of ISO transfer buffers. + * @interval: Specifies the polling interval for interrupt or isochronous + * transfers. The units are frames (milliseconds) for full and low +- * speed devices, and microframes (1/8 millisecond) for highspeed ones. ++ * speed devices, and microframes (1/8 millisecond) for highspeed ++ * and SuperSpeed devices. + * @error_count: Returns the number of ISO transfers that reported errors. + * @context: For use in completion functions. This normally points to + * request-specific driver context. +@@ -1286,9 +1287,16 @@ static inline void usb_fill_bulk_urb(str + * + * Initializes a interrupt urb with the proper information needed to submit + * it to a device. +- * Note that high speed interrupt endpoints use a logarithmic encoding of +- * the endpoint interval, and express polling intervals in microframes +- * (eight per millisecond) rather than in frames (one per millisecond). ++ * ++ * Note that High Speed and SuperSpeed interrupt endpoints use a logarithmic ++ * encoding of the endpoint interval, and express polling intervals in ++ * microframes (eight per millisecond) rather than in frames (one per ++ * millisecond). ++ * ++ * Wireless USB also uses the logarithmic encoding, but specifies it in units of ++ * 128us instead of 125us. For Wireless USB devices, the interval is passed ++ * through to the host controller, rather than being translated into microframe ++ * units. + */ + static inline void usb_fill_int_urb(struct urb *urb, + struct usb_device *dev, +@@ -1305,7 +1313,7 @@ static inline void usb_fill_int_urb(stru + urb->transfer_buffer_length = buffer_length; + urb->complete = complete_fn; + urb->context = context; +- if (dev->speed == USB_SPEED_HIGH) ++ if (dev->speed == USB_SPEED_HIGH || dev->speed == USB_SPEED_SUPER) + urb->interval = 1 << (interval - 1); + else + urb->interval = interval; diff --git a/usb.current/usb-gadget-multi-cdc_do_config-remove-redundant-check.patch b/usb.current/usb-gadget-multi-cdc_do_config-remove-redundant-check.patch new file mode 100644 index 00000000000000..08531419dee7db --- /dev/null +++ b/usb.current/usb-gadget-multi-cdc_do_config-remove-redundant-check.patch @@ -0,0 +1,29 @@ +From jacmet@sunsite.dk Tue Mar 16 13:35:06 2010 +From: Peter Korsgaard <jacmet@sunsite.dk> +Date: Fri, 12 Mar 2010 12:33:15 +0100 +Subject: USB: gadget/multi: cdc_do_config: remove redundant check +To: m.nazarewicz@samsung.com, gregkh@suse.de, linux-usb@vger.kernel.org +Cc: Peter Korsgaard <jacmet@sunsite.dk> +Message-ID: <1268393595-19744-1-git-send-email-jacmet@sunsite.dk> + + +cdc_do_config() had a double ret check after fsg_add(). + +Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/gadget/multi.c | 2 -- + 1 file changed, 2 deletions(-) + +--- a/drivers/usb/gadget/multi.c ++++ b/drivers/usb/gadget/multi.c +@@ -211,8 +211,6 @@ static int __init cdc_do_config(struct u + ret = fsg_add(c->cdev, c, fsg_common); + if (ret < 0) + return ret; +- if (ret < 0) +- return ret; + + return 0; + } diff --git a/usb.current/usb-r8a66597-hcd-fix-removed-from-an-attached-hub.patch b/usb.current/usb-r8a66597-hcd-fix-removed-from-an-attached-hub.patch new file mode 100644 index 00000000000000..e871a573b60d5b --- /dev/null +++ b/usb.current/usb-r8a66597-hcd-fix-removed-from-an-attached-hub.patch @@ -0,0 +1,74 @@ +From shimoda.yoshihiro@renesas.com Tue Mar 16 13:38:39 2010 +From: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> +Date: Tue, 16 Mar 2010 12:29:35 +0900 +Subject: usb: r8a66597-hcd: fix removed from an attached hub +To: Paul Mundt <lethal@linux-sh.org>, "Pietrek, Markus" <Markus.Pietrek@emtrion.de> +Cc: Alan Stern <stern@rowland.harvard.edu>, linux-sh@vger.kernel.org, USB list <linux-usb@vger.kernel.org> +Message-ID: <4B9EFB1F.3090201@renesas.com> + + +fix the problem that when a USB hub is attached to the r8a66597-hcd and +a device is removed from that hub, it's likely that a kernel panic follows. + +Reported-by: Markus Pietrek <Markus.Pietrek@emtrion.de> +Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> +Cc: stable <stable@kernel.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/host/r8a66597-hcd.c | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +--- a/drivers/usb/host/r8a66597-hcd.c ++++ b/drivers/usb/host/r8a66597-hcd.c +@@ -418,7 +418,7 @@ static u8 alloc_usb_address(struct r8a66 + + /* this function must be called with interrupt disabled */ + static void free_usb_address(struct r8a66597 *r8a66597, +- struct r8a66597_device *dev) ++ struct r8a66597_device *dev, int reset) + { + int port; + +@@ -430,7 +430,13 @@ static void free_usb_address(struct r8a6 + dev->state = USB_STATE_DEFAULT; + r8a66597->address_map &= ~(1 << dev->address); + dev->address = 0; +- dev_set_drvdata(&dev->udev->dev, NULL); ++ /* ++ * Only when resetting USB, it is necessary to erase drvdata. When ++ * a usb device with usb hub is disconnect, "dev->udev" is already ++ * freed on usb_desconnect(). So we cannot access the data. ++ */ ++ if (reset) ++ dev_set_drvdata(&dev->udev->dev, NULL); + list_del(&dev->device_list); + kfree(dev); + +@@ -1069,7 +1075,7 @@ static void r8a66597_usb_disconnect(stru + struct r8a66597_device *dev = r8a66597->root_hub[port].dev; + + disable_r8a66597_pipe_all(r8a66597, dev); +- free_usb_address(r8a66597, dev); ++ free_usb_address(r8a66597, dev, 0); + + start_root_hub_sampling(r8a66597, port, 0); + } +@@ -2085,7 +2091,7 @@ static void update_usb_address_map(struc + spin_lock_irqsave(&r8a66597->lock, flags); + dev = get_r8a66597_device(r8a66597, addr); + disable_r8a66597_pipe_all(r8a66597, dev); +- free_usb_address(r8a66597, dev); ++ free_usb_address(r8a66597, dev, 0); + put_child_connect_map(r8a66597, addr); + spin_unlock_irqrestore(&r8a66597->lock, flags); + } +@@ -2228,7 +2234,7 @@ static int r8a66597_hub_control(struct u + rh->port |= (1 << USB_PORT_FEAT_RESET); + + disable_r8a66597_pipe_all(r8a66597, dev); +- free_usb_address(r8a66597, dev); ++ free_usb_address(r8a66597, dev, 1); + + r8a66597_mdfy(r8a66597, USBRST, USBRST | UACT, + get_dvstctr_reg(port)); diff --git a/usb.current/usb-xhci-make-endpoint-interval-debugging-clearer.patch b/usb.current/usb-xhci-make-endpoint-interval-debugging-clearer.patch new file mode 100644 index 00000000000000..312bdf8f28c273 --- /dev/null +++ b/usb.current/usb-xhci-make-endpoint-interval-debugging-clearer.patch @@ -0,0 +1,40 @@ +From sarah.a.sharp@linux.intel.com Tue Mar 16 13:38:12 2010 +From: Sarah Sharp <sarah.a.sharp@linux.intel.com> +Date: Tue, 16 Mar 2010 12:59:24 -0700 +Subject: USB: xhci: Make endpoint interval debugging clearer. +To: Greg KH <gregkh@suse.de> +Cc: linux-usb@vger.kernel.org, Matthew Wilcox <willy@linux.intel.com> +Message-ID: <20100316195924.GA28421@xanatos> +Content-Disposition: inline + + +The xHCI hardware can only handle polling intervals that are a power of +two. When we add a new endpoint during a bandwidth allocation, and the +polling interval is rounded down to a power of two, print the original +polling interval in the endpoint descriptor. + +Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/host/xhci-mem.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +--- a/drivers/usb/host/xhci-mem.c ++++ b/drivers/usb/host/xhci-mem.c +@@ -566,8 +566,13 @@ static inline unsigned int xhci_get_endp + if (interval < 3) + interval = 3; + if ((1 << interval) != 8*ep->desc.bInterval) +- dev_warn(&udev->dev, "ep %#x - rounding interval to %d microframes\n", +- ep->desc.bEndpointAddress, 1 << interval); ++ dev_warn(&udev->dev, ++ "ep %#x - rounding interval" ++ " to %d microframes, " ++ "ep desc says %d microframes\n", ++ ep->desc.bEndpointAddress, ++ 1 << interval, ++ 8*ep->desc.bInterval); + } + break; + default: |
