From: Len Brown <lenb@kernel.org>
To: David Brownell <david-b@pacbell.net>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
Linux ACPI list <linux-acpi@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [patch 2.6.21-rc5-git] make /proc/acpi/wakeup more useful
Date: Wed, 25 Apr 2007 15:22:04 -0400 [thread overview]
Message-ID: <200704251522.04303.lenb@kernel.org> (raw)
In-Reply-To: <200704031741.42273.david-b@pacbell.net>
Applied,
and thanks for turning over the rocks in sysfs to see what wiggled out:-)
thanks,
-Len
On Tuesday 03 April 2007 20:41, David Brownell wrote:
> This updates /proc/acpi/wakeup to be more informative, primarily by showing
> the sysfs node associated with each wakeup-enabled device. Example:
>
> Device S-state Status Sysfs node
> PCI0 S4 disabled no-bus:pci0000:00
> PS2M S4 disabled pnp:00:05
> PS2K S4 disabled pnp:00:06
> UAR1 S4 disabled pnp:00:08
> USB1 S3 disabled pci:0000:00:03.0
> USB2 S3 disabled pci:0000:00:03.1
> USB3 S3 disabled
> USB4 S3 disabled pci:0000:00:03.3
> S139 S4 disabled
> LAN S4 disabled pci:0000:00:04.0
> MDM S4 disabled
> AUD S4 disabled pci:0000:00:02.7
> SLPB S4 *enabled
>
> Eventually this file should be removed, but until then it's almost the only
> way we have to tell how the relevant ACPI tables are broken (and cope). In
> that example, two devices don't actually exist (USB3, S139), one can't issue
> wakeup events (PCI0), and two seem harmlessly (?) confused (MDM and AUD are
> the same PCI device, but it's the _modem_ that does wake-on-ring).
>
> In particular, we need to be sure driver model nodes are properly hooked
> up before we can get rid of this ACPI-only interface for wakeup events.
>
> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
>
> --- g26.orig/drivers/acpi/sleep/proc.c 2007-04-03 16:27:22.000000000 -0700
> +++ g26/drivers/acpi/sleep/proc.c 2007-04-03 16:43:26.000000000 -0700
> @@ -360,21 +360,31 @@ acpi_system_wakeup_device_seq_show(struc
> {
> struct list_head *node, *next;
>
> - seq_printf(seq, "Device Sleep state Status\n");
> + seq_printf(seq, "Device\tS-state\t Status Sysfs node\n");
>
> spin_lock(&acpi_device_lock);
> list_for_each_safe(node, next, &acpi_wakeup_device_list) {
> struct acpi_device *dev =
> container_of(node, struct acpi_device, wakeup_list);
> + struct device *ldev;
>
> if (!dev->wakeup.flags.valid)
> continue;
> spin_unlock(&acpi_device_lock);
> - seq_printf(seq, "%4s %4d %s%8s\n",
> +
> + ldev = acpi_get_physical_device(dev->handle);
> + seq_printf(seq, "%s\t S%d\t%c%-8s ",
> dev->pnp.bus_id,
> (u32) dev->wakeup.sleep_state,
> - dev->wakeup.flags.run_wake ? "*" : "",
> + dev->wakeup.flags.run_wake ? '*' : ' ',
> dev->wakeup.state.enabled ? "enabled" : "disabled");
> + if (ldev)
> + seq_printf(seq, "%s:%s",
> + ldev->bus ? ldev->bus->name : "no-bus",
> + ldev->bus_id);
> + seq_printf(seq, "\n");
> + put_device(ldev);
> +
> spin_lock(&acpi_device_lock);
> }
> spin_unlock(&acpi_device_lock);
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
prev parent reply other threads:[~2007-04-25 19:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-04 0:41 [patch 2.6.21-rc5-git] make /proc/acpi/wakeup more useful David Brownell
2007-04-05 7:59 ` Zhang Rui
2007-04-05 10:58 ` David Brownell
2007-04-06 9:36 ` Zhang Rui
2007-04-06 15:43 ` David Brownell
2007-04-07 5:01 ` Greg KH
2007-04-07 20:08 ` David Brownell
2007-04-09 2:36 ` Zhang Rui
2007-04-09 5:35 ` David Brownell
2007-04-10 23:29 ` David Brownell
2007-04-11 0:10 ` David Brownell
2007-04-13 15:59 ` Pavel Machek
2007-04-17 19:53 ` David Brownell
2007-04-17 21:57 ` David Brownell
2007-04-18 3:03 ` Greg KH
2007-04-18 3:25 ` David Brownell
2007-04-05 9:26 ` Matthew Garrett
2007-04-05 10:35 ` David Brownell
2007-04-25 19:22 ` Len Brown [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=200704251522.04303.lenb@kernel.org \
--to=lenb@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=david-b@pacbell.net \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.