From patchwork Wed Dec 12 18:27:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 205602 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id CD7752C0095 for ; Thu, 13 Dec 2012 05:27:29 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Tir1j-0003SH-PS; Wed, 12 Dec 2012 18:27:27 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Tir1h-0003SB-TL for fwts-devel@lists.ubuntu.com; Wed, 12 Dec 2012 18:27:25 +0000 Received: from cpc3-craw6-2-0-cust180.croy.cable.virginmedia.com ([77.100.248.181] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Tir1h-0000K6-MH for fwts-devel@lists.ubuntu.com; Wed, 12 Dec 2012 18:27:25 +0000 From: Colin King To: fwts-devel@lists.ubuntu.com Subject: [PATCH] acpi: method: ignore _WAK return values Date: Wed, 12 Dec 2012 18:27:25 +0000 Message-Id: <1355336845-29302-1-git-send-email-colin.king@canonical.com> X-Mailer: git-send-email 1.8.0 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: fwts-devel-bounces@lists.ubuntu.com Errors-To: fwts-devel-bounces@lists.ubuntu.com From: Colin Ian King The kernel doesn't care about the returned values from _WAK so let's not get too fussy about checking these. Most firmware seems to do this wrong anyway, so it's not helpful to flag up an error when the kernel doesn't care either. Signed-off-by: Colin Ian King Acked-by: Keng-Yu Lin Acked-by: Ivan Hu --- src/acpi/method/method.c | 35 ++--------------------------------- 1 file changed, 2 insertions(+), 33 deletions(-) diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c index a8669f2..be274b9 100644 --- a/src/acpi/method/method.c +++ b/src/acpi/method/method.c @@ -3414,9 +3414,10 @@ static void method_test_WAK_return( ACPI_OBJECT *obj, void *private) { - uint32_t Sstate = *(uint32_t*)private; int failed = 0; + FWTS_UNUSED(private); + if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) == FWTS_OK) { fwts_method_dump_object(fw, obj); @@ -3439,38 +3440,6 @@ static void method_test_WAK_return( fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed++; } - else { - if (obj->Package.Elements[0].Integer.Value > 0x00000002) { - fwts_failed(fw, LOG_LEVEL_MEDIUM, - "Method_WAKBitField", - "_WAK: expecting condition " - "bit-field (element 0) of " - "packages to be in range, " - "got 0x%8.8" PRIx64 ".", - obj->Package.Elements[0].Integer.Value); - fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); - failed++; - } - if (!( - ((obj->Package.Elements[1].Integer.Value == Sstate) && (obj->Package.Elements[0].Integer.Value == 0)) || - ((obj->Package.Elements[1].Integer.Value == 0) && (obj->Package.Elements[0].Integer.Value != 0)) )) { - fwts_warning(fw, - "_WAK: expecting power supply S-state (element 1) " - "of packages to be 0x%8.8" PRIx32 - ", got 0x%8.8" PRIx64 ".", - Sstate, obj->Package.Elements[0].Integer.Value); - fwts_advice(fw, "_WAK should return 0 if the wake failed and was unsuccessful (i.e. element[0] " - "is non-zero) OR should return the S-state. " - "This can confuse the operating system as this _WAK return indicates that the " - "S-state was not entered because of too much current being drawn from the " - "power supply, however, the BIOS may have actually entered this state and the " - "_WAK method is misinforming the operating system. Currently Linux does not " - "check for the return type from _WAK, so it should theoretically not affect the " - "operation of suspend/resume."); - - failed++; - } - } } if (!failed) fwts_passed(fw,