From: Paul Kocialkowski <paulk@sys-base.io>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
Corentin Labbe <clabbe.montjoie@gmail.com>
Subject: Re: [PATCH] net: dwmac-sun8i: Use parsed internal PHY address instead of 1
Date: Mon, 19 May 2025 21:51:30 +0200 [thread overview]
Message-ID: <aCuLwuSliICh86SP@collins> (raw)
In-Reply-To: <d89565fc-e338-4a58-b547-99f5ae87b559@lunn.ch>
[-- Attachment #1: Type: text/plain, Size: 1914 bytes --]
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@sys-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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2025-05-19 19:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-19 16:49 [PATCH] net: dwmac-sun8i: Use parsed internal PHY address instead of 1 Paul Kocialkowski
2025-05-19 19:25 ` Andrew Lunn
2025-05-19 19:51 ` Paul Kocialkowski [this message]
2025-05-19 20:38 ` Andrew Lunn
2025-05-20 8:11 ` Corentin Labbe
2025-05-21 1:40 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aCuLwuSliICh86SP@collins \
--to=paulk@sys-base.io \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=clabbe.montjoie@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jernej.skrabec@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=samuel@sholland.org \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).