Skip to content

Commit 9e69969

Browse files
committed
Revert "net: mediatek: fix r64 (but maybe break others again)"
breaks mt7988: [ 1.796456] mtk_soc_eth 15100000.ethernet (unnamed net_device) (uninitialized): either phylink_pcs_add() or .mac_select_pcs must be used [ 1.814760] mtk_soc_eth 15100000.ethernet (unnamed net_device) (uninitialized): either phylink_pcs_add() or .mac_select_pcs must be used [ 1.831164] mtk_soc_eth 15100000.ethernet (unnamed net_device) (uninitialized): failed to validate link configuration for in-band status [ 1.917954] mtk_soc_eth 15100000.ethernet: probe with driver mtk_soc_eth failed with error -22 This reverts commit 7e126d4.
1 parent 27ae382 commit 9e69969

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

drivers/net/ethernet/mediatek/mtk_eth_soc.c

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -564,25 +564,6 @@ static bool mtk_check_gmac23_idle(struct mtk_mac *mac)
564564
return false;
565565
}
566566

567-
static struct phylink_pcs *mtk_mac_select_pcs(struct phylink_config *config,
568-
phy_interface_t interface)
569-
{
570-
struct mtk_mac *mac = container_of(config, struct mtk_mac,
571-
phylink_config);
572-
struct mtk_eth *eth = mac->hw;
573-
unsigned int sid;
574-
575-
if (interface == PHY_INTERFACE_MODE_SGMII ||
576-
phy_interface_mode_is_8023z(interface)) {
577-
sid = (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_SGMII)) ?
578-
0 : mac->id;
579-
580-
return eth->sgmii_pcs[sid];
581-
}
582-
583-
return NULL;
584-
}
585-
586567
static int mtk_mac_prepare(struct phylink_config *config, unsigned int mode,
587568
phy_interface_t iface)
588569
{
@@ -1077,7 +1058,6 @@ static int mtk_mac_enable_tx_lpi(struct phylink_config *config, u32 timer,
10771058

10781059
static const struct phylink_mac_ops mtk_phylink_ops = {
10791060
.mac_prepare = mtk_mac_prepare,
1080-
.mac_select_pcs = mtk_mac_select_pcs,
10811061
.mac_config = mtk_mac_config,
10821062
.mac_finish = mtk_mac_finish,
10831063
.mac_link_down = mtk_mac_link_down,
@@ -5762,11 +5742,11 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
57625742
mac->phylink_config.available_pcs = mac->available_pcs;
57635743
mac->phylink_config.num_available_pcs = count;
57645744
} else {
5765-
/*sid = (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_SGMII)) ?
5745+
sid = (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_SGMII)) ?
57665746
0 : id;
57675747

57685748
mac->phylink_config.available_pcs = &eth->sgmii_pcs[sid];
5769-
mac->phylink_config.num_available_pcs = 1;*/
5749+
mac->phylink_config.num_available_pcs = 1;
57705750
}
57715751

57725752
phy_interface_or(mac->phylink_config.supported_interfaces,

0 commit comments

Comments
 (0)