diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2022-02-10 16:41:54 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2022-02-10 16:41:54 +0000 |
commit | 10fd42804d78f90683414def291a8ddc7d277113 (patch) | |
tree | 17a8ef520f06e2a952e8a18c2bc333f1b6188cee /sys/arch | |
parent | dc40d8a34c940c265072c6debf92710f90e631b4 (diff) |
Duplicate "park disk" code, so that the SUSPEND case can be MI, it is only
HIBERNATE that needs to be in MD code.
ok gkoehler
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/amd64/acpi_machdep.c | 20 | ||||
-rw-r--r-- | sys/arch/i386/i386/acpi_machdep.c | 18 |
2 files changed, 19 insertions, 19 deletions
diff --git a/sys/arch/amd64/amd64/acpi_machdep.c b/sys/arch/amd64/amd64/acpi_machdep.c index 75c0b5d0482..c0cd38c7558 100644 --- a/sys/arch/amd64/amd64/acpi_machdep.c +++ b/sys/arch/amd64/amd64/acpi_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi_machdep.c,v 1.96 2022/02/09 23:54:32 deraadt Exp $ */ +/* $OpenBSD: acpi_machdep.c,v 1.97 2022/02/10 16:41:51 deraadt Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * @@ -429,18 +429,18 @@ acpi_sleep_cpu(struct acpi_softc *sc, int state) DEVNAME(sc)); return (ECANCELED); } + + /* + * XXX + * Flag to disk drivers that they should "power down" the disk + * when we get to DVACT_POWERDOWN. + */ + boothowto |= RB_POWERDOWN; + config_suspend_all(DVACT_POWERDOWN); + boothowto &= ~RB_POWERDOWN; } #endif - /* - * XXX - * Flag to disk drivers that they should "power down" the disk - * when we get to DVACT_POWERDOWN. - */ - boothowto |= RB_POWERDOWN; - config_suspend_all(DVACT_POWERDOWN); - boothowto &= ~RB_POWERDOWN; - acpi_sleep_pm(sc, state); printf("%s: acpi_sleep_pm failed", DEVNAME(sc)); return (ECANCELED); diff --git a/sys/arch/i386/i386/acpi_machdep.c b/sys/arch/i386/i386/acpi_machdep.c index 75c5b9f875d..bf415cd46bc 100644 --- a/sys/arch/i386/i386/acpi_machdep.c +++ b/sys/arch/i386/i386/acpi_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi_machdep.c,v 1.78 2022/02/09 23:54:34 deraadt Exp $ */ +/* $OpenBSD: acpi_machdep.c,v 1.79 2022/02/10 16:41:53 deraadt Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * @@ -390,17 +390,17 @@ acpi_sleep_cpu(struct acpi_softc *sc, int state) DEVNAME(sc)); return (ECANCELED); } + + /* XXX + * Flag to disk drivers that they should "power down" the disk + * when we get to DVACT_POWERDOWN. + */ + boothowto |= RB_POWERDOWN; + config_suspend_all(DVACT_POWERDOWN); + boothowto &= ~RB_POWERDOWN; } #endif - /* XXX - * Flag to disk drivers that they should "power down" the disk - * when we get to DVACT_POWERDOWN. - */ - boothowto |= RB_POWERDOWN; - config_suspend_all(DVACT_POWERDOWN); - boothowto &= ~RB_POWERDOWN; - acpi_sleep_pm(sc, state); printf("%s: acpi_sleep_pm failed", DEVNAME(sc)); return (ECANCELED); |