kernel: bump 5.4 to 5.4.124
[openwrt/staging/wigyori.git] / target / linux / generic / pending-5.4 / 761-net-dsa-mt7530-Support-EEE-features.patch
index 1822647ff17b6cd6ad16b59293f20e3acc7baad2..e8f35b6e1f6b6f1169ccb1a409751a52be95d61f 100644 (file)
@@ -9,7 +9,7 @@ Content-Transfer-Encoding: 8bit
 Signed-off-by: René van Dorst <opensource@vdorst.com>
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1419,9 +1419,13 @@ static void mt7530_phylink_mac_config(st
+@@ -1409,9 +1409,13 @@ static void mt7530_phylink_mac_config(st
        switch (state->speed) {
        case SPEED_1000:
                mcr_new |= PMCR_FORCE_SPEED_1000;
@@ -23,7 +23,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
                break;
        }
        if (state->duplex == DUPLEX_FULL) {
-@@ -1557,6 +1561,54 @@ mt7530_phylink_mac_link_state(struct dsa
+@@ -1547,6 +1551,54 @@ mt7530_phylink_mac_link_state(struct dsa
        return 1;
  }
  
@@ -66,7 +66,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
 +              eeecr &= 0xFFFF0000;
 +              if (!e->tx_lpi_enabled)
 +                      eeecr |= LPI_MODE_EN;
-+              eeecr = LPI_THRESH(e->tx_lpi_timer);
++              eeecr |= LPI_THRESH(e->tx_lpi_timer);
 +              mt7530_write(priv, MT7530_PMEEECR_P(port), eeecr);
 +      } else {
 +              priv->eee_enable &= ~(BIT(port));
@@ -78,7 +78,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
  static const struct dsa_switch_ops mt7530_switch_ops = {
        .get_tag_protocol       = mtk_get_tag_protocol,
        .setup                  = mt7530_setup,
-@@ -1584,6 +1636,8 @@ static const struct dsa_switch_ops mt753
+@@ -1574,6 +1626,8 @@ static const struct dsa_switch_ops mt753
        .phylink_mac_config     = mt7530_phylink_mac_config,
        .phylink_mac_link_down  = mt7530_phylink_mac_link_down,
        .phylink_mac_link_up    = mt7530_phylink_mac_link_up,