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-next>] [day] [month] [year] [list]
Message-ID: <0285fcb0-0fb5-4f6f-823c-7b6e85e28ba3@gmail.com>
Date: Thu, 30 Oct 2025 22:39:34 +0100
From: Heiner Kallweit <hkallweit1@...il.com>
To: Greg Ungerer <gerg@...ux-m68k.org>,
 Geert Uytterhoeven <geert@...ux-m68k.org>, Hauke Mehrtens
 <hauke@...ke-m.de>, Rafał Miłecki <zajec5@...il.com>,
 Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
 Michael Chan <michael.chan@...adcom.com>, Wei Fang <wei.fang@....com>,
 Shenwei Wang <shenwei.wang@....com>, Clark Wang <xiaoning.wang@....com>,
 Russell King - ARM Linux <linux@...linux.org.uk>,
 Andrew Lunn <andrew@...n.ch>, Andrew Lunn <andrew+netdev@...n.ch>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 David Miller <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>
Cc: linux-m68k@...ts.linux-m68k.org, linux-mips@...r.kernel.org,
 imx@...ts.linux.dev, "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: [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/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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ