mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: Witold Szczeponik <Witold.Szczeponik@gmx.net>
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bjorn Helgaas <bjorn.helgaas@hp.com>, Adam Belay <abelay@mit.edu>,
	rjw@sisk.pl
Subject: Re: [PATCH] PNPACPI: Enable Power Support
Date: Wed, 10 Dec 2008 23:50:52 -0200	[thread overview]
Message-ID: <20081211015052.GA18925@khazad-dum.debian.net> (raw)
In-Reply-To: <20081211012838.GA18065@khazad-dum.debian.net>

On Wed, 10 Dec 2008, Henrique de Moraes Holschuh wrote:
> Bah, never mind.  Major issue between the keyboard and the chair, on my
> end...  Got PR# and PS# confused.  The ThinkPad ACPI DSDT in question has
> the standard crap for wake device control, and PR# methods, but no PS#
> methods.
> 
> The PR0..PR2 nodes for the UHCI and EHCI USB ports on the ThinkPad T43
> mention a power resource object, and that power resource CAN power on/off
> the USB ports (and that freaks out the UHCI and EHCI kernel drivers causing
> over-current reports, but that was to be expected).  The AML code tells the
> EC to do some magic that probably tells a MOSFET somewhere in the mainboard
> to stop supplying power to the ports.
> 
> And Windows XP (this is not a Vista BIOS and I never tried running Vista in
> it...) is noticing that power resource (even without PS3 or PR3 nodes) and
> calling that power resource _OFF handler to power down USB ports when it
> doesn't need these devices for wakeup reasons, before entering STR.
> 
> Anyone has any clue on what part of the ACPI spec could result on that
> behaviour?  Because otherwise I will just bloody special-case it into
> thinkpad-acpi's suspend and resume stuff.  It will piss the USB subsystem
> off if I can't arrange to do it on early resume and late suspend, however.

Found it.  ACPI 3.0b, page 238, 7.2 Device Power Management Objects.

"For OSPM to put the device in the D3 state, the following must occur:

All Power Resources no longer referenced by any device in the system must
be in the OFF state"

If you want to put *any* particular ACPI device into D3, you turn off
*every* unused power resource, be them related or not to that device...

Windows XP seems to do it, and powers down the USB ports. None of them are
set for wake-from-S3, they all go to D3 and no references to the power
resources are left.  We probably should be doing the same.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

      reply	other threads:[~2008-12-11  1:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-08 20:57 Witold Szczeponik
2008-12-09  2:49 ` Adam M Belay
2008-12-09  3:00   ` Bjorn Helgaas
2008-12-09  3:25     ` Adam M Belay
2008-12-10 19:32   ` Witold Szczeponik
2008-12-10  9:53 ` Henrique de Moraes Holschuh
2008-12-10 10:22   ` Oliver Neukum
2008-12-10 23:26     ` Henrique de Moraes Holschuh
2008-12-10 19:30   ` Witold Szczeponik
2008-12-10 23:21     ` Henrique de Moraes Holschuh
2008-12-11  1:28       ` Henrique de Moraes Holschuh
2008-12-11  1:50         ` Henrique de Moraes Holschuh [this message]

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=20081211015052.GA18925@khazad-dum.debian.net \
    --to=hmh@hmh.eng.br \
    --cc=Witold.Szczeponik@gmx.net \
    --cc=abelay@mit.edu \
    --cc=bjorn.helgaas@hp.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /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

all inboxes | Powered by JetHome®