Page MenuHomeFreeBSD

D55118.id171184.diff
No OneTemporary

D55118.id171184.diff

diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -2128,6 +2128,7 @@
struct acpi_softc *sc;
ACPI_HANDLE handle;
ACPI_STATUS status;
+ int state;
char sxd[8];
handle = acpi_get_handle(dev);
@@ -2149,9 +2150,17 @@
/*
* Override next state with the value from _SxD, if present.
* Note illegal _S0D is evaluated because some systems expect this.
+ *
+ * XXX: obiwac When doing s2idle, we call _S3D. Not entirely sure this is
+ * correct, but I can't find any info on which _SxD object we should be
+ * evaluating.
*/
sc = device_get_softc(bus);
- snprintf(sxd, sizeof(sxd), "_S%dD", acpi_stype_to_sstate(sc, sc->acpi_stype));
+ if (sc->acpi_stype == POWER_STYPE_SUSPEND_TO_IDLE)
+ state = ACPI_STATE_S3;
+ else
+ state = acpi_stype_to_sstate(sc, sc->acpi_stype);
+ snprintf(sxd, sizeof(sxd), "_S%dD", state);
status = acpi_GetInteger(handle, sxd, dstate);
if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
device_printf(dev, "failed to get %s on %s: %s\n", sxd,

File Metadata

Mime Type
text/plain
Expires
Fri, Mar 20, 5:12 AM (16 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28444863
Default Alt Text
D55118.id171184.diff (1 KB)

Event Timeline