From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Fabio Baltieri <fabio.baltieri@linaro.org>
Cc: Dave Jones <davej@redhat.com>,
Greg KH <gregkh@linuxfoundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
tianyu.lan@intel.com, linux-acpi@vger.kernel.org,
Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org
Subject: Re: [PATCH] ACPI / PM: Take unusual configurations of power resources into account (was: Re: [GIT PATCH] USB patches for 3.9-rc1)
Date: Sat, 23 Feb 2013 23:29:15 +0100 [thread overview]
Message-ID: <1491152.DMDr5jSnJ6@vostro.rjw.lan> (raw)
In-Reply-To: <20130223144859.GA2955@balto.lan>
On Saturday, February 23, 2013 03:48:59 PM Fabio Baltieri wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > Subject: ACPI / PM: Take unusual configurations of power resources into account
> >
> > Commit d2e5f0c (ACPI / PCI: Rework the setup and cleanup of device
> > wakeup) moved the initial disabling of system wakeup for PCI devices
> > into a place where it can actually work and that exposed a hidden old
> > issue with crap^Wunusual system designs where the same power
> > resources are used for both wakeup power and device power control at
> > run time.
> >
> > Namely, say there is one power resource such that the ACPI power
> > state D0 of a PCI device depends on that power resource (i.e. the
> > device is in D0 when that power resource is "on") and it is used
> > as a wakeup power resource for the same device. Then, calling
> > acpi_pci_sleep_wake(pci_dev, false) for the device in question will
> > cause the reference counter of that power resource to drop to 0,
> > which in turn will cause it to be turned off. As a result, the
> > device will go into D3cold at that point, although it should have
> > stayed in D0.
> >
> > As it turns out, that happens to USB controllers on some laptops
> > and USB becomes unusable on those machines as a result, which is
> > a major regression from v3.8.
> >
> > To fix this problem, (1) increment the reference counters of wakup
> > power resources during their initialization if they are "on"
> > initially, (2) prevent acpi_disable_wakeup_device_power() from
> > decrementing the reference counters of wakeup power resources that
> > were not enabled for wakeup power previously, and (3) prevent
> > acpi_enable_wakeup_device_power() from incrementing the reference
> > counters of wakeup power resources that already are enabled for
> > wakeup power.
> >
> > In addition to that, if it is impossible to determine the initial
> > states of wakeup power resources, avoid enabling wakeup for devices
> > whose wakeup power depends on those power resources.
> >
> > Reported-by: Dave Jones <davej@redhat.com>
> > Reported-by: Fabio Baltieri <fabio.baltieri@linaro.org>
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Works just fine!
>
> Tested-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Thanks for verifying!
Rafael
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
next prev parent reply other threads:[~2013-02-23 22:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130222085954.GA4352@redhat.com>
2013-02-22 21:51 ` [GIT PATCH] USB patches for 3.9-rc1 Fabio Baltieri
2013-02-22 22:23 ` Dave Jones
2013-02-23 0:10 ` Fabio Baltieri
2013-02-23 0:35 ` Rafael J. Wysocki
2013-02-23 1:44 ` Fabio Baltieri
2013-02-23 4:33 ` Rafael J. Wysocki
2013-02-23 11:49 ` Fabio Baltieri
2013-02-23 14:18 ` [PATCH] ACPI / PM: Take unusual configurations of power resources into account (was: Re: [GIT PATCH] USB patches for 3.9-rc1) Rafael J. Wysocki
2013-02-23 14:48 ` Fabio Baltieri
2013-02-23 22:29 ` Rafael J. Wysocki [this message]
2013-02-23 0:20 ` [GIT PATCH] USB patches for 3.9-rc1 Rafael J. Wysocki
2013-02-23 0:19 ` Rafael J. Wysocki
2013-02-23 0:30 ` Linus Torvalds
2013-02-23 0:48 ` Rafael J. Wysocki
2013-02-23 1:10 ` Linus Torvalds
2013-02-23 2:01 ` Rafael J. Wysocki
2013-02-23 1:00 ` Rafael J. Wysocki
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=1491152.DMDr5jSnJ6@vostro.rjw.lan \
--to=rjw@sisk.pl \
--cc=akpm@linux-foundation.org \
--cc=bhelgaas@google.com \
--cc=davej@redhat.com \
--cc=fabio.baltieri@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=tianyu.lan@intel.com \
--cc=torvalds@linux-foundation.org \
/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