public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ozan Çağlayan" <ozan@pardus.org.tr>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [BISECTED] Suspend regression in v2.6.31 with Lenovo 3000 v200
Date: Thu, 24 Jun 2010 10:01:01 +0300	[thread overview]
Message-ID: <201006241001.01587.ozan@pardus.org.tr> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1006221327010.1322-100000@iolanthe.rowland.org>

Salı 22 Haziran 2010 günü (saat 20:47:11) Alan Stern şunları yazmıştı:
> On Tue, 22 Jun 2010, [UTF-8] Ozan Çağlayan wrote:

> 
> Sorry about that; a couple of changes have been made in that area since
> 2.6.31 was released.
> 
> Here's what you need to do: In 2.6.31's hub.c there are two calls to
> device_init_wakeup(), both inside usb_set_device_state().  Change both
> of them into calls to device_set_wakeup_capable() and that should fix
> the problem.  This is what the first part of commit
> 16985408b5c48585762ec3b9b7bae1dec4ad7437 does (but the second half of
> that commit will reintroduce the problem, so don't apply it).

Ok so it should be something like this:

--- linux-2.6.31.orig/drivers/usb/core/hub.c
+++ linux-2.6.31/drivers/usb/core/hub.c
@@ -1305,11 +1305,11 @@ void usb_set_device_state(struct usb_dev
 ·  ·   ·   ·   ·   || 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)

> 
> You can verify the result by checking the contents of
> /sys/bus/usb/devices/2-5/power/wakeup (replace the 2-5 with the correct
> path for the camera device).  With the current code it will say
> "enabled", but after the change it should say "disabled".
> 

I'll make them try this kernel but when I compare the output of

cat /sys/bus/usb/devices/*/power/wakeup

between the patched and non-patched kernels on my system, all wakeup values 
are still enabled. Because as far as I understand the first call still can 
enable remote wakeup as the 2nd parameter isn't a hardcoded 0. Or should this 
only affect some devices?

Thanks again.


---
Ozan Çağlayan
TUBITAK/UEKAE - Pardus Linux
http://www.pardus.org.tr/eng

  reply	other threads:[~2010-06-24  7:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-21  7:22 [BISECTED] Suspend regression in v2.6.31 with Lenovo 3000 v200 Ozan Çağlayan
2010-06-21 10:31 ` Ozan Çağlayan
2010-06-21 16:25 ` Alan Stern
2010-06-22  9:09   ` Ozan Çağlayan
2010-06-22 14:49     ` Alan Stern
2010-06-22 16:53       ` Ozan Çağlayan
2010-06-22 17:47         ` Alan Stern
2010-06-24  7:01           ` Ozan Çağlayan [this message]
2010-06-24 14:10             ` Alan Stern
2010-06-24 15:40               ` Ozan Çağlayan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201006241001.01587.ozan@pardus.org.tr \
    --to=ozan@pardus.org.tr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox