Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2000804ybb; Thu, 2 Apr 2020 11:11:47 -0700 (PDT) X-Google-Smtp-Source: APiQypJshKBKxR2t6cP4LTvTj9T8b4SzdHLQc5g2z+eDnIeHVQEfSZlETG+P2Om4cNpedKCujtp6 X-Received: by 2002:a05:6830:1bc9:: with SMTP id v9mr3257209ota.169.1585851107614; Thu, 02 Apr 2020 11:11:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585851107; cv=none; d=google.com; s=arc-20160816; b=eCA8bKUiaNZI8WkRKjQm8Y8hRc6q7eEDrXa73xsAYQlenS7H8lxZzuCpR3tvkoO5hR xe1IYByA6XumTWfB6WFT56SXJ4psuwMLPHk5WbIcEADLEh/4QV9Pvm5nfY6tZfSThFVD nwnLKTfmEmKEPjprP86PD20eyjnFwb75qhK6uA1BZs03jamm1jviO0cmEvpSeLuR+fcV nayPYADqHAbDZgrmJFRhvovaRW/l2fbvcqn2Ik/oyAkTSFaxtyW9rWrN3VAUYl/VNl0+ p70FO3RKOU5/W2uqsfjOmLeyxqe7TnXd+kO1ljtPUXHv6iYnNFRKf80Ds1tc4Ch+78WO bflg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:cc:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ZeUM1Zbxf3DFHiYmqaA0ExB43/d8ErQdiQ3jz9thhKU=; b=V4gi2wJK3qYtJYxHoyYD/4b7IPwRzapFNmlPYgZIWUQFktG7fWLDOLzC8OOEvCTCEW bQ6RjvAizk2xV82DwQH9K/2Tpd3XpC+YMvuhnpz3gNbnHkzyf3wIxlJrlA8zVcM0+uQX zP4FPj3xJzfrZqwKmdJF6Xxy/RlRmxoRJ8Pv3Er/9DEUEdpTBR6lBM2zobM8qwYyYlNH aUTNQFcTIiB3/US6NDVVrj/IlYGxMcBoEwDXDzUAJQPw0GeUvTWiPIWARuDK2oJ3YzCb CCG9GdPjvTxLOVrVJQDnpkvYG2cfT5ICy8hKQN0m7k97AMLeRaRZ4AnpCjj1USw9+aHi P0UQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=M593RqYD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s15si2560722oie.175.2020.04.02.11.11.35; Thu, 02 Apr 2020 11:11:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=M593RqYD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388288AbgDBRQT (ORCPT + 99 others); Thu, 2 Apr 2020 13:16:19 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:41646 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732299AbgDBRQT (ORCPT ); Thu, 2 Apr 2020 13:16:19 -0400 Received: by mail-io1-f68.google.com with SMTP id b12so4413631ion.8 for ; Thu, 02 Apr 2020 10:16:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:cc; bh=ZeUM1Zbxf3DFHiYmqaA0ExB43/d8ErQdiQ3jz9thhKU=; b=M593RqYDNsg0MXFTlEXp5sTKDhY7WbjRBOCDILUYgx4Vhl8xLFZZQWqxADhyX73RRg 5ZGaXDNFieKMag3HqTfC6IsQKUqjF6900d14ctB79Z4SuUJ1XuANi0iBVNX8k734lj7e dxs8jdAI2lN6v9HdS5t3se4jsyOIN2z05z+ZEg8Dk9xI3Xk1Q3oQe2i+F5r6b1ERCDiV 2TPCZn6b719lqCvipVRAwDXeQdMZdUSfe6XAG1kwale7pYo53EbB5IKf3PxFnYa4RNFB qB/rql6u0VmATk1Pw1HtZ+b3CaePwk2YelOpGNDMvXT4hgm65CZeap76jJvZao2dONhu 2WBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:cc; bh=ZeUM1Zbxf3DFHiYmqaA0ExB43/d8ErQdiQ3jz9thhKU=; b=kHpjQpX4TgBRnppIOymJg4tgQyebTEqbO766ewLCJHM+LT2SAhZXdQyjJwuIhf1GaF g95BXiC92rQkz7josd7bf7CL2TAmI8d4sz5+jt0eT2xD9fEzXNU3GvkdO9oMoELCqTeg HaxkJ9WNaH915k6uACSssyS+TIwowzE1P6EdA3jmZbjz5Vto1vy0WiiSXqyvpQk5Zxd0 Gx5PBb4/JfKUPt00BWb01xFA6Lo6kDpiv9lB3WPVm4VJPX6OdKYu1+x4n63N5HbbTAjI jmJ2byXS8mjhme6HhVgsV3V9RrzXdKVm9iRrG6z7IMeHo5E1UOtD44SkQA/rmbzJpVA1 n/6A== X-Gm-Message-State: AGi0PuZYyhttNS8DS2Xqo3hb/9l9xfmLT2hwzPBgJUIHRAd/VBebD8l3 f27FUPP8m/VkvwmDcecx3wLOmLmLlAa1lG1EtNxUnOWQ X-Received: by 2002:a02:c888:: with SMTP id m8mt3386103jao.51.1585847777977; Thu, 02 Apr 2020 10:16:17 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Tom Hebb Date: Thu, 2 Apr 2020 13:16:06 -0400 Message-ID: Subject: Re: [PATCH] hwmon: (dell-smm) Use one DMI match for all XPS models Cc: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org Content-Type: text/plain; charset="UTF-8" To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for the quick review! On Thu, Apr 2, 2020 at 2:15 AM Guenter Roeck wrote: > > On 4/1/20 9:02 PM, Thomas Hebb wrote: > > Currently, each new XPS has to be added manually for module autoloading > > to work. Since fan multiplier autodetection should work fine on all XPS > > models, just match them all with one block like is done for Precision > > and Studio. > > > > The only match we replace that doesn't already use autodetection is > > "XPS13" which, according to Google, only matches the XPS 13 9333. (All > > other XPS 13 models have "XPS" as its own word, surrounded by spaces.) > > According to the thread at [1], autodetection works for the XPS 13 9333, > > meaning this shouldn't regress it. I do not own one to confirm with, > > though. > > > > Tested on an XPS 13 9350 and confirmed the module now autoloads and > > reports reasonable-looking data. I am using BIOS 1.12.2 and do not see > > any freezes when querying fan speed. > > > > [1] https://lore.kernel.org/patchwork/patch/525367/ > > > > Signed-off-by: Thomas Hebb > > --- > > > > drivers/hwmon/dell-smm-hwmon.c | 19 ++----------------- > > 1 file changed, 2 insertions(+), 17 deletions(-) > > > > diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c > > index d4c83009d625..c1af4c801dd8 100644 > > --- a/drivers/hwmon/dell-smm-hwmon.c > > +++ b/drivers/hwmon/dell-smm-hwmon.c > > @@ -1087,14 +1087,6 @@ static const struct dmi_system_id i8k_dmi_table[] __initconst = { > > }, > > .driver_data = (void *)&i8k_config_data[DELL_STUDIO], > > }, > > - { > > - .ident = "Dell XPS 13", > > - .matches = { > > - DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), > > - DMI_MATCH(DMI_PRODUCT_NAME, "XPS13"), > > - }, > > - .driver_data = (void *)&i8k_config_data[DELL_XPS], > > So .driver_data is no longer needed for xps 13 models ? Really ? That is my understanding, yes. As of commit 8f21d8e939b8 ("i8k: Autodetect fan RPM multiplier"), an explicit fan_mult from driver_data is not needed on any machine where i8k_get_fan_nominal_speed() works. The email thread I linked from my commit message, specifically message #13 from Gabriele Mazzotta[1], indicates that function works on the XPS 13 9333, as it did on all other laptops tested in that thread. The only other information in driver_data is fan_max, which defaults to I8K_FAN_HIGH and so won't change for the XPS 13 9333. Note that the version of the autodetection code which actually landed[2] (which, coincidentally, was part of the same series containing your initial XPS 13 support) fixed the bugs mentioned in [1] and properly tries i8k_get_fan_nominal_speed() for all fans. [1] https://lore.kernel.org/patchwork/patch/525367/#708707 [2] https://lore.kernel.org/patchwork/patch/532107/ > > Guenter > > > - }, > > { > > .ident = "Dell XPS M140", > > .matches = { > > @@ -1104,17 +1096,10 @@ static const struct dmi_system_id i8k_dmi_table[] __initconst = { > > .driver_data = (void *)&i8k_config_data[DELL_XPS], > > }, > > { > > - .ident = "Dell XPS 15 9560", > > - .matches = { > > - DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), > > - DMI_MATCH(DMI_PRODUCT_NAME, "XPS 15 9560"), > > - }, > > - }, > > - { > > - .ident = "Dell XPS 15 9570", > > + .ident = "Dell XPS", > > .matches = { > > DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), > > - DMI_MATCH(DMI_PRODUCT_NAME, "XPS 15 9570"), > > + DMI_MATCH(DMI_PRODUCT_NAME, "XPS"), > > Quite frankly, I'd want to have this tested on many more models. > I don't really want to deal with the fallout if it doesn't work > on all xps a3 and xps 15 systems, especially since Dell doesn't > support the BIOS interface used by this driver. What fallout are you imagining? There are two XPS 15 models, 9560 and 9570, that were already matched, neither of which required driver_data or were blacklisted for bad BIOS behavior., and I've tested on a 9350 with the same result. The worst case scenario I could imagine is that one of 9550, 9360, or 9370 has bad BIOS behavior and starts showing hiccups after this patch. I don't think that's likely, though, given that the list of tested models includes one from each generation, sampling across both 13 and 15. Additionally, the existing generic matches on "Studio", "inspiron", "Latitude", "Precision", and "Vostro" indicate that we're willing to accept the possibility of future breakage in exchange for automatic detection of new machines. -Tom > > Guenter > > > }, > > }, > > { } > > > On Thu, Apr 2, 2020 at 2:15 AM Guenter Roeck wrote: > > On 4/1/20 9:02 PM, Thomas Hebb wrote: > > Currently, each new XPS has to be added manually for module autoloading > > to work. Since fan multiplier autodetection should work fine on all XPS > > models, just match them all with one block like is done for Precision > > and Studio. > > > > The only match we replace that doesn't already use autodetection is > > "XPS13" which, according to Google, only matches the XPS 13 9333. (All > > other XPS 13 models have "XPS" as its own word, surrounded by spaces.) > > According to the thread at [1], autodetection works for the XPS 13 9333, > > meaning this shouldn't regress it. I do not own one to confirm with, > > though. > > > > Tested on an XPS 13 9350 and confirmed the module now autoloads and > > reports reasonable-looking data. I am using BIOS 1.12.2 and do not see > > any freezes when querying fan speed. > > > > [1] https://lore.kernel.org/patchwork/patch/525367/ > > > > Signed-off-by: Thomas Hebb > > --- > > > > drivers/hwmon/dell-smm-hwmon.c | 19 ++----------------- > > 1 file changed, 2 insertions(+), 17 deletions(-) > > > > diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c > > index d4c83009d625..c1af4c801dd8 100644 > > --- a/drivers/hwmon/dell-smm-hwmon.c > > +++ b/drivers/hwmon/dell-smm-hwmon.c > > @@ -1087,14 +1087,6 @@ static const struct dmi_system_id i8k_dmi_table[] __initconst = { > > }, > > .driver_data = (void *)&i8k_config_data[DELL_STUDIO], > > }, > > - { > > - .ident = "Dell XPS 13", > > - .matches = { > > - DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), > > - DMI_MATCH(DMI_PRODUCT_NAME, "XPS13"), > > - }, > > - .driver_data = (void *)&i8k_config_data[DELL_XPS], > > So .driver_data is no longer needed for xps 13 models ? Really ? > > Guenter > > > - }, > > { > > .ident = "Dell XPS M140", > > .matches = { > > @@ -1104,17 +1096,10 @@ static const struct dmi_system_id i8k_dmi_table[] __initconst = { > > .driver_data = (void *)&i8k_config_data[DELL_XPS], > > }, > > { > > - .ident = "Dell XPS 15 9560", > > - .matches = { > > - DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), > > - DMI_MATCH(DMI_PRODUCT_NAME, "XPS 15 9560"), > > - }, > > - }, > > - { > > - .ident = "Dell XPS 15 9570", > > + .ident = "Dell XPS", > > .matches = { > > DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), > > - DMI_MATCH(DMI_PRODUCT_NAME, "XPS 15 9570"), > > + DMI_MATCH(DMI_PRODUCT_NAME, "XPS"), > > Quite frankly, I'd want to have this tested on many more models. > I don't really want to deal with the fallout if it doesn't work > on all xps a3 and xps 15 systems, especially since Dell doesn't > support the BIOS interface used by this driver. > > Guenter > > > }, > > }, > > { } > > >