[][kernel-6.6][mt7988][eth][Remove the unnecessary check in the mtk_mac_link_down() function]
[Description]
Remove the unnecessary check in the mtk_mac_link_down() function.
[Release-log]
N/A
Change-Id: If559b7db3a0079a8504626ecce0e5919bd1b1ff2
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/9830516
diff --git a/autobuild/unified/global/master/files/target/linux/mediatek/patches-6.6/999-2702-net-ethernet-mtk_eth_soc-revise-xgmac-force-mode.patch b/autobuild/unified/global/master/files/target/linux/mediatek/patches-6.6/999-2702-net-ethernet-mtk_eth_soc-revise-xgmac-force-mode.patch
index 99bc92f..be03359 100644
--- a/autobuild/unified/global/master/files/target/linux/mediatek/patches-6.6/999-2702-net-ethernet-mtk_eth_soc-revise-xgmac-force-mode.patch
+++ b/autobuild/unified/global/master/files/target/linux/mediatek/patches-6.6/999-2702-net-ethernet-mtk_eth_soc-revise-xgmac-force-mode.patch
@@ -1,15 +1,15 @@
-From 228c9dd5960d406f23a9bdaa0f5bf9f217df1584 Mon Sep 17 00:00:00 2001
+From ac3df2b1a6c63e1c61df194d19cfd7493fbb4579 Mon Sep 17 00:00:00 2001
From: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
-Date: Tue, 29 Oct 2024 18:06:18 +0800
+Date: Fri, 1 Nov 2024 11:28:16 +0800
Subject: [PATCH] net: ethernet: mtk_eth_soc: revise xgmac force mode
---
- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 31 ++++++++++++++++-----
- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 3 +-
- 2 files changed, 26 insertions(+), 8 deletions(-)
+ drivers/net/ethernet/mediatek/mtk_eth_soc.c | 30 ++++++++++++++++-----
+ drivers/net/ethernet/mediatek/mtk_eth_soc.h | 3 ++-
+ 2 files changed, 25 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-index 28d3dddfc..bb3b00a83 100644
+index 7237b9b..cc33931 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -759,6 +759,24 @@ static void mtk_mac_config(struct phylink_config *config, unsigned int mode,
@@ -37,7 +37,7 @@
static int mtk_mac_finish(struct phylink_config *config, unsigned int mode,
phy_interface_t interface)
{
-@@ -794,10 +812,10 @@ static void mtk_mac_link_down(struct phylink_config *config, unsigned int mode,
+@@ -794,10 +812,9 @@ static void mtk_mac_link_down(struct phylink_config *config, unsigned int mode,
if (!mtk_interface_mode_is_xgmii(interface)) {
mtk_m32(mac->hw, MAC_MCR_TX_EN | MAC_MCR_RX_EN | MAC_MCR_FORCE_LINK, 0, MTK_MAC_MCR(mac->id));
@@ -45,12 +45,11 @@
- mtk_m32(mac->hw, MTK_XGMAC_FORCE_LINK(mac->id), 0, MTK_XGMAC_STS(mac->id));
} else if (mtk_is_netsys_v3_or_greater(mac->hw) && mac->id != MTK_GMAC1_ID) {
mtk_m32(mac->hw, XMAC_MCR_TRX_DISABLE, XMAC_MCR_TRX_DISABLE, MTK_XMAC_MCR(mac->id));
-+ if (mtk_is_netsys_v3_or_greater(mac->hw))
-+ mtk_m32(mac->hw, MTK_XGMAC_FORCE_LINK(mac->id), 0, MTK_XGMAC_STS(mac->id));
++ mtk_m32(mac->hw, MTK_XGMAC_FORCE_LINK(mac->id), 0, MTK_XGMAC_STS(mac->id));
}
}
-@@ -913,7 +931,7 @@ static void mtk_xgdm_mac_link_up(struct mtk_mac *mac,
+@@ -913,7 +930,7 @@ static void mtk_xgdm_mac_link_up(struct mtk_mac *mac,
unsigned int mode, phy_interface_t interface,
int speed, int duplex, bool tx_pause, bool rx_pause)
{
@@ -59,7 +58,7 @@
if (mac->id == MTK_GMAC1_ID)
return;
-@@ -923,10 +941,8 @@ static void mtk_xgdm_mac_link_up(struct mtk_mac *mac,
+@@ -923,10 +940,8 @@ static void mtk_xgdm_mac_link_up(struct mtk_mac *mac,
mdelay(20);
mtk_m32(mac->hw, XMAC_GLB_CNTCLR, XMAC_GLB_CNTCLR, MTK_XMAC_CNT_CTRL(mac->id));
@@ -72,7 +71,7 @@
mcr = mtk_r32(mac->hw, MTK_XMAC_MCR(mac->id));
mcr &= ~(XMAC_MCR_FORCE_TX_FC | XMAC_MCR_FORCE_RX_FC | XMAC_MCR_TRX_DISABLE);
-@@ -973,6 +989,7 @@ static void mtk_mac_link_up(struct phylink_config *config,
+@@ -961,6 +976,7 @@ 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_config = mtk_mac_config,
@@ -81,7 +80,7 @@
.mac_link_down = mtk_mac_link_down,
.mac_link_up = mtk_mac_link_up,
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-index 82e758e8c..bd4a62e5c 100644
+index 82e758e..bd4a62e 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -467,7 +467,8 @@