From patchwork Sat Jan 27 16:22:01 2018 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: 10187555 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 145B7601D5 for ; Sat, 27 Jan 2018 16:22:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0022228AC8 for ; Sat, 27 Jan 2018 16:22:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E8EDA28C22; Sat, 27 Jan 2018 16:22:50 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham 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 8ED6528AC8 for ; Sat, 27 Jan 2018 16:22:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753153AbeA0QWs (ORCPT ); Sat, 27 Jan 2018 11:22:48 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:54672 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753152AbeA0QWo (ORCPT ); Sat, 27 Jan 2018 11:22:44 -0500 Received: by mail-wm0-f68.google.com with SMTP id i186so6589516wmi.4; Sat, 27 Jan 2018 08:22:43 -0800 (PST) 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=ip+v80Oo1C3pfhJQqR5gIfv6IJIaSb2SxaSjjp3IiEU=; b=l4PLm7ZpsL3brrGjHLAAQhgr5IRsyA1uZKZXfiZDRpy24SVlx1yMdqyNPC63+ilNfz x1UYcbfQ2uel3S7kCytqgP99GI3dEvliYaPJCp31JAbZYrRfoJfPja2y7XnKHgdjnw+1 rvhqlH7u/Ze2+O7tNltyGs7HdVSMfumePfKbfC2HlYh9sawKHULQwAGPJRCYPTLYxAp3 yNs2t09XoiD+TrJtU0M51c9s8VbF58wBuz8MjBc54yCDjPjOYiWPBvRaREUE5lcFDulc g8eoMMnaubg5LMuD1Y04BrP4p+56IcRN5OctCvtvVzYTCs85NzkFVKhpMS+3a8GJk/mQ OJaw== 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=ip+v80Oo1C3pfhJQqR5gIfv6IJIaSb2SxaSjjp3IiEU=; b=jQzGnWLkJAOQXtEIyZpJrbHJHFD5vW/MNgMRGg13MTlZb7Kqor5EjvaPp3cJaGinfr Y2CdhWPLX0puzJnYrFKlw6u9c4S/nExoog31FANgCr0lwQ0SSC2rhthCVvwpii2dfGE4 VXL9rfebJcgn7r7sx3pe2KjwaVWH99YYJ85sUkYv5qcVZCiA/l/UP0U0lVoI2Re4SnUL 6wClwR5bGwRuRQl5+loVuWikXQJtcyCY0RBhM793scT0dcRbgDWK417deR66Dl4GZ8DM HEzLxPzVwm9RFPJ350cxgJaSE4UXp8qACmfPxp+qVfCkBWz68K4yYfJqVqqxTpOwTtih OqMw== X-Gm-Message-State: AKwxyteclj3gI0dALFEV3XzRJxZvvW9lRQvRnB5rwHSqkisZ+KdBrKaL EEyAzKuJPtysK6aDO3qIlxY= X-Google-Smtp-Source: AH8x225gDRuQkTMTRO4bR4jsy/7WpIZMVWJmHQlf1ML7HIq05L282FJlZhTN8udSR9C9JYzKhvZveg== X-Received: by 10.28.194.2 with SMTP id s2mr12962730wmf.55.1517070162855; Sat, 27 Jan 2018 08:22:42 -0800 (PST) Received: from Pali-Latitude.lan (pali.kolej.mff.cuni.cz. [78.128.193.202]) by smtp.gmail.com with ESMTPSA id 198sm6699928wmo.36.2018.01.27.08.22.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 Jan 2018 08:22:42 -0800 (PST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Jean Delvare , Guenter Roeck , Oleksandr Natalenko , Jonathan Buzzard , Mario Limonciello Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [PATCH 1/4] hwmon: (dell-smm) Enable broken functionality via "force" module param Date: Sat, 27 Jan 2018 17:22:01 +0100 Message-Id: <20180127162204.13752-2-pali.rohar@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180127162204.13752-1-pali.rohar@gmail.com> References: <20180127162204.13752-1-pali.rohar@gmail.com> MIME-Version: 1.0 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some Dell machines are broken and some functionality is disabled. Show warning into dmesg about this fact and allow user via "force" module param to override brokenness and enable broken functionality. Signed-off-by: Pali Rohár --- drivers/hwmon/dell-smm-hwmon.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c index c7c9e95e58a8..aef4f8317ae2 100644 --- a/drivers/hwmon/dell-smm-hwmon.c +++ b/drivers/hwmon/dell-smm-hwmon.c @@ -1060,8 +1060,11 @@ static int __init i8k_probe(void) i8k_get_dmi_data(DMI_BIOS_VERSION)); } - if (dmi_check_system(i8k_blacklist_fan_type_dmi_table)) - disallow_fan_type_call = true; + if (dmi_check_system(i8k_blacklist_fan_type_dmi_table)) { + pr_warn("broken Dell BIOS detected, disallow fan type call\n"); + if (!force) + disallow_fan_type_call = true; + } strlcpy(bios_version, i8k_get_dmi_data(DMI_BIOS_VERSION), sizeof(bios_version));