From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161034AbcE2T1W (ORCPT ); Sun, 29 May 2016 15:27:22 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33786 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161005AbcE2T1U (ORCPT ); Sun, 29 May 2016 15:27:20 -0400 Subject: Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection To: =?UTF-8?Q?Pali_Roh=c3=a1r?= , Thorsten Leemhuis References: <1463842001-17785-1-git-send-email-pali.rohar@gmail.com> <201605271245.47383@pali> <01084692-618a-31db-76f8-60176d1cd2cc@leemhuis.info> <201605271521.10294@pali> Cc: Jan C Peters , =?UTF-8?Q?David_Santamar=c3=ada_Rogado?= , Jean Delvare , Guenter Roeck , Tolga Cakir , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org From: Peter Saunderson Message-ID: <574B4293.9010404@gmail.com> Date: Sun, 29 May 2016 20:27:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <201605271521.10294@pali> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I have just tested removing i8k_get_fan_type() function from the dell-smm-hwmon driver in the kernel on my Dell Inspiron 580 and the fan speed problem goes away. My patch simply replaced fan_type with fan_status in i8k_init_hwmon and used the index as the type in i8k_hwmon_show_fan_label since index and the type were the same numerical value on my machine. Removing i8k_get_fan_type() function for Dell Inspiron 580 would be a very good fix! Well done for finding it! On 27/05/16 14:21, Pali Rohár wrote: > So, once kernel call i8k_get_fan_type() function, then fan speed going > up/down? Even if it was called only at once? Can you confirm it? Caching > patch cause that for each fan that function is called exactly one time. Yes even if the i8k_get_fan_type() function is called once I get the fan speed problem. > If this is problem, we can probably create DMI list of machines which do > not like i8k_get_fan_type() call and disable it for them. Please add Dell Inspiron 580 to any blacklist that you create. The DMI_PRODUCT_NAME seems to have a white space at the end: { /* * CPU fan speed going up and down on Dell Inspiron 580 * for unknown reasons. */ .ident = "Dell Inspiron 580", .matches = { DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."), DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Inspiron 580 "), }, },