From patchwork Sat Aug 12 07:44:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 9896929 X-Patchwork-Delegate: andy.shevchenko@gmail.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 23C5760236 for ; Sat, 12 Aug 2017 07:46:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1800628B40 for ; Sat, 12 Aug 2017 07:46:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D04528BB9; Sat, 12 Aug 2017 07:46:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B8EA28B40 for ; Sat, 12 Aug 2017 07:46:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750995AbdHLHpw (ORCPT ); Sat, 12 Aug 2017 03:45:52 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36195 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750771AbdHLHpv (ORCPT ); Sat, 12 Aug 2017 03:45:51 -0400 Received: by mail-wm0-f66.google.com with SMTP id d40so8682579wma.3; Sat, 12 Aug 2017 00:45:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tvdjgy6EzlWy+7MAOFMfO1VGv26IDvlew44JYaCYi+g=; b=Nw7wzVEFZwSRbumRiWhOeVg35qQNGTFJHY6O3GaZFiOEwSgOdki0sf1UOhs+rRVebU LVpHFeYMFV/1OH4oBfPetMoPrTF8jR5njrVZQUex9XYvkVNUsMEHBDLys1tL3JHlDweC 7AyKK2zfD6grcjIJ2AG/A9x5W6k2sZ7m7CCbCsi9/t/SUaLHt0GHbWAjt6JEHqnRIJ4A 43Xzq2BgRW2PGpbh3c3lWQ1Tme/ZWOElBH55xGUkTg8N+TKgs1h5KvCO5lezqNsh3Mwy by+C+11m+XK2bT7igQCa7wsNlybfm7KpoMPDMQAsWI+0Bb1STE1sQhP4hZXyYNa7ZyjA S2Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tvdjgy6EzlWy+7MAOFMfO1VGv26IDvlew44JYaCYi+g=; b=Xswkenbwn5BFpXne3b2HFs6gRw0He3DU0ZKvKAG7nMObZrORtxPtU/dtpQzr9e+/Jf xE3HnH4C3Hffc81V0aGBmv89eowusw14tzxTHy4Pam8ET9uwthdi60OVRibeLlKvoaTg 28xFix+38/XClGeRq0Hn1FCnxO5TX16qNPy+R0j1a9nSCkngoBhqz8LnwGon2flZikOq lNDoWTChEtkxYqQeGgrKKSRkU4tS8K6cU7E56aSKXOKp78q7JtZ8gAyNE4zEXiFa2ZlL pKCUoAzlRanj2Zey+bPjZct17GcZEaBx9w6U80sDoMcuRhnPiLBP9ZbAXzfc80wvlnXj UVFw== X-Gm-Message-State: AHYfb5ge3tDiKxtsb9fv1plo4KJtilyxjHZl5Phti+K5aMqdv0Q+Vwxq avbphCorZC74jw== X-Received: by 10.28.87.6 with SMTP id l6mr619986wmb.110.1502523950194; Sat, 12 Aug 2017 00:45:50 -0700 (PDT) Received: from Pali-Latitude.lan (pali.kolej.mff.cuni.cz. [78.128.193.202]) by smtp.gmail.com with ESMTPSA id d200sm651526wmd.32.2017.08.12.00.45.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Aug 2017 00:45:49 -0700 (PDT) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Corentin Chary , Darren Hart , Andy Shevchenko Cc: acpi4asus-user@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [PATCH 2/4] platform/x86: asus-wmi: Evaluate wmi method with instance number 0x0 Date: Sat, 12 Aug 2017 09:44:16 +0200 Message-Id: <1502523858-25716-3-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1502523858-25716-1-git-send-email-pali.rohar@gmail.com> References: <1502523858-25716-1-git-send-email-pali.rohar@gmail.com> MIME-Version: 1.0 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP According to available DSDT dump from Asus machine, there is the only one instance of the WMI GUID 97845ED0-4E6D-11DE-8A39-0800200C9A66 and so it is 0x0. Moreover corresponding method WMBC does not check Arg0 (instance number) at all. DSDT dump is available at: https://lwn.net/Articles/391249/ _WDG dump: 0xD0, 0x5E, 0x84, 0x97, 0x6D, 0x4E, 0xDE, 0x11, 0x8A, 0x39, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66, 0x42, 0x43, // Object ID "BC" = method "WMBC" 0x01, // Instance count 0x02, // Flags Signed-off-by: Pali Rohár --- drivers/platform/x86/asus-wmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index 709e3a6..48e1541 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -299,7 +299,7 @@ static int asus_wmi_evaluate_method(u32 method_id, u32 arg0, u32 arg1, union acpi_object *obj; u32 tmp = 0; - status = wmi_evaluate_method(ASUS_WMI_MGMT_GUID, 1, method_id, + status = wmi_evaluate_method(ASUS_WMI_MGMT_GUID, 0, method_id, &input, &output); if (ACPI_FAILURE(status)) @@ -1946,7 +1946,7 @@ static int show_call(struct seq_file *m, void *data) acpi_status status; status = wmi_evaluate_method(ASUS_WMI_MGMT_GUID, - 1, asus->debug.method_id, + 0, asus->debug.method_id, &input, &output); if (ACPI_FAILURE(status))