Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp989313rwe; Thu, 1 Sep 2022 10:34:57 -0700 (PDT) X-Google-Smtp-Source: AA6agR65rg5UHUUtkBs8ob9/OasqWi8AZSgDOlDaGniGilHMlQhG/AsNRCb7kI+mppx/4rK4QGm1 X-Received: by 2002:a05:6402:2789:b0:440:44b6:849b with SMTP id b9-20020a056402278900b0044044b6849bmr30708942ede.387.1662053697031; Thu, 01 Sep 2022 10:34:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662053697; cv=none; d=google.com; s=arc-20160816; b=Vlh/9AzJ8gR201pzkX8TX/KvWoijLCr3DpJuK+LhcbvOYABSdTPDS0M5fedXv+1EJA Pl6+6ZonoMDM/sMR8tEXZPzOl/gjTcKNX0YToY5C35IyZeAaBmupNS75PmRBpmBf7TdN fjPIRi4My454oEbuBO8kofD6ExEQjqtCZLQnvyEqs13yCRASOiUemyXthzRJGT7eUUk8 2B+9B3dJNQd1KL4Bhmonoy5EB9y5go41YhnL0LWmWwvCl0+OTZcPCxI/3sPq52B1SFDN NmGQZpTM7gmATMtgdXjEJ9aKyNV4tVEHE2zO6uJQ2pqsw1uPhyhecZVeQKW1AzwvoyQg xGDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=EdU6kcxk31+NfDy/R26HslGdp1j7dLdIqqiHO/JJmC8=; b=iUnSGRAXLX5vslICmFkuei5UFEttxOUkwl3RkuxxG2rK4ivMNtfkpL0Q+wyNPXaFjq sdo1yR6CtEmed9ZqPDjy++w7wycyKS0jlXQ0nEHObtIbDTfwsb9268t+xmJPqQO/9rIA YBpLJWmX02zyke/qur5umwb84aSAiZsSzhoAA2Mj/OqhC+QNKhGpDNNwWtAWlw2ka7PI RnjGh9MwNQnzdEAIN0qJ8ajPOP4t/NP+Dd+ZuOqd7ANX2nVeK/HIYDcxJx8nh+7URLni QvG4aIvZVl2N6uz1dSAbXNqniJuUeRGsaM74JS7G4gGa+5UNsVbnb1vCc6TBmdlICZxj OsZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XUVMCgmI; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id my7-20020a1709065a4700b0074153b85d8esi11176388ejc.411.2022.09.01.10.34.30; Thu, 01 Sep 2022 10:34:57 -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=@redhat.com header.s=mimecast20190719 header.b=XUVMCgmI; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233850AbiIAPe5 (ORCPT + 99 others); Thu, 1 Sep 2022 11:34:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233646AbiIAPev (ORCPT ); Thu, 1 Sep 2022 11:34:51 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D4952F5 for ; Thu, 1 Sep 2022 08:34:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662046486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EdU6kcxk31+NfDy/R26HslGdp1j7dLdIqqiHO/JJmC8=; b=XUVMCgmIt7zgb1iQZn7DdvpuhJrMbmVssMFRazT7OQzsFvSO2M31mnm9UMiwfyF1ku4uay QIp13hWRg61FUeF5nIc6kds+VGfLT1OpQznMn96BArBP/ZrY2guSRcAeyUDu5QYPpST1UU cXvWuOHn4gjBh2IYnwYcq+S+2rzvi+I= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-341-f114iezFNdqHo0w8Tg7lpQ-1; Thu, 01 Sep 2022 11:34:45 -0400 X-MC-Unique: f114iezFNdqHo0w8Tg7lpQ-1 Received: by mail-ej1-f71.google.com with SMTP id sb14-20020a1709076d8e00b0073d48a10e10so7098545ejc.16 for ; Thu, 01 Sep 2022 08:34:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=EdU6kcxk31+NfDy/R26HslGdp1j7dLdIqqiHO/JJmC8=; b=RuBrheUg6ZjMss4vyliSqKCjzAszdds0MPRr79bMxSZoH6dMDqIGXT09W6qqMC+qQb /rPiasfzUMHP94+zdrmqvBmyp8Xq9fzAObL0AislaketPHbvvFY3aCEs6t/xogq7eDGg IMrgJBRF9qt8l6M+YRBJ/75yOal3SWG/ba4GjoHH2+t316n84kifUHkLYecrO91L+U9/ 4l+ouRWJwghMxIEp+aJG+od6SN1EaihJAaS1L91v3a9s/N44C1vJDwrTH9c4WpKVlDdF 1jAvwkaM93S+kMOty/hZQoh4LZM+EPKO/rZegcodpWN6S7/7x7aZsJMpENlRtlunV0HV VDPA== X-Gm-Message-State: ACgBeo2Z8I8vt5FOt/BdvXZ2/KxyQ5powWjfA+32azUIvwt1QtUDp9pk hAktW3OHvPlgnK7fASRw1Ih1eQnemmWMeFcdqblQUAnKz6H0UC+R1xJuBk+5MuqJldK3j3OJrOK dGPPFTFp1M1G3ZJhcrEo4wPX9 X-Received: by 2002:a17:907:3e06:b0:733:693:600e with SMTP id hp6-20020a1709073e0600b007330693600emr22714944ejc.410.1662046484224; Thu, 01 Sep 2022 08:34:44 -0700 (PDT) X-Received: by 2002:a17:907:3e06:b0:733:693:600e with SMTP id hp6-20020a1709073e0600b007330693600emr22714935ejc.410.1662046484002; Thu, 01 Sep 2022 08:34:44 -0700 (PDT) Received: from ?IPV6:2001:1c00:c1e:bf00:d69d:5353:dba5:ee81? (2001-1c00-0c1e-bf00-d69d-5353-dba5-ee81.cable.dynamic.v6.ziggo.nl. [2001:1c00:c1e:bf00:d69d:5353:dba5:ee81]) by smtp.gmail.com with ESMTPSA id dy17-20020a05640231f100b0043cc66d7accsm1518518edb.36.2022.09.01.08.34.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Sep 2022 08:34:43 -0700 (PDT) Message-ID: Date: Thu, 1 Sep 2022 17:34:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH] asus-wmi: Increase FAN_CURVE_BUF_LEN to 32 Content-Language: en-US To: "Luke D. Jones" Cc: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, platform-driver-x86@vger.kernel.org, markgross@kernel.org References: <20220828074638.5473-1-luke@ljones.dev> From: Hans de Goede In-Reply-To: <20220828074638.5473-1-luke@ljones.dev> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Hi, On 8/28/22 09:46, Luke D. Jones wrote: > Fix for TUF laptops returning with an -ENOSPC on calling > asus_wmi_evaluate_method_buf() when fetching default curves. The TUF method > requires at least 32 bytes space. > > This also moves and changes the pr_debug() in fan_curve_check_present() to > pr_warn() in fan_curve_get_factory_default() so that there is at least some > indication in logs of why it fails. > > Signed-off-by: Luke D. Jones Thank you for your patch, I've applied this patch to my review-hans branch: https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while. Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window. Regards, Hans > --- > drivers/platform/x86/asus-wmi.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c > index 3d9fd58573f9..11203213e00d 100644 > --- a/drivers/platform/x86/asus-wmi.c > +++ b/drivers/platform/x86/asus-wmi.c > @@ -108,7 +108,7 @@ module_param(fnlock_default, bool, 0444); > #define WMI_EVENT_MASK 0xFFFF > > #define FAN_CURVE_POINTS 8 > -#define FAN_CURVE_BUF_LEN (FAN_CURVE_POINTS * 2) > +#define FAN_CURVE_BUF_LEN 32 > #define FAN_CURVE_DEV_CPU 0x00 > #define FAN_CURVE_DEV_GPU 0x01 > /* Mask to determine if setting temperature or percentage */ > @@ -2383,8 +2383,10 @@ static int fan_curve_get_factory_default(struct asus_wmi *asus, u32 fan_dev) > curves = &asus->custom_fan_curves[fan_idx]; > err = asus_wmi_evaluate_method_buf(asus->dsts_id, fan_dev, mode, buf, > FAN_CURVE_BUF_LEN); > - if (err) > + if (err) { > + pr_warn("%s (0x%08x) failed: %d\n", __func__, fan_dev, err); > return err; > + } > > fan_curve_copy_from_buf(curves, buf); > curves->device_id = fan_dev; > @@ -2402,9 +2404,6 @@ static int fan_curve_check_present(struct asus_wmi *asus, bool *available, > > err = fan_curve_get_factory_default(asus, fan_dev); > if (err) { > - pr_debug("fan_curve_get_factory_default(0x%08x) failed: %d\n", > - fan_dev, err); > - /* Don't cause probe to fail on devices without fan-curves */ > return 0; > } >