Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 2.6.26 and earlier behavior for the PCI devices
that were previously handled correctly with the help of the
/proc/acpi/wakeup interface.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Rafael J. Wysocki and committed by
Linus Torvalds
76acae04 95bf14bf

+14 -1
+4 -1
drivers/acpi/glue.c
··· 165 165 "firmware_node"); 166 166 ret = sysfs_create_link(&acpi_dev->dev.kobj, &dev->kobj, 167 167 "physical_node"); 168 - if (acpi_dev->wakeup.flags.valid) 168 + if (acpi_dev->wakeup.flags.valid) { 169 169 device_set_wakeup_capable(dev, true); 170 + device_set_wakeup_enable(dev, 171 + acpi_dev->wakeup.state.enabled); 172 + } 170 173 } 171 174 172 175 return 0;
+10
drivers/acpi/sleep/proc.c
··· 377 377 return 0; 378 378 } 379 379 380 + static void physical_device_enable_wakeup(struct acpi_device *adev) 381 + { 382 + struct device *dev = acpi_get_physical_device(adev->handle); 383 + 384 + if (dev && device_can_wakeup(dev)) 385 + device_set_wakeup_enable(dev, adev->wakeup.state.enabled); 386 + } 387 + 380 388 static ssize_t 381 389 acpi_system_write_wakeup_device(struct file *file, 382 390 const char __user * buffer, ··· 419 411 } 420 412 } 421 413 if (found_dev) { 414 + physical_device_enable_wakeup(found_dev); 422 415 list_for_each_safe(node, next, &acpi_wakeup_device_list) { 423 416 struct acpi_device *dev = container_of(node, 424 417 struct ··· 437 428 dev->pnp.bus_id, found_dev->pnp.bus_id); 438 429 dev->wakeup.state.enabled = 439 430 found_dev->wakeup.state.enabled; 431 + physical_device_enable_wakeup(dev); 440 432 } 441 433 } 442 434 }