Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3923482pxj; Mon, 21 Jun 2021 09:27:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxT7dqr2/tDOyzUgUdCbOHuHoKgXQsAlqeLfm8Mo/tvZmKrXjFwIW657gHTsszfgYI2NmhP X-Received: by 2002:a17:907:1609:: with SMTP id hb9mr16013477ejc.368.1624292874932; Mon, 21 Jun 2021 09:27:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292874; cv=none; d=google.com; s=arc-20160816; b=x1WQBwSFFYGUT+gRudUb6V7kpRgV85vJ3c5F9wqVth2f8XtFdITUk2+IxoAp6dJ/vP +O0kedxkB8v+DLAR/4C7Ny435T63pInWer6yUD9fb6dRSXkmciE07O7dSLridaIdzjbH 4S9CBOJ8Cl3cSsPVRm99+W1P5pAHz5eJuh4pA7pwkjogM0oG8HCGq42jXYqFzE3EZXjs EkraVsweJEhDfF5CCX/NbIOHgXCprwvNd0ebZ6RjKR2RfPSlawBbd/2kqlVMwniNACH4 oRX73rbl35hDzLIprI4Ps5lgAyaXZvEB9WpeGy91OjWcRUXmY3O5M9f7HL/0s4sigUQw NVnA== 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=7SXHNS9HRLeYBEx8F00012BwEkij23osbe/5q/eK9qg=; b=KotmuQGPu6pby29sAY5B2RAGBCo3lB/77Kv6rK8EyPLWr0oskmfSko6aCOSCY83Lo7 MCxLD4jNlhMt7ezoAhE4P9vU0JXHyUmVzZab2x/QiIFz7eA3xz8X4eWSFKKpyhuLk13R /+sO6gG/TjFbX0biD6cqZ3Fbc9d68BfdprHgpNei48tn9lWeLndhKyV6M8Z9SAhRHxOM kVGxlrNoJ7F5eWEH2bpCJycBi0fvMB7PnwcxcUQW0/1e6rhn4x3V9UlIX6ttFlHue+Tp A+ruTM3Na0Gbzlr5bILsn4mvdbxkBHDv8rmMnlIFOw81UeCDoWfwLZ1NF7gCvnb7rAwg FTwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SQNXtzuf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ay17si12320686ejb.438.2021.06.21.09.27.31; Mon, 21 Jun 2021 09:27:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SQNXtzuf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231474AbhFUQ2z (ORCPT + 99 others); Mon, 21 Jun 2021 12:28:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:49588 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231625AbhFUQ12 (ORCPT ); Mon, 21 Jun 2021 12:27:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6B66B613D1; Mon, 21 Jun 2021 16:22:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292569; bh=58p587Ztdh+iyD4r1ZSxRkyriJmylklzXXsDINK6tCw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SQNXtzufpKxi+roadc9N+s60iu0JOTwP2bOxtsXa2V1R+5BNl6gjtbmPo6zSR8JFl mZvM3U1PYeVWWE6AiQ4Mfky+49jeeoyj0pyasEQTIz4L76MqVvcA9W+oC3HWi567/2 CaS0rPp3MOpDfnVjM4s+wxi7gbrANRUbw7zF3G4s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andrzej Pietrasiewicz , Mykola Kostenok , Vadim Pasternak , Jiri Pirko , Ido Schimmel , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 015/146] mlxsw: core: Set thermal zone polling delay argument to real value at init Date: Mon, 21 Jun 2021 18:14:05 +0200 Message-Id: <20210621154911.783459622@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154911.244649123@linuxfoundation.org> References: <20210621154911.244649123@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mykola Kostenok [ Upstream commit 2fd8d84ce3095e8a7b5fe96532c91b1b9e07339c ] Thermal polling delay argument for modules and gearboxes thermal zones used to be initialized with zero value, while actual delay was used to be set by mlxsw_thermal_set_mode() by thermal operation callback set_mode(). After operations set_mode()/get_mode() have been removed by cited commits, modules and gearboxes thermal zones always have polling time set to zero and do not perform temperature monitoring. Set non-zero "polling_delay" in thermal_zone_device_register() routine, thus, the relevant thermal zones will perform thermal monitoring. Cc: Andrzej Pietrasiewicz Fixes: 5d7bd8aa7c35 ("thermal: Simplify or eliminate unnecessary set_mode() methods") Fixes: 1ee14820fd8e ("thermal: remove get_mode() operation of drivers") Signed-off-by: Mykola Kostenok Acked-by: Vadim Pasternak Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlxsw/core_thermal.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c index bf85ce9835d7..42e4437ac3c1 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c @@ -708,7 +708,8 @@ mlxsw_thermal_module_tz_init(struct mlxsw_thermal_module *module_tz) MLXSW_THERMAL_TRIP_MASK, module_tz, &mlxsw_thermal_module_ops, - NULL, 0, 0); + NULL, 0, + module_tz->parent->polling_delay); if (IS_ERR(module_tz->tzdev)) { err = PTR_ERR(module_tz->tzdev); return err; @@ -830,7 +831,8 @@ mlxsw_thermal_gearbox_tz_init(struct mlxsw_thermal_module *gearbox_tz) MLXSW_THERMAL_TRIP_MASK, gearbox_tz, &mlxsw_thermal_gearbox_ops, - NULL, 0, 0); + NULL, 0, + gearbox_tz->parent->polling_delay); if (IS_ERR(gearbox_tz->tzdev)) return PTR_ERR(gearbox_tz->tzdev); -- 2.30.2