net: phy: remove fixed_phy_add and first its users
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 All 6 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | net: phy: fixed_phy: add helper fixed_phy_register_100fddrivers/ include/ | +18 | 0 replies | Applied |
| 2/6 | net: fec: register a fixed phy using fixed_phy_register_100fd if neededdrivers/ drivers/ | +27 | 5 replies | Applied |
| 3/6 | m68k: coldfire: remove creating a fixed phyarch/ | +0 | 0 replies | Applied |
| 4/6 | net: b44: register a fixed phy using fixed_phy_register_100fd if neededdrivers/ drivers/ | +21 | 0 replies | Applied |
| 5/6 | MIPS: BCM47XX: remove creating a fixed phyarch/ | +0 | 0 replies | Applied |
| 6/6 | net: phy: fixed_phy: remove fixed_phy_adddrivers/ include/ | +0 | 0 replies | Applied |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH net-next 0/6] net: phy: remove fixed_phy_add and first its users
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/[email protected]/
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(-)
Signature · 1 line
2.51.1