From: Len Brown <lenb@kernel.org>
To: David Brownell <david-b@pacbell.net>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>,
linux-pm@lists.osdl.org, Zhang Rui <rui.zhang@intel.com>,
"linux-acpi@vger" <linux-acpi@vger.kernel.org>,
linux-pm@osdl.org
Subject: Re: [linux-pm] [PATCH 0/6] [-mm]: ACPI: duplicate ACPI procfs functions in sysfs
Date: Wed, 24 Jan 2007 23:14:22 -0500 [thread overview]
Message-ID: <200701242314.23169.lenb@kernel.org> (raw)
In-Reply-To: <200701071931.20306.david-b@pacbell.net>
On Sunday 07 January 2007 22:31, David Brownell wrote:
> > However, I'm not entirely sure /how/ that integration should happen. If
> > both the Linux driver and ACPI know how to enable wakeup for a device,
> > what should writing to power/wakeup do?
If a native hardware device driver knows how to talk to the device,
then it should win, and ACPI should lose.
ACPI, after all, is intended to fill in the missing gaps in native hardware drivers.
> Writing to power/wakeup sets the policy for that device: should it
> issue wakeup events, or not? The answer is "yes" by default, but when
> the hardware is broken, or the user doesn't want that, the policy can
> be changed without a kernel recompile.
For ACPI wakeup devices, the default is "no", except IIR for the power button.
> The driver stack needs to know that policy in order to act properly.
>
> For example, USB devices should only be told to use remote wakeup if
> their ancestral USB host controller is wakeup-enabled. And when that
> controller isn't wakeup-enabled, it can often enter states which save
> more power. (E.g. turn off oscillators and switch off VBUS power.)
>
> You will notice, by the way, that the USB peripherals will never be
> showing up in those ACPI tables... which is a trivial demostration
> of the fact that the ACPI wakeup infrastructure is insufficient to
> manage system wakeup on Linux. That USB keyboard, or mouse, that
> wakes the system does not appear in those ACPI tables.
Oh?
> Also, a network driver needs to know that it should configure WOL, and
> in this mode not that one, etc.
>
> I'd expect drivers and ACPI to cooperate more or less by having the
> driver do the standard stuff (like enabling PCI PME#, and enabling
> wakeup irqs)), and ACPI not being driver-visible while it does
> whatever it must to make those driver directions actually work.
>
>
> > > > So /proc/acpi/wakeup is deprecated by
> > > > /sys/devices/acpi_system/.../xxx/sleep_state && wakeup.
> > >
> > > Why is ACPI still not coupling such information to the REAL device
> > > nodes? On my laptop, right now without any wakeup-capable USB
> > > devices attached, the appended script produces:
> >
> > So for example, the PCI0 device on my Thinkpad is an ACPI wakeup device.
> > Investigating the DSDT suggests that this is just a wrapper around a
> > bunch of platform devices, including the ISA bridge. In this case, what
> > real device should we be associating it with?
>
> I'd guess the root bridge... I have a desktop that seems to have the
> same structure. The PS2K and PS2M devices have separate entries in
> /proc/acpi/wakeup but the DSDT for PCI0 also talks about them. A
> quick look suggests to me that /proc/acpi/wakeup is discarding the
> device tree internal to ACPI ... _SB_.PCI0.SBRG.PS2K._PRW gets
> morphed to "PS2K" and discards the PCI0 parentage.
>
> On the other hand, I think that particular ACPI table must have a
> habit of being flakey. I have one machine that claims to have four
> different USB host adapters, where the silicon only has three; and
> what I'm assuming is a firewire device (S139), where the silicon
> most certainly does not have one of those. And another machine
> lists an MMCI (MMC/SD?) that certainly does not exist ...
The DSDT is whatever the BIOS writer typed in.
We've seen many times that for a new machine they start
with the DSDT for an old machine and modify it until
Windows boots, then claim victory and go home:-)
> So it may well be that doing the work to connect those ACPI tables
> to the system hardware will let Linux discard all the bogus data,
> so it can work better. :)
Agreed.
-Len
next prev parent reply other threads:[~2007-01-25 4:15 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-06 11:35 [PATCH 0/6] [-mm]: ACPI: duplicate ACPI procfs functions in sysfs Zhang Rui
2007-01-06 22:21 ` David Brownell
2007-01-07 5:54 ` [linux-pm] " Matthew Garrett
2007-01-08 3:31 ` David Brownell
2007-01-08 13:10 ` Pavel Machek
2007-01-25 4:14 ` Len Brown [this message]
2007-01-25 5:50 ` Matthew Garrett
2007-01-25 9:35 ` David Brownell
2007-01-08 11:40 ` Zhang Rui
2007-01-08 13:13 ` Pavel Machek
2007-01-25 2:28 ` Len Brown
2007-01-25 12:08 ` Pavel Machek
2007-01-25 13:15 ` David Brownell
2007-01-25 19:51 ` Pavel Machek
2007-01-26 1:36 ` Zhang Rui
2007-01-10 20:53 ` David Brownell
2007-01-25 4:17 ` Len Brown
2007-01-25 13:15 ` Pavel Machek
2007-01-25 3:33 ` [linux-pm] " Len Brown
2007-01-25 3:28 ` Len Brown
2007-01-25 9:54 ` David Brownell
2007-01-25 19:37 ` Pavel Machek
2007-01-07 11:15 ` Pavel Machek
2007-01-25 2:03 ` Len Brown
2007-01-25 2:52 ` Nigel Cunningham
2007-01-25 8:17 ` Rafael J. Wysocki
2007-01-25 10:00 ` [linux-pm] " David Brownell
2007-01-18 6:53 ` Zhang Rui
2007-01-21 5:48 ` [PATCH 0/3] " Zhang Rui
2007-01-25 3:50 ` Len Brown
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=200701242314.23169.lenb@kernel.org \
--to=lenb@kernel.org \
--cc=david-b@pacbell.net \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pm@lists.osdl.org \
--cc=linux-pm@osdl.org \
--cc=mjg59@srcf.ucam.org \
--cc=rui.zhang@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).