netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next 0/2] net: phy: Fallback to C22 for PHY register read/write
@ 2024-09-06  9:39 Niklas Söderlund
  2024-09-06  9:39 ` [net-next 1/2] net: phy: Expose the direct mdiobus access functions Niklas Söderlund
  2024-09-06  9:39 ` [net-next 2/2] net: phy: Fallback to C22 access if needed in phy_mii_ioctl() Niklas Söderlund
  0 siblings, 2 replies; 8+ messages in thread
From: Niklas Söderlund @ 2024-09-06  9:39 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Yoshihiro Shimoda,
	netdev
  Cc: linux-renesas-soc, Niklas Söderlund

Hello,

This series extends the behavior of the SIOCGMIIREG and SIOCSMIIREG 
IOCTLs to use the convenience functions mmd_phy_read() and 
mmd_phy_write() for C45 access. This brings the benefit of the core 
falling back to indirect C22 access of the underlying driver do not 
itself provide C45 read/write capability.

Patch 1/2 exposes the read/write functions making them available to the 
IOCTL callback. While patch 2/2 changes the IOCTL callback to make use 
of them.

Without this change using tools like phytool to read/write registers on 
a C45 only PHY using a C22 only driver fails as the IOCTL callback don't 
know how to talk C45 on the mdio bus.

Niklas Söderlund (2):
  net: phy: Expose the direct mdiobus access functions
  net: phy: Fallback to C22 access if needed in phy_mii_ioctl()

 drivers/net/phy/phy-core.c | 10 ++++++----
 drivers/net/phy/phy.c      | 18 ++++++++++++------
 include/linux/phy.h        | 12 ++++++++++++
 3 files changed, 30 insertions(+), 10 deletions(-)

-- 
2.46.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-09-17 16:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-06  9:39 [net-next 0/2] net: phy: Fallback to C22 for PHY register read/write Niklas Söderlund
2024-09-06  9:39 ` [net-next 1/2] net: phy: Expose the direct mdiobus access functions Niklas Söderlund
2024-09-10 23:19   ` Jakub Kicinski
2024-09-17 16:12     ` Russell King (Oracle)
2024-09-06  9:39 ` [net-next 2/2] net: phy: Fallback to C22 access if needed in phy_mii_ioctl() Niklas Söderlund
2024-09-06 21:04   ` Andrew Lunn
2024-09-06 21:36     ` Niklas Söderlund
2024-09-17 16:10       ` Russell King (Oracle)

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).