Linux ACPI
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Len Brown <lenb@kernel.org>,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	pm list <linux-pm@lists.linux-foundation.org>
Subject: Re: ACPI: Make /proc/acpi/wakeup interface handle PCI devices (again)
Date: Fri, 3 Oct 2008 05:51:23 -0700	[thread overview]
Message-ID: <20081003055123.bda469ce.akpm@linux-foundation.org> (raw)
In-Reply-To: <200809262221.48040.rjw@sisk.pl>

On Fri, 26 Sep 2008 22:21:47 +0200 "Rafael J. Wysocki" <rjw@sisk.pl> wrote:

> Len,
> 
> I think we should do this in .27.

Is Len not there?  Can some other acpi person please review this for
2.6.27 inclusion?


> From: Rafael J. Wysocki <rjw@sisk.pl>
> 
> ACPI: Make /proc/acpi/wakeup interface handle PCI devices (again)
> 
> Make the ACPI /proc/acpi/wakeup interface set the appropriate
> wake-up bits of physical devices corresponding to the ACPI
> devices and make those bits be set initially for devices that are
> enabled to wake up by default.  This is needed to restore the
> previous behavior for the PCI devices that were previously handled
> correctly with the help of the /proc/acpi/wakeup interface.

hm, if you say so.  It's a bit hard to judge the impact of not fixing this?

When is "previous"?  Was 2.6.26 similarly busted?

Thanks.

> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
>  drivers/acpi/glue.c       |    5 ++++-
>  drivers/acpi/sleep/proc.c |   10 ++++++++++
>  2 files changed, 14 insertions(+), 1 deletion(-)
> 
> Index: linux-2.6/drivers/acpi/sleep/proc.c
> ===================================================================
> --- linux-2.6.orig/drivers/acpi/sleep/proc.c
> +++ linux-2.6/drivers/acpi/sleep/proc.c
> @@ -377,6 +377,14 @@ acpi_system_wakeup_device_seq_show(struc
>  	return 0;
>  }
>  
> +static void physical_device_enable_wakeup(struct acpi_device *adev)
> +{
> +	struct device *dev = acpi_get_physical_device(adev->handle);
> +
> +	if (dev && device_can_wakeup(dev))
> +		device_set_wakeup_enable(dev, adev->wakeup.state.enabled);
> +}
> +
>  static ssize_t
>  acpi_system_write_wakeup_device(struct file *file,
>  				const char __user * buffer,
> @@ -411,6 +419,7 @@ acpi_system_write_wakeup_device(struct f
>  		}
>  	}
>  	if (found_dev) {
> +		physical_device_enable_wakeup(found_dev);
>  		list_for_each_safe(node, next, &acpi_wakeup_device_list) {
>  			struct acpi_device *dev = container_of(node,
>  							       struct
> @@ -428,6 +437,7 @@ acpi_system_write_wakeup_device(struct f
>  				       dev->pnp.bus_id, found_dev->pnp.bus_id);
>  				dev->wakeup.state.enabled =
>  				    found_dev->wakeup.state.enabled;
> +				physical_device_enable_wakeup(dev);
>  			}
>  		}
>  	}
> Index: linux-2.6/drivers/acpi/glue.c
> ===================================================================
> --- linux-2.6.orig/drivers/acpi/glue.c
> +++ linux-2.6/drivers/acpi/glue.c
> @@ -165,8 +165,11 @@ static int acpi_bind_one(struct device *
>  				"firmware_node");
>  		ret = sysfs_create_link(&acpi_dev->dev.kobj, &dev->kobj,
>  				"physical_node");
> -		if (acpi_dev->wakeup.flags.valid)
> +		if (acpi_dev->wakeup.flags.valid) {
>  			device_set_wakeup_capable(dev, true);
> +			device_set_wakeup_enable(dev,
> +						acpi_dev->wakeup.state.enabled);
> +		}
>  	}
>  
>  	return 0;


  reply	other threads:[~2008-10-03 12:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-26 20:21 ACPI: Make /proc/acpi/wakeup interface handle PCI devices (again) Rafael J. Wysocki
2008-10-03 12:51 ` Andrew Morton [this message]
2008-10-03 15:10   ` 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=20081003055123.bda469ce.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.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