-/* $OpenBSD: acpi.c,v 1.429 2024/05/29 12:21:33 kettenis Exp $ */
+/* $OpenBSD: acpi.c,v 1.430 2024/06/02 11:08:41 kettenis Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
aml_nodename(node));
/* Collect device power state information. */
+ if (aml_evalinteger(sc, node, "_S0W", 0, NULL, &val) == 0)
+ pci->_s0w = val;
+ else
+ pci->_s0w = -1;
if (aml_evalinteger(sc, node, "_S3D", 0, NULL, &val) == 0)
pci->_s3d = val;
else
TAILQ_FOREACH(pdev, &acpi_pcidevs, next) {
if (pdev->bus == bus && pdev->dev == dev && pdev->fun == fun) {
switch (acpi_softc->sc_state) {
+ case ACPI_STATE_S0:
+ defaultstate = PCI_PMCSR_STATE_D3;
+ state = pdev->_s0w;
+ break;
case ACPI_STATE_S3:
defaultstate = PCI_PMCSR_STATE_D3;
state = MAX(pdev->_s3d, pdev->_s3w);
-/* $OpenBSD: amltypes.h,v 1.49 2022/09/12 17:42:31 kettenis Exp $ */
+/* $OpenBSD: amltypes.h,v 1.50 2024/06/02 11:08:41 kettenis Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
*
int dev;
int fun;
+ int _s0w;
int _s3d;
int _s3w;
int _s4d;