Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi Only check the parent's power state if the pare...
details: https://anonhg.NetBSD.org/src/rev/6e24e661ff16
branches: trunk
changeset: 755540:6e24e661ff16
user: jruoho <jruoho%NetBSD.org@localhost>
date: Tue Jun 08 21:47:26 2010 +0000
description:
Only check the parent's power state if the parent has power management
capabilities. Based on a short DSDT survey, not all systems adhere to the
model noted in the comment.
diffstat:
sys/dev/acpi/acpi_power.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diffs (35 lines):
diff -r 667a718a4e38 -r 6e24e661ff16 sys/dev/acpi/acpi_power.c
--- a/sys/dev/acpi/acpi_power.c Tue Jun 08 20:40:07 2010 +0000
+++ b/sys/dev/acpi/acpi_power.c Tue Jun 08 21:47:26 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_power.c,v 1.19 2010/06/08 18:38:18 jruoho Exp $ */
+/* $NetBSD: acpi_power.c,v 1.20 2010/06/08 21:47:26 jruoho Exp $ */
/*-
* Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_power.c,v 1.19 2010/06/08 18:38:18 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_power.c,v 1.20 2010/06/08 21:47:26 jruoho Exp $");
#include <sys/param.h>
#include <sys/kmem.h>
@@ -400,9 +400,13 @@
* devices. Consequently, we cannot set the state to a lower
* (i.e. higher power) state than the parent device's state.
*/
- if (ad->ad_parent != NULL && ad->ad_parent->ad_state > state) {
- rv = AE_ABORT_METHOD;
- goto fail;
+ if ((ad->ad_parent != NULL) &&
+ (ad->ad_parent->ad_flags & ACPI_DEVICE_POWER) != 0) {
+
+ if (ad->ad_parent->ad_state > state) {
+ rv = AE_ABORT_METHOD;
+ goto fail;
+ }
}
/*
Home |
Main Index |
Thread Index |
Old Index