Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3026947rwb; Mon, 15 Aug 2022 16:25:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR5LXHiwixXAOXzggXAjpIVKvmowdM+/dgp10dQpeycWBJSaYFMPT2r/PFOVuaZsz+IEXfKA X-Received: by 2002:a17:90b:388f:b0:1f5:7748:9667 with SMTP id mu15-20020a17090b388f00b001f577489667mr30721726pjb.158.1660605909865; Mon, 15 Aug 2022 16:25:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605909; cv=none; d=google.com; s=arc-20160816; b=lDptgTtj93tbFrYh4mBVwf1RRrTvDt3YYl4VrErwJreMUoR0unvq9qI+1vxu7XVZ2x gSUHwcapvHlp4pyr+SqFgm6XTutukJB7YzTQpl1ZlqK0OAyVbr1e8kYQ5mrVKQ/q/X8C C9xWijI3eXYM61PULktKQDC9m9WUtzfxWPZnsEB/QkI+RqMZpkewwaNo+MhleHhmINxB /7bjYLuAfDP23l2XspDQaDX2Vrfsa91nDcZSVHwCJ7E2Bcz/sS/S3RXy7ylkxXsEWkuW sq1wRYmTMipx8wt4t1RaqhWwrX7iZGv7YivApBCtDyXqEWqn3TTAamYbVORdECW9CmIW OXCQ== 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=gLFWw1/cFQ59OdUAOXf0YpALrVEgfvjUxE+P29O91poYvb21fPv9Zay5H/TbnPD7NW 10WOHeMw32L2jZhfngles2ZkfC1B6XFa+TpLn49sLv4rFsjRSPoP/HKYDkvwqdlHzL1I hPSIzIqDyEEmEKTCQuBi7qys0dONTxyZaTUTgU+/aklBXZKXkqd/nw0ga7TcDFFWS7mj BxuixosFacYhLQvH08Y8iUi10FGdm6hyZ451dYW1+LdK8RpCT3oZXt43ep5blSERL7bR C5vGeXB/KtTmcT0EM8FWATYNxIBSD2L7LQd1+UR9UT3oBh7xXF+OSRHz/RVn/24l1MHF FiWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YsvtdqR+; 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 y9-20020a17090322c900b0016d90f4b99esi13148623plg.248.2022.08.15.16.24.58; Mon, 15 Aug 2022 16:25:09 -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=YsvtdqR+; 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 S1352256AbiHOXCo (ORCPT + 99 others); Mon, 15 Aug 2022 19:02:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352847AbiHOXBQ (ORCPT ); Mon, 15 Aug 2022 19:01:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA473857F3; Mon, 15 Aug 2022 12:57:51 -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 ams.source.kernel.org (Postfix) with ESMTPS id DB533B8114A; Mon, 15 Aug 2022 19:57:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F539C433C1; Mon, 15 Aug 2022 19:57:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593468; bh=fCYDI+F88UGUTrDjbcNz8uPK++EHHjAD50nTwpOJZGo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YsvtdqR+JtbGWywOsxNwOdDAQZ57ljPaTtf0PoFW4ZrUH17v3GgHy9r6fyUPeC6ZT 2k2EHKORV6vrD+ZG4++/QWPa9B87ouq57IjgcfJ4WhIQhSHZumtb8CPe2cwKEKnNS4 lVGj8RJKsTkvVJxBvEFgPnWtnjd9SCyejcikEPy4= 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.19 0272/1157] hwmon: (sch56xx-common) Add DMI override table Date: Mon, 15 Aug 2022 19:53:48 +0200 Message-Id: <20220815180450.494000788@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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