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]
Message-ID: <aCuLwuSliICh86SP@collins>
Date: Mon, 19 May 2025 21:51:30 +0200
From: Paul Kocialkowski <paulk@...-base.io>
To: Andrew Lunn <andrew@...n.ch>
Cc: netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-sunxi@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Andrew Lunn <andrew+netdev@...n.ch>,
	"David S . Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Chen-Yu Tsai <wens@...e.org>,
	Jernej Skrabec <jernej.skrabec@...il.com>,
	Samuel Holland <samuel@...lland.org>,
	Corentin Labbe <clabbe.montjoie@...il.com>
Subject: Re: [PATCH] net: dwmac-sun8i: Use parsed internal PHY address
 instead of 1

Hi Andrew,

Thanks for your reply.

Le Mon 19 May 25, 21:25, Andrew Lunn a écrit :
> On Mon, May 19, 2025 at 06:49:36PM +0200, Paul Kocialkowski wrote:
> > While the MDIO address of the internal PHY on Allwinner sun8i chips is
> > generally 1, of_mdio_parse_addr is used to cleanly parse the address
> > from the device-tree instead of hardcoding it.
> > 
> > A commit reworking the code ditched the parsed value and hardcoded the
> > value 1 instead, which didn't really break anything but is more fragile
> > and not future-proof.
> > 
> > Restore the initial behavior using the parsed address returned from the
> > helper.
> > 
> > Fixes: 634db83b8265 ("net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs")
> > Signed-off-by: Paul Kocialkowski <paulk@...-base.io>
> 
> Have you validated all .dts files using this binding? Any using
> anything other than 1? The problem with silly bugs like this is that
> there might be DT blobs with the value 42 which currently work, but
> will break as soon as this patch lands.

There's actually only two users of this (this code path for internal PHYs is
only used by two chips), which are platform dtsi files that have the address
already set to 1.

I have actually tested both with hardware and they work fine.

> Just stating in the commit message you have checked will help get the
> patch merged.

Do you think it's worth resending? I'd be fine with adding this when picking
up the patch:

The internal PHY is only found on the H3/H5 and V3s/V3/S3 chips which already
have the same address properly described in their platform device-tree and
were verified to work after this patch.

Cheers,

Paul

-- 
Paul Kocialkowski,

Independent contractor - sys-base - https://www.sys-base.io/
Free software developer - https://www.paulk.fr/

Expert in multimedia, graphics and embedded hardware support with Linux.

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ