From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>
Subject: [PATCH RFC net-next 0/9] net: pcs: xpcs: cleanups for clause 73 support
Date: Fri, 12 May 2023 18:26:39 +0100 [thread overview]
Message-ID: <ZF52z7PqH2HLrWEU@shell.armlinux.org.uk> (raw)
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!
next reply other threads:[~2023-05-12 17:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-12 17:26 Russell King (Oracle) [this message]
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
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=ZF52z7PqH2HLrWEU@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=Jose.Abreu@synopsys.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).