lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 4 Feb 2024 16:22:09 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Jie Luo <quic_luoj@...cinc.com>
Cc: Christian Marangi <ansuelsmth@...il.com>,
	Andy Gross <agross@...nel.org>,
	Bjorn Andersson <andersson@...nel.org>,
	Konrad Dybcio <konrad.dybcio@...aro.org>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Rob Herring <robh+dt@...nel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Heiner Kallweit <hkallweit1@...il.com>,
	Russell King <linux@...linux.org.uk>,
	Robert Marko <robert.marko@...tura.hr>,
	linux-arm-msm@...r.kernel.org, netdev@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [net-next PATCH v2 2/3] net: mdio: ipq4019: add support for
 clock-frequency property

On Sun, Feb 04, 2024 at 05:59:10PM +0800, Jie Luo wrote:
> 
> 
> On 1/30/2024 8:35 AM, Christian Marangi wrote:
> > +
> > +	/* If div is /256 assume nobody have set this value and
> > +	 * try to find one MDC rate that is close the 802.3 spec of
> > +	 * 2.5MHz
> > +	 */
> > +	for (div = 256; div >= 8; div /= 2) {
> > +		/* Stop as soon as we found a divider that
> > +		 * reached the closest value to 2.5MHz
> > +		 */
> > +		if (DIV_ROUND_UP(ahb_rate, div) > 2500000)
> > +			break;
> 
> Hi Christian,
> Sorry for the delayed review.
> 
> The MDIO hardware block supports higher frequency 6.25M and 12.5M,
> Would you remove this 2.5MHZ limitation? On the IPQ platform, we
> normally use 6.25MHZ.

802.3 says the clock has a maximum of 2.5MHz. So this code is correct.

It is however O.K. to go faster, but since that breaks the standard,
you need each board to indicate it knows all the devices on the bus do
support higher speeds and its O.K. to break the standard. You indicate
this by using the DT property in its .dts file. For an MDIO bus which
is totally internal, you could however put the DT property in the SoC
.dtsi file.

      Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ