netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC net-next 0/9] net: pcs: xpcs: cleanups for clause 73 support
@ 2023-05-12 17:26 Russell King (Oracle)
  2023-05-12 17:27 ` [PATCH RFC net-next 1/9] net: mdio: add clause 73 to ethtool conversion helper Russell King (Oracle)
                   ` (8 more replies)
  0 siblings, 9 replies; 23+ messages in thread
From: Russell King (Oracle) @ 2023-05-12 17:26 UTC (permalink / raw)
  To: Jose Abreu
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Heiner Kallweit,
	Jakub Kicinski, netdev, Paolo Abeni

Hi,

This series cleans up xpcs code, moving much of the clause 73 code
out of the driver into places where others can make use of it.

Specifically, we add a helper to convert a clause 73 advertisement
to ethtool link modes to mdio.h, and a helper to resolve the clause
73 negotiation state to phylink, which includes the pause modes.

In doing this cleanup, several issues were identified with the
original xpcs implementation:

1) it masks the link partner advertisement with its own advertisement
   so userspace can't see what the full link partner advertisement
   was.
2) it was always setting pause modes irrespective of the advertisements
   on either end of the link.
3) it was reading the STAT1 registers multiple times. Reading STAT1
   has the side effect of unlatching the link-down status, so
   multiple reads should be avoided.

This patch series addresses the first two first by addressing the
issues, and then by moving over to the new helpers. The third issue
is solved by restructuring the xpcs code.

Obviously untested as I don't have xpcs hardware, so please can
someone test these changes and give a tested-by for them? Thanks.

 drivers/net/pcs/pcs-xpcs.c | 159 ++++++++++++++++++---------------------------
 drivers/net/pcs/pcs-xpcs.h |   3 -
 drivers/net/phy/phylink.c  |  54 +++++++++++----
 include/linux/mdio.h       |  39 +++++++++++
 include/linux/phylink.h    |   2 +
 include/uapi/linux/mdio.h  |  24 +++++++
 6 files changed, 170 insertions(+), 111 deletions(-)

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

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

end of thread, other threads:[~2023-05-13 18:17 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-12 17:26 [PATCH RFC net-next 0/9] net: pcs: xpcs: cleanups for clause 73 support Russell King (Oracle)
2023-05-12 17:27 ` [PATCH RFC net-next 1/9] net: mdio: add clause 73 to ethtool conversion helper Russell King (Oracle)
2023-05-12 23:47   ` Andrew Lunn
2023-05-12 17:27 ` [PATCH RFC net-next 2/9] net: phylink: remove duplicated linkmode pause resolution Russell King (Oracle)
2023-05-12 23:52   ` Andrew Lunn
2023-05-12 17:27 ` [PATCH RFC net-next 3/9] net: phylink: add function to resolve clause 73 negotiation Russell King (Oracle)
2023-05-12 23:57   ` Andrew Lunn
2023-05-13  9:24     ` Russell King (Oracle)
2023-05-13 13:55       ` Andrew Lunn
2023-05-12 17:27 ` [PATCH RFC net-next 4/9] net: pcs: xpcs: clean up reading clause 73 link partner advertisement Russell King (Oracle)
2023-05-13  0:01   ` Andrew Lunn
2023-05-12 17:27 ` [PATCH RFC net-next 5/9] net: pcs: xpcs: use mii_c73_to_linkmode() helper Russell King (Oracle)
2023-05-13  0:05   ` Andrew Lunn
2023-05-12 17:27 ` [PATCH RFC net-next 6/9] net: pcs: xpcs: correct lp_advertising contents Russell King (Oracle)
2023-05-13 17:39   ` Andrew Lunn
2023-05-12 17:27 ` [PATCH RFC net-next 7/9] net: pcs: xpcs: correct pause resolution Russell King (Oracle)
2023-05-13 17:47   ` Andrew Lunn
2023-05-13 18:13     ` Russell King (Oracle)
2023-05-13 18:17       ` Andrew Lunn
2023-05-12 17:27 ` [PATCH RFC net-next 8/9] net: pcs: xpcs: use phylink_resolve_c73() helper Russell King (Oracle)
2023-05-12 19:38   ` Simon Horman
2023-05-12 17:27 ` [PATCH RFC net-next 9/9] net: pcs: xpcs: avoid reading STAT1 more than once Russell King (Oracle)
2023-05-12 19:36   ` Simon Horman

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