netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>
Cc: "Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Arınç ÜNAL" <arinc.unal@arinc9.com>,
	"Claudiu Manoil" <claudiu.manoil@nxp.com>,
	"Daniel Golle" <daniel@makrotopia.org>,
	"David S. Miller" <davem@davemloft.net>,
	"DENG Qingfang" <dqfext@gmail.com>,
	"Eric Dumazet" <edumazet@google.com>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Landen Chao" <Landen.Chao@mediatek.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	netdev@vger.kernel.org, "Paolo Abeni" <pabeni@redhat.com>,
	"Sean Wang" <sean.wang@mediatek.com>,
	UNGLinuxDriver@microchip.com,
	"Vladimir Oltean" <olteanv@gmail.com>
Subject: [PATCH RFC net-next 00/14] dsa/88e6xxx/phylink changes after the next merge window
Date: Fri, 23 Jun 2023 15:15:52 +0100	[thread overview]
Message-ID: <ZJWpGCtIZ06jiBsO@shell.armlinux.org.uk> (raw)

Hi,

This patch series contains the minimum set of patches that I would like
to get in for the following merge window.

The first four patches are laying the groundwork for converting the
mv88e6xxx driver to use phylink PCS support. Patches 5 through 11
perform that conversion.

At that point, DSA becomes entirely phylink-legacy free, since all
drivers either set the "legacy_pre_march2020" boolean false, or use
the legacy adjust_link mechanism and thus don't implement phylink.
That then allows patches 12 and 13 which removes all setting of
legacy_pre_march2020 from DSA, since it becomes no longer relevant.

This leaves the final user of that boolean as mtk_eth_soc, which
makes use of state->speed in its mac_config() method which has
*always* been against the phylink API documentation, and has never
been guaranteed to hold a correct value in this function. Moreover,
I consider this to be broken, because it only configures the RGMII
clock rate based on state->speed when the interface changes from
something non-RGMII to RGMII. So, RGMII is probably rather broken
on the SoCs where this code path is used. I have placed a comment
in mtk_eth_soc about this, I have asked several times on lists and
Cc people about it, but I'm getting nowhere. DTS grepping seems to
indicate that there is no board that the mainline kernel supports
that would even use this code path.

The other issue with mtk_eth_soc's legacy requirement is its
implementation of mtk_mac_pcs_get_state(), and this prevents at
the moment either getting rid of the mac_pcs_get_state() method
from phylink, or marking the driver non-legacy even if we don't
care about the RGMII state->speed issue.

However, with mtk_eth_soc using phylink_pcs, we can at least kill
the old mac_an_restart function, which is what the last patch does.

I am not intending to submit this all as a single series; this is
merely being sent out as a preview for posting the first batch in
maybe three weeks time.

In the mean time, it would be great to have testing, particularly
with a range of different 88e6xxx switches (I only have a limited
subset.) Thanks.

 drivers/net/dsa/b53/b53_common.c       |    6 -
 drivers/net/dsa/mt7530.c               |    6 -
 drivers/net/dsa/mv88e6xxx/Makefile     |    3 +
 drivers/net/dsa/mv88e6xxx/chip.c       |  424 ++----------
 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/dsa/ocelot/felix.c         |    6 -
 drivers/net/dsa/qca/qca8k-8xxx.c       |    2 -
 drivers/net/dsa/sja1105/sja1105_main.c |    6 -
 drivers/net/phy/mdio_bus.c             |   24 +-
 drivers/net/phy/phylink.c              |  132 +++-
 include/linux/mdio.h                   |   26 +
 include/linux/phylink.h                |   41 +-
 include/net/dsa.h                      |    3 -
 net/dsa/port.c                         |   41 --
 20 files changed, 1742 insertions(+), 1733 deletions(-)
 create mode 100644 drivers/net/dsa/mv88e6xxx/pcs-6185.c
 create mode 100644 drivers/net/dsa/mv88e6xxx/pcs-6352.c
 create mode 100644 drivers/net/dsa/mv88e6xxx/pcs-639x.c

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

             reply	other threads:[~2023-06-23 14:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-23 14:15 Russell King (Oracle) [this message]
2023-06-23 14:16 ` [PATCH RFC net-next 01/14] net: phylink: add pcs_enable()/pcs_disable() methods Russell King (Oracle)
2023-06-23 14:16 ` [PATCH RFC net-next 02/14] net: phylink: add pcs_pre_config()/pcs_post_config() methods Russell King (Oracle)
2023-06-23 14:17 ` [PATCH RFC net-next 03/14] net: phylink: add support for PCS link change notifications Russell King (Oracle)
2024-01-23 19:46   ` Sean Anderson
2024-01-23 20:07     ` Russell King (Oracle)
2024-01-23 20:33       ` Sean Anderson
2024-01-23 21:05         ` Russell King (Oracle)
2024-01-23 21:09           ` Sean Anderson
2023-06-23 14:17 ` [PATCH RFC net-next 04/14] net: mdio: add unlocked mdiobus and mdiodev bus accessors Russell King (Oracle)
2023-06-23 14:17 ` [PATCH RFC net-next 05/14] net: dsa: mv88e6xxx: remove handling for DSA and CPU ports Russell King (Oracle)
2023-06-23 14:17 ` [PATCH RFC net-next 06/14] net: dsa: mv88e6xxx: add infrastructure for phylink_pcs Russell King (Oracle)
2023-06-23 14:17 ` [PATCH RFC net-next 07/14] net: dsa: mv88e6xxx: export mv88e6xxx_pcs_decode_state() Russell King (Oracle)
2023-06-23 14:17 ` [PATCH RFC net-next 08/14] net: dsa: mv88e6xxx: convert 88e6185 to phylink_pcs Russell King (Oracle)
2023-06-23 14:17 ` [PATCH RFC net-next 09/14] net: dsa: mv88e6xxx: convert 88e6352 " Russell King
2023-06-23 14:17 ` [PATCH RFC net-next 10/14] net: dsa: mv88e6xxx: convert 88e639x " Russell King (Oracle)
2023-06-23 14:17 ` [PATCH RFC net-next 11/14] net: dsa: mv88e6xxx: cleanup after phylink_pcs conversion Russell King (Oracle)
2023-06-23 14:17 ` [PATCH RFC net-next 12/14] net: dsa: remove legacy_pre_march2020 detection Russell King (Oracle)
2023-06-23 14:17 ` [PATCH RFC net-next 13/14] net: dsa: remove legacy_pre_march2020 from drivers Russell King (Oracle)
2023-06-23 14:18 ` [PATCH RFC net-next 14/14] net: phylink: remove legacy mac_an_restart() method Russell King (Oracle)

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=ZJWpGCtIZ06jiBsO@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=Landen.Chao@mediatek.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=arinc.unal@arinc9.com \
    --cc=claudiu.manoil@nxp.com \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=dqfext@gmail.com \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --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).