Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp56607ybg; Mon, 8 Jun 2020 16:18:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4croUh3j+O18Y8G4875FVzxVCsFzI0vSDqM78qdS3E/t8saFfw/2evt0V/DHgKKNV7lF6 X-Received: by 2002:a17:906:370a:: with SMTP id d10mr22733585ejc.433.1591658327577; Mon, 08 Jun 2020 16:18:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591658327; cv=none; d=google.com; s=arc-20160816; b=k+mUf+m0k6hwXjvYyV/r6GIB9zxs5MY4u32yrVlu4ecD6uIx0ApaADKOfsvFvE01A1 9mCmS8GBKS2I5BBWc4QZ2mgaOC8rXegATNoL8GML0RedGontXjxHfQr4sFVcagM5pIrD b/tKpQ6OsQOqGzZ5i6yi8GfmC/qe9oj9RCN4IzxbfXwjAwW7xQcQotnBMCU9CK3pcP2k 4Urzf/A/3IPKWZQW9Vt30h5SGp8HsT40WyEs/YSAFvj3ZLuIc1lbeLllyX2brs3g1i1g r+icb4jfJl9s8u2y4Hqb4HQ9gfJ0LGX48DuuuzwGh2zYfkgc6x5dZEdVQEfm3h5d37V2 AsgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LtoLw8uD6RfuBHtEH/UIOWnSJsJ1MMSolTLjGvM9vEw=; b=hOK2vhqgyc+DLjXL3pPuHtlAnzW+A4zI68Q3ZvYXivC3dHQ6wkfI6KK62zvUU6vMcH a4c4f6NpndrIbzbWNvcE1jM1pRiXx5fBIG+Gm284Iw+KHFJZMQHau4cwD1IqiuIHA4T6 uAQbVgU8qQp9qb9fMxVmsPCM8M6m13318N3UOfGBkNE+QgKtmLTgoJ0a4K1geG5boHyn QJgVSrOoW1CqesiWOvlFToOlTnZIDr+igaaMIk3J52U23NuMCVZ3tKW8AWS1dYYdOUp7 YFxrnKSmQP3z5DDETvGBmrqdBarMdogQNOIX8azSKSxL5EXuylLiiLG7N9NabP4Swhky Ckig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=W7Lc85CF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o18si9593698ejb.193.2020.06.08.16.18.25; Mon, 08 Jun 2020 16:18:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=W7Lc85CF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729795AbgFHXOY (ORCPT + 99 others); Mon, 8 Jun 2020 19:14:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:58772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729001AbgFHXLw (ORCPT ); Mon, 8 Jun 2020 19:11:52 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 16726214D8; Mon, 8 Jun 2020 23:11:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591657911; bh=KNfO35iPHZp9nM2fIPPOABKvCwIRqbqzPl/v/G3GlKU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W7Lc85CFlDt83ZX8sohUfW87QzT4DAN95yyidRvFTr4ePYYoZOEaZY+yud0haQIZ7 BTPdWMYp2l3Q2tNeMqDws1NNdFWT70x0/7eG6H8xtoeJlK0BXeZSHoJtNfTi1xKqXM 9DcxdsezO8JiW3V89cNxwxuJaRN1uDIRhGEmCxhw= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Chris Chiu , Hans de Goede , Andy Shevchenko , Sasha Levin , acpi4asus-user@lists.sourceforge.net, platform-driver-x86@vger.kernel.org Subject: [PATCH AUTOSEL 5.7 263/274] platform/x86: asus_wmi: Reserve more space for struct bias_args Date: Mon, 8 Jun 2020 19:05:56 -0400 Message-Id: <20200608230607.3361041-263-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org> References: <20200608230607.3361041-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chris Chiu [ Upstream commit 7b91f1565fbfbe5a162d91f8a1f6c5580c2fc1d0 ] On the ASUS laptop UX325JA/UX425JA, most of the media keys are not working due to the ASUS WMI driver fails to be loaded. The ACPI error as follows leads to the failure of asus_wmi_evaluate_method. ACPI BIOS Error (bug): AE_AML_BUFFER_LIMIT, Field [IIA3] at bit offset/length 96/32 exceeds size of target Buffer (96 bits) (20200326/dsopcode-203) No Local Variables are initialized for Method [WMNB] ACPI Error: Aborting method \_SB.ATKD.WMNB due to previous error (AE_AML_BUFFER_LIMIT) (20200326/psparse-531) The DSDT for the WMNB part shows that 5 DWORD required for local variables and the 3rd variable IIA3 hit the buffer limit. Method (WMNB, 3, Serialized) { .. CreateDWordField (Arg2, Zero, IIA0) CreateDWordField (Arg2, 0x04, IIA1) CreateDWordField (Arg2, 0x08, IIA2) CreateDWordField (Arg2, 0x0C, IIA3) CreateDWordField (Arg2, 0x10, IIA4) Local0 = (Arg1 & 0xFFFFFFFF) If ((Local0 == 0x54494E49)) .. } The limitation is determined by the input acpi_buffer size passed to the wmi_evaluate_method. Since the struct bios_args is the data structure used as input buffer by default for all ASUS WMI calls, the size needs to be expanded to fix the problem. Signed-off-by: Chris Chiu Reviewed-by: Hans de Goede Signed-off-by: Andy Shevchenko Signed-off-by: Sasha Levin --- drivers/platform/x86/asus-wmi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index bb7c529d7d16..cd212ee210e2 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -116,6 +116,8 @@ struct bios_args { u32 arg0; u32 arg1; u32 arg2; /* At least TUF Gaming series uses 3 dword input buffer. */ + u32 arg4; + u32 arg5; } __packed; /* -- 2.25.1