Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3025612rwb; Mon, 15 Aug 2022 16:23:38 -0700 (PDT) X-Google-Smtp-Source: AA6agR7c9Rqfm51v5BHuc3lv5ZetEXVKORa3GUCPzmxyaUJpKFABnyB4X2VPNOho476cK/OjYFwp X-Received: by 2002:a05:6402:13d6:b0:43c:b98f:5f74 with SMTP id a22-20020a05640213d600b0043cb98f5f74mr16137944edx.392.1660605817839; Mon, 15 Aug 2022 16:23:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605817; cv=none; d=google.com; s=arc-20160816; b=MMAvooYpXv68AriGN54Vs/U6cgH471yLRh/Kv5xeH1G1pEsQH/0gVAjjimLO8XIXUk Qlcccb48tiFba6Kv99Xrcoc0OOmo/7xfAeMFf8xBgfoGC+Ec+/i/VCLZnGfh1iQ412wY EmLvyimZK2vbuJw/XapCZLQlBnmWeMRzCmSTD363AT2vxqWxtt2bjqOkS5IoNz2VR507 uSKmHi+Qrimb2s6XrDxVzUIdAauh5WOMbiKhEsLpKuoKT4HOh59cGWdmLNHAqmC9IgWA cUbg+j9FmdD/zNxndJYK/EJcPR9b1kvcY+LWbVAGoyWPojhLiP772VBnzMnNNumz7gNC 2S+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5glORySuBCfT3RlUvgjUwBmfMq466TJY7wn9w3ogLLY=; b=x0SLwqByLFS8N0zfLKegsdXz6BH5hynMeXa9pd3xRXkkt9avl1UaCSitdo77B3TQDd Y/zASqsMKO+1IO1UaUbduenc6sUuUyplPb+WhBADapkHKbiF6Xl8xkD5PJcKgne8fIFd dJBuzBtZc0TvIXIauOYL3cQYgUq4g6V+EyKa9N8IMyZBLyU6GO1zm6Xqke+ovBlQU2pU 0t/d5ADjoeZZwmDkdVdfcqnV1Mb5Q6nwUr8r35/NMXwm3enTXc7CNbRHtA6Xle0Xnpp0 WzJMpDGlpzoORxsaNNbCAUh4ASrtcUeOYNQoTuc78rljIRpyrOKekj1rbnI9O592J8qh HRHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mPGVADW0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g14-20020a1709065d0e00b0073150f3dbbfsi8590625ejt.950.2022.08.15.16.23.12; Mon, 15 Aug 2022 16:23:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mPGVADW0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344625AbiHOUp1 (ORCPT + 99 others); Mon, 15 Aug 2022 16:45:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347731AbiHOUnF (ORCPT ); Mon, 15 Aug 2022 16:43:05 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F5B7B2879; Mon, 15 Aug 2022 12:07:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id D37FBCE1082; Mon, 15 Aug 2022 19:07:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C52D6C433C1; Mon, 15 Aug 2022 19:07:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590472; bh=fCYDI+F88UGUTrDjbcNz8uPK++EHHjAD50nTwpOJZGo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mPGVADW0QB9+owDFtgF8Kz8m3GEjF8dETJn0v5b9vIr6+EkqjjmhRmo5RxvookjtF BqV2d/uwPwBz+u3BIcBmkZGJso0obKDBERXfQZ86tC5Se6Za/tK+tJZp31H3pfrWQb EhwhpjoVH4RifZvErbsH/hCHMnGHgVDUA4dGFtd8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Armin Wolf , Hans de Goede , Guenter Roeck , Sasha Levin Subject: [PATCH 5.18 0271/1095] hwmon: (sch56xx-common) Add DMI override table Date: Mon, 15 Aug 2022 19:54:30 +0200 Message-Id: <20220815180440.967279788@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Armin Wolf [ Upstream commit fd2d53c367ae9983c2100ac733a834e0c79d7537 ] Some devices like the Fujitsu Celsius W380 do contain a working sch56xx hardware monitoring device, but do not contain the necessary DMI onboard device. Do not check for the presence of an suitable onboard device on these machines. The list of affected machines was created using data collected by the Linux Hardware Project. Tested on a Fujitsu Esprimo P720, but sadly not on a affected machine. Fixes: 393935baa45e (hwmon: (sch56xx-common) Add automatic module loading on supported devices) Signed-off-by: Armin Wolf Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20220604220200.2567-1-W_Armin@gmx.de Signed-off-by: Guenter Roeck Signed-off-by: Sasha Levin --- drivers/hwmon/sch56xx-common.c | 44 ++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/drivers/hwmon/sch56xx-common.c b/drivers/hwmon/sch56xx-common.c index 3ece53adabd6..de3a0886c2f7 100644 --- a/drivers/hwmon/sch56xx-common.c +++ b/drivers/hwmon/sch56xx-common.c @@ -523,6 +523,28 @@ static int __init sch56xx_device_add(int address, const char *name) return PTR_ERR_OR_ZERO(sch56xx_pdev); } +static const struct dmi_system_id sch56xx_dmi_override_table[] __initconst = { + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "CELSIUS W380"), + }, + }, + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "ESPRIMO P710"), + }, + }, + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "ESPRIMO E9900"), + }, + }, + { } +}; + /* For autoloading only */ static const struct dmi_system_id sch56xx_dmi_table[] __initconst = { { @@ -543,16 +565,18 @@ static int __init sch56xx_init(void) if (!dmi_check_system(sch56xx_dmi_table)) return -ENODEV; - /* - * Some machines like the Esprimo P720 and Esprimo C700 have - * onboard devices named " Antiope"/" Theseus" instead of - * "Antiope"/"Theseus", so we need to check for both. - */ - if (!dmi_find_device(DMI_DEV_TYPE_OTHER, "Antiope", NULL) && - !dmi_find_device(DMI_DEV_TYPE_OTHER, " Antiope", NULL) && - !dmi_find_device(DMI_DEV_TYPE_OTHER, "Theseus", NULL) && - !dmi_find_device(DMI_DEV_TYPE_OTHER, " Theseus", NULL)) - return -ENODEV; + if (!dmi_check_system(sch56xx_dmi_override_table)) { + /* + * Some machines like the Esprimo P720 and Esprimo C700 have + * onboard devices named " Antiope"/" Theseus" instead of + * "Antiope"/"Theseus", so we need to check for both. + */ + if (!dmi_find_device(DMI_DEV_TYPE_OTHER, "Antiope", NULL) && + !dmi_find_device(DMI_DEV_TYPE_OTHER, " Antiope", NULL) && + !dmi_find_device(DMI_DEV_TYPE_OTHER, "Theseus", NULL) && + !dmi_find_device(DMI_DEV_TYPE_OTHER, " Theseus", NULL)) + return -ENODEV; + } } /* -- 2.35.1