From: "Russell King (Oracle)" <rmk+kernel@armlinux•org.uk>
To: "Andrew Lunn" <andrew@lunn•ch>,
"Heiner Kallweit" <hkallweit1@gmail•com>,
"Daniel Golle" <daniel@makrotopia•org>,
"Arınç ÜNAL" <arinc.unal@arinc9•com>,
"Frank Wunderlich" <frank-w@public-files•de>,
"David Woodhouse" <dwmw@amazon•co.uk>
Cc: AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora•com>,
"David S. Miller" <davem@davemloft•net>,
Eric Dumazet <edumazet@google•com>, Felix Fietkau <nbd@nbd•name>,
Jakub Kicinski <kuba@kernel•org>, John Crispin <john@phrozen•org>,
linux-arm-kernel@lists•infradead.org,
linux-mediatek@lists•infradead.org,
Lorenzo Bianconi <lorenzo@kernel•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 v2 2/4] net: ethernet: mtk_eth_soc: remove mac_pcs_get_state and modernise
Date: Sat, 22 Jul 2023 21:32:54 +0100 [thread overview]
Message-ID: <E1qNJHa-000kFZ-PS@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <ZLw8DoRskRXLQK37@shell.armlinux.org.uk>
Remove the .mac_pcs_get_state function, since as far as I can tell is
never called - no DT appears to specify an in-band-status management
nor SFP support for this driver.
Removal of this, along with the previous patch to remove the incorrect
clocking configuration, means that the driver becomes non-legacy, so
we can remove the "legacy_pre_march2020" status from this driver.
Reviewed-by: Daniel Golle <daniel@makrotopia•org>
Tested-by: Daniel Golle <daniel@makrotopia•org>
Tested-by: Frank Wunderlich <frank-w@public-files•de>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux•org.uk>
---
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 35 ---------------------
1 file changed, 35 deletions(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index fe8b7e38decc..7490d48000c2 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -568,38 +568,6 @@ static int mtk_mac_finish(struct phylink_config *config, unsigned int mode,
return 0;
}
-static void mtk_mac_pcs_get_state(struct phylink_config *config,
- struct phylink_link_state *state)
-{
- struct mtk_mac *mac = container_of(config, struct mtk_mac,
- phylink_config);
- u32 pmsr = mtk_r32(mac->hw, MTK_MAC_MSR(mac->id));
-
- state->link = (pmsr & MAC_MSR_LINK);
- state->duplex = (pmsr & MAC_MSR_DPX) >> 1;
-
- switch (pmsr & (MAC_MSR_SPEED_1000 | MAC_MSR_SPEED_100)) {
- case 0:
- state->speed = SPEED_10;
- break;
- case MAC_MSR_SPEED_100:
- state->speed = SPEED_100;
- break;
- case MAC_MSR_SPEED_1000:
- state->speed = SPEED_1000;
- break;
- default:
- state->speed = SPEED_UNKNOWN;
- break;
- }
-
- state->pause &= (MLO_PAUSE_RX | MLO_PAUSE_TX);
- if (pmsr & MAC_MSR_RX_FC)
- state->pause |= MLO_PAUSE_RX;
- if (pmsr & MAC_MSR_TX_FC)
- state->pause |= MLO_PAUSE_TX;
-}
-
static void mtk_mac_link_down(struct phylink_config *config, unsigned int mode,
phy_interface_t interface)
{
@@ -722,7 +690,6 @@ static void mtk_mac_link_up(struct phylink_config *config,
static const struct phylink_mac_ops mtk_phylink_ops = {
.mac_select_pcs = mtk_mac_select_pcs,
- .mac_pcs_get_state = mtk_mac_pcs_get_state,
.mac_config = mtk_mac_config,
.mac_finish = mtk_mac_finish,
.mac_link_down = mtk_mac_link_down,
@@ -4327,8 +4294,6 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
mac->phylink_config.dev = ð->netdev[id]->dev;
mac->phylink_config.type = PHYLINK_NETDEV;
- /* This driver makes use of state->speed in mac_config */
- mac->phylink_config.legacy_pre_march2020 = true;
mac->phylink_config.mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
MAC_10 | MAC_100 | MAC_1000 | MAC_2500FD;
--
2.30.2
next prev parent reply other threads:[~2023-07-22 20:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-22 20:29 [PATCH net-next v2 0/4] Remove legacy phylink behaviour Russell King (Oracle)
2023-07-22 20:32 ` [PATCH net-next v2 1/4] net: ethernet: mtk_eth_soc: remove incorrect PLL configuration Russell King (Oracle)
2023-07-22 20:32 ` Russell King (Oracle) [this message]
2023-07-22 20:32 ` [PATCH net-next v2 3/4] net: phylink: strip out pre-March 2020 legacy code Russell King (Oracle)
2023-07-22 20:33 ` [PATCH net-next v2 4/4] net: phylink: explicitly invalidate link_state members in mac_config Russell King (Oracle)
2023-07-25 13:10 ` [PATCH net-next v2 0/4] Remove legacy phylink behaviour 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=E1qNJHa-000kFZ-PS@rmk-PC.armlinux.org.uk \
--to=rmk+kernel@armlinux$(echo .)org.uk \
--cc=Mark-MC.Lee@mediatek$(echo .)com \
--cc=andrew@lunn$(echo .)ch \
--cc=angelogioacchino.delregno@collabora$(echo .)com \
--cc=arinc.unal@arinc9$(echo .)com \
--cc=daniel@makrotopia$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=dwmw@amazon$(echo .)co.uk \
--cc=edumazet@google$(echo .)com \
--cc=frank-w@public-files$(echo .)de \
--cc=hkallweit1@gmail$(echo .)com \
--cc=john@phrozen$(echo .)org \
--cc=kuba@kernel$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-mediatek@lists$(echo .)infradead.org \
--cc=lorenzo@kernel$(echo .)org \
--cc=matthias.bgg@gmail$(echo .)com \
--cc=nbd@nbd$(echo .)name \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=sean.wang@mediatek$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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