From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
Vladimir Oltean <olteanv@gmail.com>
Subject: [PATCH net-next 00/11] Convert mv88e6xxx to phylink_pcs
Date: Thu, 13 Jul 2023 09:41:24 +0100 [thread overview]
Message-ID: <ZK+4tOD4EpFzNM9x@shell.armlinux.org.uk> (raw)
Hi,
This series (previously posted with further patches on the 26 June as
RFC) converts mv88e6xxx to phylink_pcs, and thus moves it from being
a pre-March 2020 legacy driver.
The first four patches lay the ground-work for the conversion by
adding four new methods to the phylink_pcs operations structure:
pcs_enable() - called when the PCS is going to start to be used
pcs_disable() - called when the PCS is no longer being used
pcs_pre_config() - called before the MAC configuration method
pcs_post_config() - called after the MAC configuration method
Both of these are necessary for some of the mv88e639x
workarounds.
We also add the ability to inform phylink of a change to the PCS
state without involving the MAC later, by providing
phylink_pcs_change() which takes a phylink_pcs structure rather than
a phylink structure. phylink maintains which instance the PCS is
conencted to, so internally it can do the right thing when the PCS
is in-use.
Then we provide some additional mdiobus and mdiodev accessors that
we will be using in the new PCS drivers.
The changes for mv88e6xxx follow, and the first one needs to be
explicitly pointed out - we (Andrew and myself) have both decided that
all possible approaches to maintaining backwards compatibility with DT
have been exhaused - everyone has some objection to everything that
has been proposed. So, after many years of trying, we have decided
that this is just an impossibility, and with this patch, we are now
intentionally and knowingly breaking any DT that does not specify the
CPU and DSA port fixed-link parameters. Hence why Andrew has recently
been submitting DT update patches. It is regrettable that it has come
to this.
Following this, we start preparing 88e6xxx for phylink_pcs conversion
by padding the mac_select_pcs() DSA method, and the internal hooks to
create and tear-down PCS instances. Rather than bloat the already very
large mv88e6xxx_ops structure, I decided that it would be better that
the new internal chip specific PCS methods are all grouped within their
own structure - and this structure can be declared in the PCS drivers
themselves.
Then we have the actual conversion patches, one for each family of PCS.
Lastly, we clean up the driver after conversion, removing all the now
redundant code.
drivers/net/dsa/mv88e6xxx/Makefile | 3 +
drivers/net/dsa/mv88e6xxx/chip.c | 428 ++-----------
drivers/net/dsa/mv88e6xxx/chip.h | 33 +-
drivers/net/dsa/mv88e6xxx/pcs-6185.c | 190 ++++++
drivers/net/dsa/mv88e6xxx/pcs-6352.c | 390 ++++++++++++
drivers/net/dsa/mv88e6xxx/pcs-639x.c | 898 +++++++++++++++++++++++++++
drivers/net/dsa/mv88e6xxx/port.c | 30 -
drivers/net/dsa/mv88e6xxx/serdes.c | 1106 +---------------------------------
drivers/net/dsa/mv88e6xxx/serdes.h | 108 +---
drivers/net/phy/mdio_bus.c | 24 +-
drivers/net/phy/phylink.c | 110 +++-
include/linux/mdio.h | 26 +
include/linux/phylink.h | 29 +
13 files changed, 1737 insertions(+), 1638 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-07-13 8:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-13 8:41 Russell King (Oracle) [this message]
2023-07-13 8:42 ` [PATCH net-next 01/11] net: phylink: add pcs_enable()/pcs_disable() methods Russell King (Oracle)
2023-07-13 8:42 ` [PATCH net-next 02/11] net: phylink: add pcs_pre_config()/pcs_post_config() methods Russell King (Oracle)
2023-07-13 8:42 ` [PATCH net-next 03/11] net: phylink: add support for PCS link change notifications Russell King (Oracle)
2023-07-13 8:42 ` [PATCH net-next 04/11] net: mdio: add unlocked mdiobus and mdiodev bus accessors Russell King (Oracle)
2023-07-13 8:42 ` [PATCH net-next 05/11] net: dsa: mv88e6xxx: remove handling for DSA and CPU ports Russell King (Oracle)
2023-07-13 8:42 ` [PATCH net-next 06/11] net: dsa: mv88e6xxx: add infrastructure for phylink_pcs Russell King (Oracle)
2023-07-13 8:42 ` [PATCH net-next 07/11] net: dsa: mv88e6xxx: export mv88e6xxx_pcs_decode_state() Russell King (Oracle)
2023-07-13 8:42 ` [PATCH net-next 08/11] net: dsa: mv88e6xxx: convert 88e6185 to phylink_pcs Russell King (Oracle)
2023-07-13 8:42 ` [PATCH net-next 09/11] net: dsa: mv88e6xxx: convert 88e6352 " Russell King
2023-07-13 8:42 ` [PATCH net-next 10/11] net: dsa: mv88e6xxx: convert 88e639x " Russell King (Oracle)
2023-07-13 8:42 ` [PATCH net-next 11/11] net: dsa: mv88e6xxx: cleanup after phylink_pcs conversion Russell King (Oracle)
2023-07-14 8:00 ` [PATCH net-next 00/11] Convert mv88e6xxx to phylink_pcs 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=ZK+4tOD4EpFzNM9x@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--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).