On Sun, 2010-11-28 at 16:14 +0100, Maik Zumstrull wrote:
> >> I tried putting the device to sleep after telling the kernel to ignore
> >> USB wakeup requests from the 3G modem, and it works, apparently
> >> without nasty side effects, the 3G still works after. I think
> >> eeepc-acpi-scripts should include a sleep.d hook to do this.
> 
> > A better solution would be to see if this is fixed upstream, and if so,
> > backport the fix for the kernel in Squeeze. Would you please try the
> > kernel in experimental to see if the problem is resolved there?
> 
> Okay, I installed the linux-image-2.6.36-trunk-686-bigmem package
> (plus linux-base) and moved my sleep.d hook out of the way. Then I
> shut down completely and booted into the new kernel.
> 
> The system does stay asleep, so that's fixed.

Please can you test whether the attached patch fixes our package of
Linux 2.6.32.  You will need to rebuild the kernel package by following
the instructions at
<http://kernel-handbook.alioth.debian.org/ch-common-tasks.html#s-common-official>.

> However, after waking
> up, the system freezes for a few seconds several times.
[...]

This should be treated as a separate bug; I'll follow up to the new bug
number shortly.

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
commit 62c008d3ef95c2a52aa4e6946e8dc55a8d8af2d7
Author: Alan Stern <st...@rowland.harvard.edu>
Date:   Fri Apr 2 13:21:33 2010 -0400

    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 <st...@rowland.harvard.edu>
    Signed-off-by: Greg Kroah-Hartman <gre...@suse.de>

commit d3281620ac5baed761e5134f85dc102645a3804b
Author: Dan Streetman <ddstr...@ieee.org>
Date:   Wed Jan 6 09:56:53 2010 -0500

    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 <ddstr...@ieee.org>
    Cc: David Brownell <dbrown...@users.sourceforge.net>
    Cc: Alan Stern <st...@rowland.harvard.edu>
    Signed-off-by: Greg Kroah-Hartman <gre...@suse.de>
    [bwh: Backport to 2.6.32]
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 12254e1..d2069a0 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,17 @@ 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);
+	}
+
 	err = usb_enumerate_device(udev);	/* Read descriptors */
 	if (err < 0)
 		goto fail;

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to