Message ID | 20231127222242.115507-1-W_Armin@gmx.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp3506449vqx; Mon, 27 Nov 2023 14:24:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IGgApQcLBffNNeVfzM9QsjM5/VRdocTXHVWDiqANQVLtJIGUY7l09G92ojk7XXOmH+xCDW5 X-Received: by 2002:a17:90b:3804:b0:285:cca0:df7f with SMTP id mq4-20020a17090b380400b00285cca0df7fmr5368307pjb.36.1701123876799; Mon, 27 Nov 2023 14:24:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701123876; cv=none; d=google.com; s=arc-20160816; b=ic3tHpYHOyquSw64lwsIBAhjR9by/ej5fSIOAF6vXx9kX1gHc/XLwUZGChrdRJbPZW 7Nu5fEGplM1qOfFlGjGIlrmcr/2BLVQCrAvLQ/mK0lBjPQeZiKQ+HLt+vvIgxSqQMIwX N/cS0N1tJfqa+d3X0Dvi2/4+k163I9Jw7aHcLnHkVzPLklx5kRrOYB6LoFX+dK5nq7KL DG/MDsIkdSdjLpY8fNy36+32HpxERKIxxNXYmUuKlYAgrBiyVIkvrVSDXTN90+7Ca8AX U/ba7U5SJaYr4rPKsIJWtDybiz7vZy8u2MHBFAu3uICzN4OGyZ0eFRcPcTY2RW+W7o+Q IOYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=30k6UGzPbcZj8XnmdbbPEH9f3EBiaFOFWAqKuElDMqI=; fh=VE5ZfoJWem8it6OrnlM5ov49ej/hHjarqyIgnpICDoo=; b=GU0sKtqKJ+hvDcnynmYbQAOCC7F18Pzw4+ie+BKnOmcCsEdOuYarKaW2iCeYRFhjHf 8jKTnrkmL0ufGDKIm6rE25UsgL0zMbgm3052PI8sTalEzSClrTcmCsiwipOvD0PwyMm3 p0AdiQtaq7sS8hRau6ucI8HWRIYaNjQXJpgXsKFNvGatXjPe8yrYJQxGuQbccQzDs45i D0HzRpIZU4TpA9nAW2WtA4Si47drNUonxB3MJ+aiCS54Cx9ym2kEBimVO6/71yREs+lG lRsIkwLpUY3HDW7bbgiGMH94ozKwyRiBC852xOP6D+qa7t/LR1lfObkJO/iKpV6IOGxr YcDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=QhOY4wzG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id go17-20020a17090b03d100b00276571c0d34si10266029pjb.6.2023.11.27.14.24.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 14:24:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=QhOY4wzG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 7235A8070331; Mon, 27 Nov 2023 14:24:34 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233806AbjK0WYZ (ORCPT <rfc822;toshivichauhan@gmail.com> + 99 others); Mon, 27 Nov 2023 17:24:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233816AbjK0WYM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 27 Nov 2023 17:24:12 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 097BD448C; Mon, 27 Nov 2023 14:22:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1701123769; x=1701728569; i=w_armin@gmx.de; bh=LLseh1WBNY3acRfVxKNOM1h/XCUUg3y/Z3ShI+u1G3k=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=QhOY4wzGbHMpU6vP6aclNlgV6vqLpTFNuAQF5w5TQRGxAYukRPY7cwm3EI9TNG1z HVPyUTJez0Ik6hk0YJIceNPJoFMe7l1N/UeFlt9zYHYwQ6eMehJEYt1jAb43hNYoy E6djuAgx975qZbXYp7/KA7Ig30i9+Qg4uelGpdA2OqriUY+0jE9x8gv6fEV8igak7 ogpLULBK5GagyXtAloqaLFJZPDqvZPTPhSEk6MkvKyl5M1i7RqwuIBgfVwWdh4amf 5CuLZZDZCCKZtUe1vku2rer1tPOwWXW23P/FuZjuU0KUuOwl01JeqFr3asSo+wQhy hkyJJNep3lmaq7Gi5g== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from mx-amd-b650.users.agdsn.de ([141.30.226.129]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MtOKi-1rRCKM3JyI-00unC4; Mon, 27 Nov 2023 23:22:48 +0100 From: Armin Wolf <W_Armin@gmx.de> To: hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] platform/x86: wmi: Skip blocks with zero instances Date: Mon, 27 Nov 2023 23:22:42 +0100 Message-Id: <20231127222242.115507-1-W_Armin@gmx.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Uql5fq+wzeyEGJ+9O7GxoRDLArDFJM7bvKlt/xBVlGEfFBiaaR4 BLKj9TEv7VNvtT4+Ij03vHFnmX3+mfTFoWw1OGhq9abRZ7xUzD3/3VPWJQJRXAebxiliXtf 09XGkGoEpXMZ4fEN2LCwNUTfQznxkMyhTyp35gkHlFf+6Zti6TbUIhaF3lhLpkSb+F9qETv 2oWidarHfaP4p8uMnewUQ== UI-OutboundReport: notjunk:1;M01:P0:u1v7O1NqHIk=;5EPE0aB3XeowpXGjQmXvEeixaX8 8ZLEqOqoHVbRGs6UXB3qal2SXkTpKGdoE/i3LVtHqahhykEwalnhVzZA4UGi0v0IyIcExRrFX LdQmbmY+g0X8nwJoK/UZH3lSh/wzXORcQxlojqTxFJfWZuL4FS8jCtKWg3b7vu4Tc/xbsy6WH 673m5iFEaeuAZlMvaQEkcef7c0jatu84bVcMEpC+1a91p/ybAxtbWKPCfNpLyREaz3hfDQ2Qt JXxCJaeDLgmdIBSqU9I3QhC+yuNNzuA5gDWRtM573qaEE45rca9qJuZGljEB+A06S6UrKLIuC XqLXMJkfHDI7RsWuE9Fcxw1Wg3e4RiKRm1Kz+80wZsPPbyCRNdGn7/bHwGqsx+XriDvUdrhWA AdNlOing73ojbVj4iqMnup2hDMRzQPbzMKkVU+tuS75yfGMaJZpiUAoR/VA4E7DlkdESWVncx Gs1nJ+Xh30zRL0FOXJ4aVLUQBiWVGRCDxPrV3/RBNUyWVTluYmWT/faZyjjbutOK7Qw7Fa0ma /ZaD2X9FY/gQoKO8wgz53VahNzikd//6rf+Y252+UkNszv1BLdtpQj9CZK9WVRy0Eynqh1oiW 8G67v2Ljh0C4/XLTDL0AKmGfAmZngj9CTv00DS/KEG4lkbzVoIFkhvySKNfBPq0DihBKq3ALi xoe+mDMDAcAJwac5AACK5cvGIQwt0vfXr8BXwfA7YcLoWtttOBExbtTwXJt256j5lBNo4Md4a aGJxI3dg4xZRMEMd3QIeW/SlkZtb3Y9831SCzcMa7CxiixqgqxXPg4jKrEXz+KP/Sg56h3F1P DmEQFoVkuA/phU2qxzT+VH0yQT2ioQxDzJbkO8SUvu1kKM8+PJsusUUR/UMUHpntxH5CdXYdz Xg2fCrW8q0FiR99uqI8i2+MSRUMt94iYB2UNja22bvmHIUCtod66uZxGA6MSJwTTuu1/R2p7D AtnVOcINiKQWi1A3nWz0aNT4/Ic= X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 27 Nov 2023 14:24:34 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783757669939156200 X-GMAIL-MSGID: 1783757669939156200 |
Series |
platform/x86: wmi: Skip blocks with zero instances
|
|
Commit Message
Armin Wolf
Nov. 27, 2023, 10:22 p.m. UTC
Some machines like the HP Omen 17 ck2000nf contain WMI blocks with zero instances, so any WMI driver which tries to handle the associated WMI device will fail. Skip such WMI blocks to avoid confusing any WMI drivers. Reported-by: Alexis Belmonte <alexbelm48@gmail.com> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218188 Tested-by: Alexis Belmonte <alexbelm48@gmail.com> Signed-off-by: Armin Wolf <W_Armin@gmx.de> --- drivers/platform/x86/wmi.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.39.2
Comments
On Mon, 27 Nov 2023, Armin Wolf wrote: > Some machines like the HP Omen 17 ck2000nf contain WMI blocks > with zero instances, so any WMI driver which tries to handle the > associated WMI device will fail. > Skip such WMI blocks to avoid confusing any WMI drivers. > > Reported-by: Alexis Belmonte <alexbelm48@gmail.com> > Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218188 > Tested-by: Alexis Belmonte <alexbelm48@gmail.com> > Signed-off-by: Armin Wolf <W_Armin@gmx.de> Thanks for the patch. Should this have a Fixes tag?
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index cb7e74f2b009..4f94e4b117f1 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -1346,6 +1346,11 @@ static int parse_wdg(struct device *wmi_bus_dev, struct platform_device *pdev) if (debug_dump_wdg) wmi_dump_wdg(&gblock[i]); + if (!gblock[i].instance_count) { + dev_info(wmi_bus_dev, FW_INFO "%pUL has zero instances\n", &gblock[i].guid); + continue; + } + if (guid_already_parsed_for_legacy(device, &gblock[i].guid)) continue;