diff options
Diffstat (limited to 'target/linux/generic/backport-6.1/790-41-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch')
-rw-r--r-- | target/linux/generic/backport-6.1/790-41-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/target/linux/generic/backport-6.1/790-41-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch b/target/linux/generic/backport-6.1/790-41-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch index 60b369c8f8..eb0a5706ec 100644 --- a/target/linux/generic/backport-6.1/790-41-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch +++ b/target/linux/generic/backport-6.1/790-41-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch @@ -57,8 +57,8 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -995,18 +995,10 @@ mt753x_trap_frames(struct mt7530_priv *p - MT753X_BPDU_CPU_ONLY); +@@ -1170,18 +1170,10 @@ mt753x_trap_frames(struct mt7530_priv *p + MT753X_BPDU_CPU_ONLY); } -static int @@ -77,7 +77,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> /* Enable Mediatek header mode on the cpu port */ mt7530_write(priv, MT7530_PVC_P(port), -@@ -1032,8 +1024,6 @@ mt753x_cpu_port_enable(struct dsa_switch +@@ -1207,8 +1199,6 @@ mt753x_cpu_port_enable(struct dsa_switch /* Set to fallback mode for independent VLAN learning */ mt7530_rmw(priv, MT7530_PCR_P(port), PCR_PORT_VLAN_MASK, MT7530_PORT_FALLBACK_MODE); @@ -86,16 +86,16 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> } static int -@@ -2288,8 +2278,6 @@ mt7530_setup(struct dsa_switch *ds) +@@ -2461,8 +2451,6 @@ mt7530_setup(struct dsa_switch *ds) val |= MHWTRAP_MANUAL; mt7530_write(priv, MT7530_MHWTRAP, val); - priv->p6_interface = PHY_INTERFACE_MODE_NA; - - mt753x_trap_frames(priv); + if ((val & HWTRAP_XTAL_MASK) == HWTRAP_XTAL_40MHZ) + mt7530_pll_setup(priv); - /* Enable and reset MIB counters */ -@@ -2304,9 +2292,7 @@ mt7530_setup(struct dsa_switch *ds) +@@ -2480,9 +2468,7 @@ mt7530_setup(struct dsa_switch *ds) mt7530_set(priv, MT7530_PSC_P(i), SA_DIS); if (dsa_is_cpu_port(ds, i)) { @@ -106,7 +106,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> } else { mt7530_port_disable(ds, i); -@@ -2410,9 +2396,7 @@ mt7531_setup_common(struct dsa_switch *d +@@ -2589,9 +2575,7 @@ mt7531_setup_common(struct dsa_switch *d mt7530_set(priv, MT7531_DBG_CNT(i), MT7531_DIS_CLR); if (dsa_is_cpu_port(ds, i)) { @@ -117,7 +117,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> } else { mt7530_port_disable(ds, i); -@@ -2501,10 +2485,6 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2683,10 +2667,6 @@ mt7531_setup(struct dsa_switch *ds) mt7530_rmw(priv, MT7531_GPIO_MODE0, MT7531_GPIO0_MASK, MT7531_GPIO0_INTERRUPT); @@ -125,10 +125,10 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> - priv->p5_interface = PHY_INTERFACE_MODE_NA; - priv->p6_interface = PHY_INTERFACE_MODE_NA; - - /* Enable PHY core PLL, since phy_device has not yet been created - * provided for phy_[read,write]_mmd_indirect is called, we provide - * our own mt7531_ind_mmd_phy_[read,write] to complete this -@@ -2716,26 +2696,9 @@ mt753x_phylink_mac_config(struct dsa_swi + /* Enable Energy-Efficient Ethernet (EEE) and PHY core PLL, since + * phy_device has not yet been created provided for + * phy_[read,write]_mmd_indirect is called, we provide our own +@@ -2905,26 +2885,9 @@ mt753x_phylink_mac_config(struct dsa_swi struct mt7530_priv *priv = ds->priv; u32 mcr_cur, mcr_new; @@ -156,7 +156,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port)); mcr_new = mcr_cur; mcr_new &= ~PMCR_LINK_SETTINGS_MASK; -@@ -2771,17 +2734,10 @@ static void mt753x_phylink_mac_link_up(s +@@ -2960,17 +2923,10 @@ static void mt753x_phylink_mac_link_up(s mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK; @@ -176,7 +176,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> mcr |= PMCR_FORCE_SPEED_1000; break; case SPEED_100: -@@ -2799,6 +2755,7 @@ static void mt753x_phylink_mac_link_up(s +@@ -2988,6 +2944,7 @@ static void mt753x_phylink_mac_link_up(s if (mode == MLO_AN_PHY && phydev && phy_init_eee(phydev, false) >= 0) { switch (speed) { case SPEED_1000: @@ -184,7 +184,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> mcr |= PMCR_FORCE_EEE1G; break; case SPEED_100: -@@ -2810,61 +2767,6 @@ static void mt753x_phylink_mac_link_up(s +@@ -2999,61 +2956,6 @@ static void mt753x_phylink_mac_link_up(s mt7530_set(priv, MT7530_PMCR_P(port), mcr); } @@ -246,7 +246,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port, struct phylink_config *config) { -@@ -3122,7 +3024,6 @@ const struct mt753x_info mt753x_table[] +@@ -3312,7 +3214,6 @@ const struct mt753x_info mt753x_table[] .sw_setup = mt7531_setup, .phy_read = mt7531_ind_phy_read, .phy_write = mt7531_ind_phy_write, @@ -254,7 +254,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> .mac_port_get_caps = mt7531_mac_port_get_caps, .mac_port_config = mt7531_mac_config, }, -@@ -3132,7 +3033,6 @@ const struct mt753x_info mt753x_table[] +@@ -3322,7 +3223,6 @@ const struct mt753x_info mt753x_table[] .sw_setup = mt7988_setup, .phy_read = mt7531_ind_phy_read, .phy_write = mt7531_ind_phy_write, @@ -264,7 +264,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> }; --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -331,13 +331,6 @@ enum mt7530_vlan_port_acc_frm { +@@ -340,13 +340,6 @@ enum mt7530_vlan_port_acc_frm { PMCR_TX_FC_EN | PMCR_RX_FC_EN | \ PMCR_FORCE_FDX | PMCR_FORCE_LNK | \ PMCR_FORCE_EEE1G | PMCR_FORCE_EEE100) @@ -278,7 +278,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> #define MT7530_PMEEECR_P(x) (0x3004 + (x) * 0x100) #define WAKEUP_TIME_1000(x) (((x) & 0xFF) << 24) -@@ -737,7 +730,6 @@ struct mt753x_info { +@@ -747,7 +740,6 @@ struct mt753x_info { int (*sw_setup)(struct dsa_switch *ds); int (*phy_read)(struct mt7530_priv *priv, int port, int regnum); int (*phy_write)(struct mt7530_priv *priv, int port, int regnum, u16 val); @@ -286,7 +286,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> void (*mac_port_get_caps)(struct dsa_switch *ds, int port, struct phylink_config *config); void (*mac_port_validate)(struct dsa_switch *ds, int port, -@@ -763,7 +755,6 @@ struct mt753x_info { +@@ -773,7 +765,6 @@ struct mt753x_info { * @ports: Holding the state among ports * @reg_mutex: The lock for protecting among process accessing * registers @@ -294,7 +294,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> * @p5_intf_sel: Holding the current port 5 interface select * @p5_sgmii: Flag for distinguishing if port 5 of the MT7531 switch * has got SGMII -@@ -785,8 +776,6 @@ struct mt7530_priv { +@@ -795,8 +786,6 @@ struct mt7530_priv { const struct mt753x_info *info; unsigned int id; bool mcm; |