Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/acpi If both the new and the old methods are availab...



details:   https://anonhg.NetBSD.org/src/rev/d80fb83a9005
branches:  trunk
changeset: 767990:d80fb83a9005
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Sat Aug 06 05:03:56 2011 +0000

description:
If both the new and the old methods are available, prefer the old ones, as
the new ones may not be functional in this case.

diffstat:

 sys/dev/acpi/aibs_acpi.c |  40 ++++++++++++++++++++++++++++++++++++++--
 1 files changed, 38 insertions(+), 2 deletions(-)

diffs (61 lines):

diff -r 6372c0d19795 -r d80fb83a9005 sys/dev/acpi/aibs_acpi.c
--- a/sys/dev/acpi/aibs_acpi.c  Sat Aug 06 03:53:40 2011 +0000
+++ b/sys/dev/acpi/aibs_acpi.c  Sat Aug 06 05:03:56 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: aibs_acpi.c,v 1.2 2011/06/20 17:21:50 pgoyette Exp $ */
+/* $NetBSD: aibs_acpi.c,v 1.3 2011/08/06 05:03:56 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aibs_acpi.c,v 1.2 2011/06/20 17:21:50 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aibs_acpi.c,v 1.3 2011/08/06 05:03:56 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/kmem.h>
@@ -228,6 +228,42 @@
        }
 
        sc->sc_model = true;
+
+       /*
+        * If both the new and the old methods are present, prefer
+        * the old one; GGRP/GITM may not be functional in this case.
+        */
+       rv = AcpiGetHandle(sc->sc_node->ad_handle, "FSIF", &tmp);
+
+       if (ACPI_FAILURE(rv))
+               return;
+
+       rv = AcpiGetHandle(sc->sc_node->ad_handle, "TSIF", &tmp);
+
+       if (ACPI_FAILURE(rv))
+               return;
+
+       rv = AcpiGetHandle(sc->sc_node->ad_handle, "VSIF", &tmp);
+
+       if (ACPI_FAILURE(rv))
+               return;
+
+       rv = AcpiGetHandle(sc->sc_node->ad_handle, "RFAN", &tmp);
+
+       if (ACPI_FAILURE(rv))
+               return;
+
+       rv = AcpiGetHandle(sc->sc_node->ad_handle, "RTMP", &tmp);
+
+       if (ACPI_FAILURE(rv))
+               return;
+
+       rv = AcpiGetHandle(sc->sc_node->ad_handle, "RVLT", &tmp);
+
+       if (ACPI_FAILURE(rv))
+               return;
+
+       sc->sc_model = false;
 }
 
 static void



Home | Main Index | Thread Index | Old Index