--- /dev/null
+From 86b2bbfdbd1fcc4a3aa62ccd3f245c40c5ad5b85 Mon Sep 17 00:00:00 2001
+From: Jean Delvare <khali@linux-fr.org>
+Date: Fri, 20 Jan 2012 10:09:23 -0500
+Subject: hwmon: (f71805f) Fix clamping of temperature limits
+
+From: Jean Delvare <khali@linux-fr.org>
+
+commit 86b2bbfdbd1fcc4a3aa62ccd3f245c40c5ad5b85 upstream.
+
+Properly clamp temperature limits set by the user. Without this fix,
+attempts to write temperature limits above the maximum supported by
+the chip (255 degrees Celsius) would arbitrarily and unexpectedly
+result in the limit being set to 0 degree Celsius.
+
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/hwmon/f71805f.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+--- a/drivers/hwmon/f71805f.c
++++ b/drivers/hwmon/f71805f.c
+@@ -283,11 +283,11 @@ static inline long temp_from_reg(u8 reg)
+
+ static inline u8 temp_to_reg(long val)
+ {
+- if (val < 0)
+- val = 0;
+- else if (val > 1000 * 0xff)
+- val = 0xff;
+- return ((val + 500) / 1000);
++ if (val <= 0)
++ return 0;
++ if (val >= 1000 * 0xff)
++ return 0xff;
++ return (val + 500) / 1000;
+ }
+
+ /*
--- /dev/null
+From 6edf3c30af01854c416f8654d3d5d2652470afd4 Mon Sep 17 00:00:00 2001
+From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
+Date: Thu, 26 Jan 2012 15:59:00 -0500
+Subject: hwmon: (sht15) fix bad error code
+
+From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
+
+commit 6edf3c30af01854c416f8654d3d5d2652470afd4 upstream.
+
+When no platform data was supplied, returned error code was 0.
+
+Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
+Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/hwmon/sht15.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/hwmon/sht15.c
++++ b/drivers/hwmon/sht15.c
+@@ -883,7 +883,7 @@ static int sht15_invalidate_voltage(stru
+
+ static int __devinit sht15_probe(struct platform_device *pdev)
+ {
+- int ret = 0;
++ int ret;
+ struct sht15_data *data = kzalloc(sizeof(*data), GFP_KERNEL);
+ u8 status = 0;
+
+@@ -901,6 +901,7 @@ static int __devinit sht15_probe(struct
+ init_waitqueue_head(&data->wait_queue);
+
+ if (pdev->dev.platform_data == NULL) {
++ ret = -EINVAL;
+ dev_err(&pdev->dev, "no platform data supplied\n");
+ goto err_free_data;
+ }
--- /dev/null
+From ad77c3e1808f07fa70f707b1c92a683b7c7d3f85 Mon Sep 17 00:00:00 2001
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Fri, 27 Jan 2012 17:56:06 -0800
+Subject: hwmon: (w83627ehf) Disable setting DC mode for pwm2, pwm3 on NCT6776F
+
+From: Guenter Roeck <linux@roeck-us.net>
+
+commit ad77c3e1808f07fa70f707b1c92a683b7c7d3f85 upstream.
+
+NCT6776F only supports pwm mode for pwm2 and pwm3. Return error if an attempt
+is made to set those pwm channels to DC mode.
+
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/hwmon/w83627ehf.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/hwmon/w83627ehf.c
++++ b/drivers/hwmon/w83627ehf.c
+@@ -1319,6 +1319,7 @@ store_pwm_mode(struct device *dev, struc
+ {
+ struct w83627ehf_data *data = dev_get_drvdata(dev);
+ struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr);
++ struct w83627ehf_sio_data *sio_data = dev->platform_data;
+ int nr = sensor_attr->index;
+ unsigned long val;
+ int err;
+@@ -1330,6 +1331,11 @@ store_pwm_mode(struct device *dev, struc
+
+ if (val > 1)
+ return -EINVAL;
++
++ /* On NCT67766F, DC mode is only supported for pwm1 */
++ if (sio_data->kind == nct6776 && nr && val != 1)
++ return -EINVAL;
++
+ mutex_lock(&data->update_lock);
+ reg = w83627ehf_read_value(data, W83627EHF_REG_PWM_ENABLE[nr]);
+ data->pwm_mode[nr] = val;
xhci-fix-usb-3.0-device-restart-on-resume.patch
xhci-cleanup-isoc-transfer-ring-when-td-length-mismatch-found.patch
usb-musb-davinci-fix-build-breakage.patch
+hwmon-f71805f-fix-clamping-of-temperature-limits.patch
+hwmon-w83627ehf-disable-setting-dc-mode-for-pwm2-pwm3-on-nct6776f.patch
+hwmon-sht15-fix-bad-error-code.patch
+usb-cdc-wdm-call-wake_up_all-to-allow-driver-to-shutdown-on-device-removal.patch
+usb-cdc-wdm-better-allocate-a-buffer-that-is-at-least-as-big-as-we-tell-the-usb-core.patch
+usb-cdc-wdm-avoid-hanging-on-interface-with-no-usb_cdc_dmm_type.patch
--- /dev/null
+From 15699e6fafc3a90e5fdc2ef30555a04dee62286f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
+Date: Fri, 20 Jan 2012 01:49:57 +0100
+Subject: USB: cdc-wdm: Avoid hanging on interface with no USB_CDC_DMM_TYPE
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Bjørn Mork <bjorn@mork.no>
+
+commit 15699e6fafc3a90e5fdc2ef30555a04dee62286f upstream.
+
+The probe does not strictly require the USB_CDC_DMM_TYPE
+descriptor, which is a good thing as it makes the driver
+usable on non-conforming interfaces. A user could e.g.
+bind to it to a CDC ECM interface by using the new_id and
+bind sysfs files. But this would fail with a 0 buffer length
+due to the missing descriptor.
+
+Fix by defining a reasonable fallback size: The minimum
+device receive buffer size required by the CDC WMC standard,
+revision 1.1
+
+Signed-off-by: Bjørn Mork <bjorn@mork.no>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/class/cdc-wdm.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/class/cdc-wdm.c
++++ b/drivers/usb/class/cdc-wdm.c
+@@ -57,6 +57,8 @@ MODULE_DEVICE_TABLE (usb, wdm_ids);
+
+ #define WDM_MAX 16
+
++/* CDC-WMC r1.1 requires wMaxCommand to be "at least 256 decimal (0x100)" */
++#define WDM_DEFAULT_BUFSIZE 256
+
+ static DEFINE_MUTEX(wdm_mutex);
+
+@@ -636,7 +638,7 @@ static int wdm_probe(struct usb_interfac
+ struct usb_cdc_dmm_desc *dmhd;
+ u8 *buffer = intf->altsetting->extra;
+ int buflen = intf->altsetting->extralen;
+- u16 maxcom = 0;
++ u16 maxcom = WDM_DEFAULT_BUFSIZE;
+
+ if (!buffer)
+ goto out;
--- /dev/null
+From 655e247daf52b202a6c2d0f8a06dd2051e756ce4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
+Date: Mon, 16 Jan 2012 15:11:59 +0100
+Subject: USB: cdc-wdm: better allocate a buffer that is at least as big as we tell the USB core
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Bjørn Mork <bjorn@mork.no>
+
+commit 655e247daf52b202a6c2d0f8a06dd2051e756ce4 upstream.
+
+As it turns out, there was a mismatch between the allocated inbuf size
+(desc->bMaxPacketSize0, typically something like 64) and the length we
+specified in the URB (desc->wMaxCommand, typically something like 2048)
+
+Signed-off-by: Bjørn Mork <bjorn@mork.no>
+Cc: Oliver Neukum <oliver@neukum.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/class/cdc-wdm.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/class/cdc-wdm.c
++++ b/drivers/usb/class/cdc-wdm.c
+@@ -723,7 +723,7 @@ next_desc:
+ goto err;
+
+ desc->inbuf = usb_alloc_coherent(interface_to_usbdev(intf),
+- desc->bMaxPacketSize0,
++ desc->wMaxCommand,
+ GFP_KERNEL,
+ &desc->response->transfer_dma);
+ if (!desc->inbuf)
--- /dev/null
+From 62aaf24dc125d7c55c93e313d15611f152b030c7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
+Date: Mon, 16 Jan 2012 15:11:57 +0100
+Subject: USB: cdc-wdm: call wake_up_all to allow driver to shutdown on device removal
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Bjørn Mork <bjorn@mork.no>
+
+commit 62aaf24dc125d7c55c93e313d15611f152b030c7 upstream.
+
+wdm_disconnect() waits for the mutex held by wdm_read() before
+calling wake_up_all(). This causes a deadlock, preventing device removal
+to complete. Do the wake_up_all() before we start waiting for the locks.
+
+Signed-off-by: Bjørn Mork <bjorn@mork.no>
+Cc: Oliver Neukum <oliver@neukum.org>
+Cc: stable <stable@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/class/cdc-wdm.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/class/cdc-wdm.c
++++ b/drivers/usb/class/cdc-wdm.c
+@@ -786,13 +786,13 @@ static void wdm_disconnect(struct usb_in
+ /* to terminate pending flushes */
+ clear_bit(WDM_IN_USE, &desc->flags);
+ spin_unlock_irqrestore(&desc->iuspin, flags);
++ wake_up_all(&desc->wait);
+ mutex_lock(&desc->rlock);
+ mutex_lock(&desc->wlock);
+ kill_urbs(desc);
+ cancel_work_sync(&desc->rxwork);
+ mutex_unlock(&desc->wlock);
+ mutex_unlock(&desc->rlock);
+- wake_up_all(&desc->wait);
+ if (!desc->count)
+ cleanup(desc);
+ mutex_unlock(&wdm_mutex);