From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Frank Wunderlich <frank-w@public-files.de>
Cc: Eric Dumazet <edumazet@google.com>, Felix Fietkau <nbd@nbd.name>,
John Crispin <john@phrozen.org>,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
Mark Lee <Mark-MC.Lee@mediatek.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
Sean Wang <sean.wang@mediatek.com>
Subject: [PATCH net-next 00/11] net: mtk_eth_soc: improve PCS implementation
Date: Thu, 27 Oct 2022 14:10:11 +0100 [thread overview]
Message-ID: <Y1qDMw+DJLAJHT40@shell.armlinux.org.uk> (raw)
Hi,
As a result of invesigations from Frank Wunderlich, we know a lot more
about the Mediatek "SGMII" PCS block, and can implement the PCS support
correctly. This series achieves that, and Frank has tested the final
result and reports that it works for him. The series could do with
further testing by others, but I suspect that is unlikely to happen
until it is merged based on past performances with this driver.
Briefly, the patches in order:
1. Add a new helper to get the link timer duration in nanoseconds
2. Add definitions for the newly discovered registers and updates to
bit definitions, including bitmasks for the BMCR, BMSR and two
advertisement registers.
3. Remove unnecessary/unused error handling (functions always returning
zero.)
4. Adding the missing pcs_get_state() implementation.
5. Converting the code to use regmap_update_bits() rather than
open-coding read-modify-write sequences.
6. Adding out-of-band speed and duplex forcing for all non-inband modes
not just the 802.3z link modes the code currently does.
7. Moving the release of the PHY power down to the main pcs_config()
function.
8. Moving the interface speed selection to the main pcs_config()
function.
9. Adding advertisement programming.
10. Adding correct link timer programming using the new helper in the
first patch.
11. Adding support for 802.3z negotiation.
There is one remaining issue - when configuring the PCS for in-band,
for some reason the AN restart bit is always set. This should not be
necessary, but requires further investigation with the hardware to
find out whether it is really necessary. I suspect this was a work
around for a previous poor implementation.
drivers/net/ethernet/mediatek/mtk_eth_soc.h | 13 ++-
drivers/net/ethernet/mediatek/mtk_sgmii.c | 174 ++++++++++++++++------------
include/linux/phylink.h | 24 ++++
3 files changed, 134 insertions(+), 77 deletions(-)
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2022-10-27 13:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-27 13:10 Russell King (Oracle) [this message]
2022-10-27 13:10 ` [PATCH net-next 01/11] net: phylink: add phylink_get_link_timer_ns() helper Russell King (Oracle)
2022-10-27 13:10 ` [PATCH net-next 02/11] net: mtk_eth_soc: add definitions for PCS Russell King (Oracle)
2022-10-27 13:10 ` [PATCH net-next 03/11] net: mtk_eth_soc: eliminate unnecessary error handling Russell King (Oracle)
2022-10-27 13:10 ` [PATCH net-next 04/11] net: mtk_eth_soc: add pcs_get_state() implementation Russell King (Oracle)
2022-10-27 13:10 ` [PATCH net-next 05/11] net: mtk_eth_soc: convert mtk_sgmii to use regmap_update_bits() Russell King (Oracle)
2022-10-27 13:11 ` [PATCH net-next 06/11] net: mtk_eth_soc: add out of band forcing of speed and duplex in pcs_link_up Russell King (Oracle)
2022-10-27 13:11 ` [PATCH net-next 07/11] net: mtk_eth_soc: move PHY power up Russell King (Oracle)
2022-10-27 13:11 ` [PATCH net-next 08/11] net: mtk_eth_soc: move interface speed selection Russell King (Oracle)
2022-10-27 13:11 ` [PATCH net-next 09/11] net: mtk_eth_soc: add advertisement programming Russell King (Oracle)
2022-10-27 13:11 ` [PATCH net-next 10/11] net: mtk_eth_soc: move and correct link timer programming Russell King (Oracle)
2022-10-27 13:11 ` [PATCH net-next 11/11] net: mtk_eth_soc: add support for in-band 802.3z negotiation Russell King (Oracle)
2022-10-27 13:23 ` [PATCH net-next 00/11] net: mtk_eth_soc: improve PCS implementation Russell King (Oracle)
2022-10-29 5:00 ` patchwork-bot+netdevbpf
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=Y1qDMw+DJLAJHT40@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=Mark-MC.Lee@mediatek.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=frank-w@public-files.de \
--cc=john@phrozen.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sean.wang@mediatek.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).