[kernel] r16608 - in dists/sid/linux-2.6/debian: . patches/bugfix/all patches/series
Ben Hutchings
benh at alioth.debian.org
Sun Nov 28 23:29:34 UTC 2010
Author: benh
Date: Sun Nov 28 23:29:22 2010
New Revision: 16608
Log:
USB: Retain device power/wakeup setting across reconfiguration; don't enable remote wakeup by default (Closes: #605246)
Added:
dists/sid/linux-2.6/debian/patches/bugfix/all/USB-don-t-enable-remote-wakeup-by-default.patch
dists/sid/linux-2.6/debian/patches/bugfix/all/USB-retain-power-wakeup-setting-across-reconfig.patch
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/series/29
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog Sun Nov 28 20:24:42 2010 (r16607)
+++ dists/sid/linux-2.6/debian/changelog Sun Nov 28 23:29:22 2010 (r16608)
@@ -8,6 +8,8 @@
* l2tp: Fix UDP socket reference count bugs in the pppol2tp driver
(Closes: #604748)
* [x86] KVM: VMX: Fix host userspace gsbase corruption (Closes: #604956)
+ * USB: Retain device power/wakeup setting across reconfiguration;
+ don't enable remote wakeup by default (Closes: #605246)
-- Ben Hutchings <ben at decadent.org.uk> Sat, 27 Nov 2010 21:06:54 +0000
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/USB-don-t-enable-remote-wakeup-by-default.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/USB-don-t-enable-remote-wakeup-by-default.patch Sun Nov 28 23:29:22 2010 (r16608)
@@ -0,0 +1,38 @@
+From: Alan Stern <stern at rowland.harvard.edu>
+Date: Fri, 2 Apr 2010 13:21:33 -0400
+Subject: [PATCH 2/2] USB: don't enable remote wakeup by default
+
+commit 7aba8d014341341590ecb64050b7a026642a62eb upstream.
+
+This patch (as1364) avoids enabling remote wakeup by default on all
+non-root-hub USB devices. Individual drivers or userspace will have
+to enable it wherever it is needed, such as for keyboards or network
+interfaces. Note: This affects only system sleep, not autosuspend.
+
+External hubs will continue to relay wakeup requests received from
+downstream through their upstream port, even when remote wakeup is not
+enabled for the hub itself. Disabling remote wakeup on a hub merely
+prevents it from generating wakeup requests in response to connect,
+disconnect, and overcurrent events.
+
+Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
+---
+ drivers/usb/core/hub.c | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
+index a750c1c59..d2069a0 100644
+--- a/drivers/usb/core/hub.c
++++ b/drivers/usb/core/hub.c
+@@ -1774,7 +1774,6 @@ int usb_new_device(struct usb_device *udev)
+ * sysfs power/wakeup controls wakeup enabled/disabled
+ */
+ device_init_wakeup(&udev->dev, 0);
+- device_set_wakeup_enable(&udev->dev, 1);
+ }
+
+ err = usb_enumerate_device(udev); /* Read descriptors */
+--
+1.7.2.3
+
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/USB-retain-power-wakeup-setting-across-reconfig.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/USB-retain-power-wakeup-setting-across-reconfig.patch Sun Nov 28 23:29:22 2010 (r16608)
@@ -0,0 +1,70 @@
+From: Dan Streetman <ddstreet at ieee.org>
+Date: Wed, 6 Jan 2010 09:56:53 -0500
+Subject: [PATCH 1/2] USB: retain USB device power/wakeup setting across reconfiguration
+
+commit 16985408b5c48585762ec3b9b7bae1dec4ad7437 upstream.
+
+Currently a non-root-hub USB device's wakeup settings are initialized when the
+device is set to a configured state using device_init_wakeup(), but this is not
+correct as wakeup is split into "capable" (can_wakeup) and "enabled"
+(should_wakeup). The settings should be initialized instead in the device
+initialization (usb_new_device) with the "capable" setting disabled and the
+"enabled" setting enabled. The "capable" setting should be set based on the
+device being configured or unconfigured, and "enabled" setting set based on
+the sysfs power/wakeup control.
+
+This patch retains the sysfs power/wakeup setting of a non-root-hub USB device
+over a USB device re-configuration, which can happen (for example) after a
+suspend/resume cycle.
+
+Signed-off-by: Dan Streetman <ddstreet at ieee.org>
+Cc: David Brownell <dbrownell at users.sourceforge.net>
+Cc: Alan Stern <stern at rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
+[bwh: Adjust context for 2.6.32]
+---
+ drivers/usb/core/hub.c | 16 ++++++++++++----
+ 1 files changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
+index 12254e1..a750c1c59 100644
+--- a/drivers/usb/core/hub.c
++++ b/drivers/usb/core/hub.c
+@@ -1403,11 +1403,11 @@ void usb_set_device_state(struct usb_device *udev,
+ || new_state == USB_STATE_SUSPENDED)
+ ; /* No change to wakeup settings */
+ else if (new_state == USB_STATE_CONFIGURED)
+- device_init_wakeup(&udev->dev,
++ device_set_wakeup_capable(&udev->dev,
+ (udev->actconfig->desc.bmAttributes
+ & USB_CONFIG_ATT_WAKEUP));
+ else
+- device_init_wakeup(&udev->dev, 0);
++ device_set_wakeup_capable(&udev->dev, 0);
+ }
+ if (udev->state == USB_STATE_SUSPENDED &&
+ new_state != USB_STATE_SUSPENDED)
+@@ -1765,10 +1765,18 @@ int usb_new_device(struct usb_device *udev)
+ {
+ int err;
+
+- /* Increment the parent's count of unsuspended children */
+- if (udev->parent)
++ if (udev->parent) {
++ /* Increment the parent's count of unsuspended children */
+ usb_autoresume_device(udev->parent);
+
++ /* Initialize non-root-hub device wakeup to disabled;
++ * device (un)configuration controls wakeup capable
++ * sysfs power/wakeup controls wakeup enabled/disabled
++ */
++ device_init_wakeup(&udev->dev, 0);
++ device_set_wakeup_enable(&udev->dev, 1);
++ }
++
+ err = usb_enumerate_device(udev); /* Read descriptors */
+ if (err < 0)
+ goto fail;
+--
+1.7.2.3
+
Modified: dists/sid/linux-2.6/debian/patches/series/29
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/29 Sun Nov 28 20:24:42 2010 (r16607)
+++ dists/sid/linux-2.6/debian/patches/series/29 Sun Nov 28 23:29:22 2010 (r16608)
@@ -6,3 +6,5 @@
+ bugfix/all/tcp-Make-TCP_MAXSEG-minimum-more-correct.patch
+ bugfix/all/l2tp-Fix-UDP-socket-reference-count-bugs-in-pppol2tp.patch
+ bugfix/x86/KVM-VMX-Fix-host-userspace-gsbase-corruption.patch
++ bugfix/all/USB-retain-power-wakeup-setting-across-reconfig.patch
++ bugfix/all/USB-don-t-enable-remote-wakeup-by-default.patch
More information about the Kernel-svn-changes
mailing list