From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 39174C369DC for ; Thu, 1 May 2025 22:54:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id EFA20608BA; Thu, 1 May 2025 22:54:46 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Ctc8Hd7505su; Thu, 1 May 2025 22:54:46 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org E6B5460AE4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1746140086; bh=M/yjSRIbGflTDSPl43f3RtWmirb/fiqDnWGDKzd6f04=; h=From:Date:References:In-Reply-To:To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=8ugLHNhnQgKOVzw/LLUjIZKqMox3pqMG8RK4nN3Ma7ukaK6OAeyVkjFP41WSq4k5Y hKmCdAysQTkHoeHG9Ap01Ry5ZmT3zpVYBT8PeiRsH/I6s3jHPQ6mzwbT4Kv8XVHuHU vi+dSDiXh4TSP52qZISru5am96DJJo645Zzjs+U8Soh3rwBIHKMBr0Y5GSl7Tfnq42 NY5M/nttFxgRNbSqR+QYNK2ce5vl8KiAeqr8BZY01XogbYOWB9VVA/6L7d0h3jEgCs ppyfjO5CcrG31mCDMZHSF8uKQ+JQSoxK91TsZ5dG4zx2R+xMiKR9OBlowAt2Yc0gCg gtCZ7r2FAZIzQ== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id E6B5460AE4; Thu, 1 May 2025 22:54:45 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists1.osuosl.org (Postfix) with ESMTP id 68D8122A for ; Thu, 1 May 2025 22:54:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 2BC3B417B1 for ; Thu, 1 May 2025 22:54:36 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id IO2CVByHkasy for ; Thu, 1 May 2025 22:54:35 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=198.175.65.13; helo=mgamail.intel.com; envelope-from=jacob.e.keller@intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 91452417B0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 91452417B0 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by smtp4.osuosl.org (Postfix) with ESMTPS id 91452417B0 for ; Thu, 1 May 2025 22:54:35 +0000 (UTC) X-CSE-ConnectionGUID: dhVRuz//T1OT4NL4mFuiOg== X-CSE-MsgGUID: JM8NJr8sTWGiv8FqiOxwRA== X-IronPort-AV: E=McAfee;i="6700,10204,11420"; a="58811733" X-IronPort-AV: E=Sophos;i="6.15,254,1739865600"; d="scan'208";a="58811733" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 May 2025 15:54:36 -0700 X-CSE-ConnectionGUID: uPXsd7ZCQQyDNap6ptzdtQ== X-CSE-MsgGUID: YEh+XF3RRhKuXSGWGiFpyw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,254,1739865600"; d="scan'208";a="138514300" Received: from jekeller-desk.jf.intel.com ([10.166.241.15]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 May 2025 15:54:34 -0700 From: Jacob Keller Date: Thu, 01 May 2025 15:54:20 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250501-kk-tspll-improvements-alignment-v4-9-24c83d0ce7a8@intel.com> References: <20250501-kk-tspll-improvements-alignment-v4-0-24c83d0ce7a8@intel.com> In-Reply-To: <20250501-kk-tspll-improvements-alignment-v4-0-24c83d0ce7a8@intel.com> To: Intel Wired LAN , Anthony Nguyen , netdev Cc: Jacob Keller , Michal Kubiak , Aleksandr Loktionov , Karol Kolacinski , Przemek Kitszel , Milena Olech , Paul Menzel X-Mailer: b4 0.14.2 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1746140076; x=1777676076; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=p2ifKL5IrrpxwpF8I/RdIitdsMsZUbE9VlVfq98qPEU=; b=UQ07uVP8ltfTpdCj840ELqAoO8qd6f6Ceb8JT9lcQzc6DYOSCnDbHKMP Arl/rZbjZx7fNHRRMPqB+IR0PJqs9xboTu+ggfisRVK55iOzBdLvA6Pfv P+aWzy2/mwSa/uvnLb68l9GBIGY56H4+Al0dA/0oNUqKybM2hv5z7ejc4 ZhBAMdJzRlexXYKgXqROHWJ25+qKBbAdF5PaU4Ggjh7gUMV+IA7nkbY16 BXhpacKN0rdvbicVSnisTWneNDhMlpsdl2B2ZTUE5XIkETxfr5y8i/Fiz R8ewTwU1PEjv+Jd1zH3LeVVIHJwFHtrf75+x/l/meUX3BOcBf1EWBFCZA A==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=intel.com X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=UQ07uVP8 Subject: [Intel-wired-lan] [PATCH v4 09/15] ice: read TSPLL registers again before reporting status X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" After programming the TSPLL, re-read the registers before reporting status. This ensures the debug log message will show what was actually programmed, rather than relying on a cached value. Signed-off-by: Jacob Keller --- drivers/net/ethernet/intel/ice/ice_tspll.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_tspll.c b/drivers/net/ethernet/intel/ice/ice_tspll.c index 8de1ad1da8346d4be4224b923de3baeffc954198..74384725869399b4aa999d5b1fe33a5b19e0c2fd 100644 --- a/drivers/net/ethernet/intel/ice/ice_tspll.c +++ b/drivers/net/ethernet/intel/ice/ice_tspll.c @@ -201,8 +201,11 @@ static int ice_tspll_cfg_e82x(struct ice_hw *hw, enum ice_tspll_freq clk_freq, return -EBUSY; } - ice_tspll_log_cfg(hw, dw24.ts_pll_enable, clk_src, clk_freq, true, - true); + ICE_READ_CGU_REG_OR_DIE(hw, ICE_CGU_R9, &dw9.val); + ICE_READ_CGU_REG_OR_DIE(hw, ICE_CGU_R24, &dw24.val); + + ice_tspll_log_cfg(hw, dw24.ts_pll_enable, dw24.time_ref_sel, + dw9.time_ref_freq_sel, true, false); return 0; } @@ -343,8 +346,11 @@ static int ice_tspll_cfg_e825c(struct ice_hw *hw, enum ice_tspll_freq clk_freq, return -EBUSY; } - ice_tspll_log_cfg(hw, dw23.ts_pll_enable, clk_src, clk_freq, true, - true); + ICE_READ_CGU_REG_OR_DIE(hw, ICE_CGU_R9, &dw9.val); + ICE_READ_CGU_REG_OR_DIE(hw, ICE_CGU_R23, &dw23.val); + + ice_tspll_log_cfg(hw, dw23.ts_pll_enable, dw23.time_ref_sel, + dw9.time_ref_freq_sel, true, true); return 0; } -- 2.48.1.397.gec9d649cc640