From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 11F131D618A; Tue, 17 Feb 2026 16:20:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771345213; cv=none; b=ZXvfCdn2T0sJgjf9CSCJ40rUKJKlWtKtoxWNjASl4SBei8ZtIKcLJY07EEo3LergC5xgXvCF7/Zl+iMY7goTAMj2c4oQddgBOXLqta+Glbnej1+lOt+oe3AoNpm8PMbhKWh1Sxn80WpQB1YprzJULVjHcneIviFd6AkyQ57yVH8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771345213; c=relaxed/simple; bh=9hY5pUyrY2xeg3LvsbtSBqFtfEGz/QkUpu1tq1h/nuo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=el67kwl2O3GeRi42J31l0cmon6xBjhpfIFvw3CG8JUQQ8XnknNtMp9tqwqrm2NcMrX4fDYQAZVxcvNw7Oi+Ws323R6bmprgXAJtpGsot4nmatnN2wVvUAXjqBY+bCvkx7EIitiHMBtU/jCiWDasOoGtXtBGc4Ur9fsXOS3oP1t8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jsIMRWr0; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jsIMRWr0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72EB0C4CEF7; Tue, 17 Feb 2026 16:20:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771345212; bh=9hY5pUyrY2xeg3LvsbtSBqFtfEGz/QkUpu1tq1h/nuo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jsIMRWr0NLekYrsnqsYs/zzl24Q6WhF4xUSG06NnwYBAxrJOtbXIwX6ttUHFBAlTd 5BRvTkdBHQXtFy14kENlsue9MBdQfRcRiUfRF8e8ugMb8ThOXMHKgTj5rtcpl25zqo VH5jzz/cSf8S1vvy6+EV8xjCR/Ft+0U8qbrfHZCZdT1cN2/Mxnm+YMun/2zW3wA+E0 aVTKduOEkWyg/Vpn+Tp3UwkA5DTTXvTyVEPRUtuFbbBJKxouznBd9r75bcWFyTqtt1 BhNdDPNWE68Al8YhGQLSZrZ3xB+O21a149Zjw7LRdcKpo1VmFPCdeJ+WZhteD9+Z0L 9/xXVEv2W9CRQ== Date: Tue, 17 Feb 2026 16:20:08 +0000 From: Simon Horman To: Ivan Vecera Cc: netdev@vger.kernel.org, pabeni@redhat.com, Prathosh Satish , Vadim Fedorenko , Arkadiusz Kubalewski , Jiri Pirko , Petr Oros , Jakub Kicinski , open list Subject: Re: [PATCH net] dpll: zl3073x: Fix ref frequency setting Message-ID: References: <20260216194007.680416-1-ivecera@redhat.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260216194007.680416-1-ivecera@redhat.com> On Mon, Feb 16, 2026 at 08:40:07PM +0100, Ivan Vecera wrote: > The frequency for an input reference is computed as: > > frequency = freq_base * freq_mult * freq_ratio_m / freq_ratio_n > > Before commit 5bc02b190a3fb ("dpll: zl3073x: Cache all reference > properties in zl3073x_ref"), zl3073x_dpll_input_pin_frequency_set() > explicitly wrote 1 to both the REF_RATIO_M and REF_RATIO_N hardware > registers whenever a new frequency was set. This ensured the FEC ratio > was always reset to 1:1 alongside the new base/multiplier values. > > The refactoring in that commit introduced zl3073x_ref_freq_set() to > update the cached ref state, but this helper only sets freq_base and > freq_mult without resetting freq_ratio_m and freq_ratio_n to 1. Because > zl3073x_ref_state_set() uses a compare-and-write strategy, unchanged > ratio fields are never written to the hardware. If the device previously > had non-unity FEC ratio values, they remain in effect after a frequency > change, resulting in an incorrect computed frequency. > > Explicitly set freq_ratio_m and freq_ratio_n to 1 in zl3073x_ref_freq_set() > to restore the original behavior. > > Fixes: 5bc02b190a3fb ("dpll: zl3073x: Cache all reference properties in zl3073x_ref") > Signed-off-by: Ivan Vecera Reviewed-by: Simon Horman