Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi Improve error and debug messages.
details: https://anonhg.NetBSD.org/src/rev/095ef4b2d904
branches: trunk
changeset: 756966:095ef4b2d904
user: jruoho <jruoho%NetBSD.org@localhost>
date: Sun Aug 08 18:25:06 2010 +0000
description:
Improve error and debug messages.
diffstat:
sys/dev/acpi/acpi_cpu_cstate.c | 16 ++++++----------
sys/dev/acpi/acpi_cpu_pstate.c | 8 ++++----
2 files changed, 10 insertions(+), 14 deletions(-)
diffs (94 lines):
diff -r bb11aa880f9d -r 095ef4b2d904 sys/dev/acpi/acpi_cpu_cstate.c
--- a/sys/dev/acpi/acpi_cpu_cstate.c Sun Aug 08 18:24:34 2010 +0000
+++ b/sys/dev/acpi/acpi_cpu_cstate.c Sun Aug 08 18:25:06 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_cstate.c,v 1.15 2010/08/08 16:58:42 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_cstate.c,v 1.16 2010/08/08 18:25:06 jruoho Exp $ */
/*-
* Copyright (c) 2010 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_cstate.c,v 1.15 2010/08/08 16:58:42 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_cstate.c,v 1.16 2010/08/08 18:25:06 jruoho Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -134,7 +134,7 @@
panic("NOTREACHED");
}
- aprint_verbose_dev(sc->sc_dev, "C%d: %5s, "
+ aprint_debug_dev(sc->sc_dev, "C%d: %5s, "
"lat %3u us, pow %5u mW, addr 0x%06x, flags 0x%02x\n",
i, str, cs->cs_latency, cs->cs_power,
(uint32_t)cs->cs_addr, cs->cs_flags);
@@ -286,10 +286,6 @@
if (buf.Pointer != NULL)
ACPI_FREE(buf.Pointer);
- if (ACPI_FAILURE(rv))
- aprint_error_dev(sc->sc_dev, "failed to evaluate "
- "_CST: %s\n", AcpiFormatException(rv));
-
return rv;
}
@@ -423,7 +419,7 @@
default:
if ((sc->sc_flags & ACPICPU_FLAG_C_FFH) == 0) {
- rv = AE_AML_BAD_RESOURCE_VALUE;
+ rv = AE_SUPPORT;
goto out;
}
}
@@ -460,8 +456,8 @@
out:
if (ACPI_FAILURE(rv))
- aprint_verbose_dev(sc->sc_dev,
- "invalid _CST: %s\n", AcpiFormatException(rv));
+ aprint_debug_dev(sc->sc_dev, "invalid "
+ "_CST: %s\n", AcpiFormatException(rv));
return rv;
}
diff -r bb11aa880f9d -r 095ef4b2d904 sys/dev/acpi/acpi_cpu_pstate.c
--- a/sys/dev/acpi/acpi_cpu_pstate.c Sun Aug 08 18:24:34 2010 +0000
+++ b/sys/dev/acpi/acpi_cpu_pstate.c Sun Aug 08 18:25:06 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_pstate.c,v 1.3 2010/08/08 18:10:34 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_pstate.c,v 1.4 2010/08/08 18:25:06 jruoho Exp $ */
/*-
* Copyright (c) 2010 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_pstate.c,v 1.3 2010/08/08 18:10:34 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_pstate.c,v 1.4 2010/08/08 18:25:06 jruoho Exp $");
#include <sys/param.h>
#include <sys/kmem.h>
@@ -385,7 +385,7 @@
width = reg[i]->reg_bitwidth;
if (width != 8 && width != 16 && width != 32) {
- rv = AE_SUPPORT;
+ rv = AE_AML_BAD_RESOURCE_VALUE;
goto out;
}
@@ -394,7 +394,7 @@
case ACPI_ADR_SPACE_FIXED_HARDWARE:
if ((sc->sc_flags & ACPICPU_FLAG_P_FFH) == 0) {
- rv = AE_AML_BAD_RESOURCE_VALUE;
+ rv = AE_SUPPORT;
goto out;
}
Home |
Main Index |
Thread Index |
Old Index