From: Heiner Kallweit <hkallweit1@gmail.com>
To: "Greg Ungerer" <gerg@linux-m68k.org>,
"Geert Uytterhoeven" <geert@linux-m68k.org>,
"Hauke Mehrtens" <hauke@hauke-m.de>,
"Rafał Miłecki" <zajec5@gmail.com>,
"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
"Michael Chan" <michael.chan@broadcom.com>,
"Wei Fang" <wei.fang@nxp.com>,
"Shenwei Wang" <shenwei.wang@nxp.com>,
"Clark Wang" <xiaoning.wang@nxp.com>,
"Russell King - ARM Linux" <linux@armlinux.org.uk>,
"Andrew Lunn" <andrew@lunn.ch>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"David Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>
Cc: linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org,
imx@lists.linux.dev,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [PATCH net-next 0/6] net: phy: remove fixed_phy_add and first its users
Date: Thu, 30 Oct 2025 22:39:34 +0100 [thread overview]
Message-ID: <0285fcb0-0fb5-4f6f-823c-7b6e85e28ba3@gmail.com> (raw)
fixed_phy_add() has a number of problems/disadvantages:
- It uses phy address 0 w/o checking whether a fixed phy with this
address exists already.
- A subsequent call to fixed_phy_register() would also use phy address 0,
because fixed_phy_add() doesn't mark it as used.
- fixed_phy_add() is used from platform code, therefore requires that
fixed phy code is built-in.
fixed_phy_add() has only two users
- coldfire/5272, using fec
- bcm47xx, using b44
So migrate fec and b44 to use fixed_phy_register_100fd(), afterwards
remove usage of fixed_phy_add() from the two platforms, and eventually
remove fixed_phy_add().
When I proposed helper fixed_phy_register_100fd() first, there was
the question whether it's worth it, and Jakub asked to submit the
full series:
https://lore.kernel.org/netdev/20251021182021.15223c1e@kernel.org/
Apart from this series, there are two more places where the helper
can be used to simplify the code: dsa_loop, ftgmac100
I left this for a follow-up.
Heiner Kallweit (6):
net: phy: fixed_phy: add helper fixed_phy_register_100fd
net: fec: register a fixed phy using fixed_phy_register_100fd if
needed
m68k: coldfire: remove creating a fixed phy
net: b44: register a fixed phy using fixed_phy_register_100fd if
needed
MIPS: BCM47XX: remove creating a fixed phy
net: phy: fixed_phy: remove fixed_phy_add
arch/m68k/coldfire/m5272.c | 15 -------
arch/mips/bcm47xx/setup.c | 7 ---
drivers/net/ethernet/broadcom/Kconfig | 1 +
drivers/net/ethernet/broadcom/b44.c | 37 ++++++++--------
drivers/net/ethernet/freescale/Kconfig | 1 +
drivers/net/ethernet/freescale/fec_main.c | 52 +++++++++++------------
drivers/net/phy/fixed_phy.c | 18 +++++---
include/linux/phy_fixed.h | 8 +++-
8 files changed, 66 insertions(+), 73 deletions(-)
--
2.51.1
next reply other threads:[~2025-10-30 21:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-30 21:39 Heiner Kallweit [this message]
2025-10-30 21:41 ` [PATCH net-next 1/6] net: phy: fixed_phy: add helper fixed_phy_register_100fd Heiner Kallweit
2025-10-30 21:42 ` [PATCH net-next 2/6] net: fec: register a fixed phy using fixed_phy_register_100fd if needed Heiner Kallweit
2025-10-31 3:36 ` Wei Fang
2025-10-31 8:01 ` Heiner Kallweit
2025-11-03 3:11 ` Greg Ungerer
2025-11-03 3:15 ` Greg Ungerer
2025-11-03 7:36 ` Heiner Kallweit
2025-10-30 21:43 ` [PATCH net-next 3/6] m68k: coldfire: remove creating a fixed phy Heiner Kallweit
2025-10-30 21:44 ` [PATCH net-next 4/6] net: b44: register a fixed phy using fixed_phy_register_100fd if needed Heiner Kallweit
2025-10-30 21:45 ` [PATCH net-next 5/6] MIPS: BCM47XX: remove creating a fixed phy Heiner Kallweit
2025-10-30 21:46 ` [PATCH net-next 6/6] net: phy: fixed_phy: remove fixed_phy_add Heiner Kallweit
2025-11-05 2:50 ` [PATCH net-next 0/6] net: phy: remove fixed_phy_add and first its users 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=0285fcb0-0fb5-4f6f-823c-7b6e85e28ba3@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=geert@linux-m68k.org \
--cc=gerg@linux-m68k.org \
--cc=hauke@hauke-m.de \
--cc=imx@lists.linux.dev \
--cc=kuba@kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shenwei.wang@nxp.com \
--cc=tsbogend@alpha.franken.de \
--cc=wei.fang@nxp.com \
--cc=xiaoning.wang@nxp.com \
--cc=zajec5@gmail.com \
/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).