summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-23 10:09:04 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-23 10:09:04 -0800
commit299aa85c191bb975860ae689deec0cb18b34d17c (patch)
treede817f5b8d792fc81516d8dfe1b8327f9301ae6a
parent7569bc3fdf185b761021b1b58ef6d7a333c4f34b (diff)
downloadlongterm-queue-2.6.32-299aa85c191bb975860ae689deec0cb18b34d17c.tar.gz
2.6.32-stable patches
added patches: usb-added-kamstrup-vid-pids-to-cp210x-serial-driver.patch usb-fix-handoff-when-bios-disables-host-pci-device.patch xhci-fix-encoding-for-hs-bulk-control-nak-rate.patch
-rw-r--r--queue-2.6.32/series3
-rw-r--r--queue-2.6.32/usb-added-kamstrup-vid-pids-to-cp210x-serial-driver.patch27
-rw-r--r--queue-2.6.32/usb-fix-handoff-when-bios-disables-host-pci-device.patch67
-rw-r--r--queue-2.6.32/xhci-fix-encoding-for-hs-bulk-control-nak-rate.patch96
4 files changed, 193 insertions, 0 deletions
diff --git a/queue-2.6.32/series b/queue-2.6.32/series
index ca45e9c..d68e7e2 100644
--- a/queue-2.6.32/series
+++ b/queue-2.6.32/series
@@ -17,3 +17,6 @@ ecryptfs-read-on-a-directory-should-return-eisdir-if-not-supported.patch
scsi-3w-9xxx-fix-bug-in-sgl-loading.patch
arm-7321-1-cache-v7-disable-preemption-when-reading-ccsidr.patch
arm-7325-1-fix-v7-boot-with-lockdep-enabled.patch
+usb-added-kamstrup-vid-pids-to-cp210x-serial-driver.patch
+usb-fix-handoff-when-bios-disables-host-pci-device.patch
+xhci-fix-encoding-for-hs-bulk-control-nak-rate.patch
diff --git a/queue-2.6.32/usb-added-kamstrup-vid-pids-to-cp210x-serial-driver.patch b/queue-2.6.32/usb-added-kamstrup-vid-pids-to-cp210x-serial-driver.patch
new file mode 100644
index 0000000..b1733f9
--- /dev/null
+++ b/queue-2.6.32/usb-added-kamstrup-vid-pids-to-cp210x-serial-driver.patch
@@ -0,0 +1,27 @@
+From c6c1e4491dc8d1ed2509fa6aacffa7f34614fc38 Mon Sep 17 00:00:00 2001
+From: Bruno Thomsen <bruno.thomsen@gmail.com>
+Date: Tue, 21 Feb 2012 23:41:37 +0100
+Subject: USB: Added Kamstrup VID/PIDs to cp210x serial driver.
+
+From: Bruno Thomsen <bruno.thomsen@gmail.com>
+
+commit c6c1e4491dc8d1ed2509fa6aacffa7f34614fc38 upstream.
+
+Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/cp210x.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/usb/serial/cp210x.c
++++ b/drivers/usb/serial/cp210x.c
+@@ -136,6 +136,8 @@ static struct usb_device_id id_table []
+ { USB_DEVICE(0x16DC, 0x0011) }, /* W-IE-NE-R Plein & Baus GmbH RCM Remote Control for MARATON Power Supply */
+ { USB_DEVICE(0x16DC, 0x0012) }, /* W-IE-NE-R Plein & Baus GmbH MPOD Multi Channel Power Supply */
+ { USB_DEVICE(0x16DC, 0x0015) }, /* W-IE-NE-R Plein & Baus GmbH CML Control, Monitoring and Data Logger */
++ { USB_DEVICE(0x17A8, 0x0001) }, /* Kamstrup Optical Eye/3-wire */
++ { USB_DEVICE(0x17A8, 0x0005) }, /* Kamstrup M-Bus Master MultiPort 250D */
+ { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */
+ { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */
+ { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
diff --git a/queue-2.6.32/usb-fix-handoff-when-bios-disables-host-pci-device.patch b/queue-2.6.32/usb-fix-handoff-when-bios-disables-host-pci-device.patch
new file mode 100644
index 0000000..54c4009
--- /dev/null
+++ b/queue-2.6.32/usb-fix-handoff-when-bios-disables-host-pci-device.patch
@@ -0,0 +1,67 @@
+From cab928ee1f221c9cc48d6615070fefe2e444384a Mon Sep 17 00:00:00 2001
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Date: Tue, 7 Feb 2012 15:11:46 -0800
+Subject: USB: Fix handoff when BIOS disables host PCI device.
+
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+
+commit cab928ee1f221c9cc48d6615070fefe2e444384a upstream.
+
+On some systems with an Intel Panther Point xHCI host controller, the
+BIOS disables the xHCI PCI device during boot, and switches the xHCI
+ports over to EHCI. This allows the BIOS to access USB devices without
+having xHCI support.
+
+The downside is that the xHCI BIOS handoff mechanism will fail because
+memory mapped I/O is not enabled for the disabled PCI device.
+Jesse Barnes says this is expected behavior. The PCI core will enable
+BARs before quirks run, but it will leave it in an undefined state, and
+it may not have memory mapped I/O enabled.
+
+Make the generic USB quirk handler call pci_enable_device() to re-enable
+MMIO, and call pci_disable_device() once the host-specific BIOS handoff
+is finished. This will balance the ref counts in the PCI core. When
+the PCI probe function is called, usb_hcd_pci_probe() will call
+pci_enable_device() again.
+
+This should be back ported to kernels as old as 2.6.31. That was the
+first kernel with xHCI support, and no one has complained about BIOS
+handoffs failing due to memory mapped I/O being disabled on other hosts
+(EHCI, UHCI, or OHCI).
+
+Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Acked-by: Oliver Neukum <oneukum@suse.de>
+Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/pci-quirks.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+--- a/drivers/usb/host/pci-quirks.c
++++ b/drivers/usb/host/pci-quirks.c
+@@ -503,7 +503,17 @@ static void __devinit quirk_usb_early_ha
+ */
+ if (pdev->vendor == 0x184e) /* vendor Netlogic */
+ return;
++ if (pdev->class != PCI_CLASS_SERIAL_USB_UHCI &&
++ pdev->class != PCI_CLASS_SERIAL_USB_OHCI &&
++ pdev->class != PCI_CLASS_SERIAL_USB_EHCI &&
++ pdev->class != PCI_CLASS_SERIAL_USB_XHCI)
++ return;
+
++ if (pci_enable_device(pdev) < 0) {
++ dev_warn(&pdev->dev, "Can't enable PCI device, "
++ "BIOS handoff failed.\n");
++ return;
++ }
+ if (pdev->class == PCI_CLASS_SERIAL_USB_UHCI)
+ quirk_usb_handoff_uhci(pdev);
+ else if (pdev->class == PCI_CLASS_SERIAL_USB_OHCI)
+@@ -512,5 +522,6 @@ static void __devinit quirk_usb_early_ha
+ quirk_usb_disable_ehci(pdev);
+ else if (pdev->class == PCI_CLASS_SERIAL_USB_XHCI)
+ quirk_usb_handoff_xhci(pdev);
++ pci_disable_device(pdev);
+ }
+ DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_usb_early_handoff);
diff --git a/queue-2.6.32/xhci-fix-encoding-for-hs-bulk-control-nak-rate.patch b/queue-2.6.32/xhci-fix-encoding-for-hs-bulk-control-nak-rate.patch
new file mode 100644
index 0000000..471d6e9
--- /dev/null
+++ b/queue-2.6.32/xhci-fix-encoding-for-hs-bulk-control-nak-rate.patch
@@ -0,0 +1,96 @@
+From 340a3504fd39dad753ba908fb6f894ee81fc3ae2 Mon Sep 17 00:00:00 2001
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Date: Mon, 13 Feb 2012 14:42:11 -0800
+Subject: xhci: Fix encoding for HS bulk/control NAK rate.
+
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+
+commit 340a3504fd39dad753ba908fb6f894ee81fc3ae2 upstream.
+
+The xHCI 0.96 spec says that HS bulk and control endpoint NAK rate must
+be encoded as an exponent of two number of microframes. The endpoint
+descriptor has the NAK rate encoded in number of microframes. We were
+just copying the value from the endpoint descriptor into the endpoint
+context interval field, which was not correct. This lead to the VIA
+host rejecting the add of a bulk OUT endpoint from any USB 2.0 mass
+storage device.
+
+The fix is to use the correct encoding. Refactor the code to convert
+number of frames to an exponential number of microframes, and make sure
+we convert the number of microframes in HS bulk and control endpoints to
+an exponent.
+
+This should be back ported to kernels as old as 2.6.31, that contain the
+commit dfa49c4ad120a784ef1ff0717168aa79f55a483a "USB: xhci - fix math
+in xhci_get_endpoint_interval"
+
+Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Tested-by: Felipe Contreras <felipe.contreras@gmail.com>
+Suggested-by: Andiry Xu <andiry.xu@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/xhci-mem.c | 32 ++++++++++++++++++++++++--------
+ 1 file changed, 24 insertions(+), 8 deletions(-)
+
+--- a/drivers/usb/host/xhci-mem.c
++++ b/drivers/usb/host/xhci-mem.c
+@@ -472,26 +472,42 @@ static unsigned int xhci_parse_exponent_
+ }
+
+ /*
+- * Convert bInterval expressed in frames (in 1-255 range) to exponent of
++ * Convert bInterval expressed in microframes (in 1-255 range) to exponent of
+ * microframes, rounded down to nearest power of 2.
+ */
+-static unsigned int xhci_parse_frame_interval(struct usb_device *udev,
+- struct usb_host_endpoint *ep)
++static unsigned int xhci_microframes_to_exponent(struct usb_device *udev,
++ struct usb_host_endpoint *ep, unsigned int desc_interval,
++ unsigned int min_exponent, unsigned int max_exponent)
+ {
+ unsigned int interval;
+
+- interval = fls(8 * ep->desc.bInterval) - 1;
+- interval = clamp_val(interval, 3, 10);
+- if ((1 << interval) != 8 * ep->desc.bInterval)
++ interval = fls(desc_interval) - 1;
++ interval = clamp_val(interval, min_exponent, max_exponent);
++ if ((1 << interval) != desc_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);
++ desc_interval);
+
+ return interval;
+ }
+
++static unsigned int xhci_parse_microframe_interval(struct usb_device *udev,
++ struct usb_host_endpoint *ep)
++{
++ return xhci_microframes_to_exponent(udev, ep,
++ ep->desc.bInterval, 0, 15);
++}
++
++
++static unsigned int xhci_parse_frame_interval(struct usb_device *udev,
++ struct usb_host_endpoint *ep)
++{
++ return xhci_microframes_to_exponent(udev, ep,
++ ep->desc.bInterval * 8, 3, 10);
++}
++
+ /* Return the polling or NAK interval.
+ *
+ * The polling interval is expressed in "microframes". If xHCI's Interval field
+@@ -510,7 +526,7 @@ static inline unsigned int xhci_get_endp
+ /* Max NAK rate */
+ if (usb_endpoint_xfer_control(&ep->desc) ||
+ usb_endpoint_xfer_bulk(&ep->desc)) {
+- interval = ep->desc.bInterval;
++ interval = xhci_parse_microframe_interval(udev, ep);
+ break;
+ }
+ /* Fall through - SS and HS isoc/int have same decoding */