[RFC] halt to s4 for WOL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

for some years our old Mac Pro and newer Mac mini used for unit testing and VMs
annoyed me in that we could never get Wake-On-Lan working on them at all.

Some people found some pci config bit poking for some older Mac mini that did not
work on our newer Mac mini, nor on our older Mac Pro.

	http://blog.dhampir.no/content/wake-on-lan-on-a-n-intel-mac-mini-with-linux

While we where setting up some new things we finally wanted this solved, and I found
a clever workaround by halting the machine to S4 instead of S5.

While of course this patch can not be applied as it. I just wanted to ask for feedback -
maybe a kernel or sysfs interface can be added to have a halt=S4 or whatever
switch as this might be useful to convince other machines to supply power to the NIC,
too.

--- linux-4.3/drivers/acpi/sleep.c.orig	2015-12-29 15:27:21.100959963 +0000
+++ linux-4.3/drivers/acpi/sleep.c	2015-12-29 15:28:36.828960630 +0000
@@ -811,7 +811,7 @@
static void acpi_power_off_prepare(void)
{
	/* Prepare to power off the system */
-	acpi_sleep_prepare(ACPI_STATE_S5);
+	acpi_sleep_prepare(ACPI_STATE_S4);
	acpi_disable_all_gpes();
	acpi_os_wait_events_complete();
}
@@ -821,7 +821,7 @@
	/* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */
	printk(KERN_DEBUG "%s called\n", __func__);
	local_irq_disable();
-	acpi_enter_sleep_state(ACPI_STATE_S5);
+	acpi_enter_sleep_state(ACPI_STATE_S4);
}

int __init acpi_sleep_init(void)

-- 
ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
http://exactcode.com | http://exactscan.com | http://ocrkit.com | http://t2-project.org | http://rene.rebe.de

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux