diff options
author | INAGAKI Hiroshi <musashino.open@gmail.com> | 2022-04-10 16:45:57 +0900 |
---|---|---|
committer | Sander Vanheule <sander@svanheule.net> | 2022-10-08 11:05:02 +0200 |
commit | b11b56e8a840471ed0cca97f43f30316468acc35 (patch) | |
tree | 3dd2a482853b4ace1cc7de3dfe8addc6e662895b /target/linux | |
parent | ff307f52f54e643ff72b50012a012f3e4ab2f0bc (diff) | |
download | upstream-b11b56e8a840471ed0cca97f43f30316468acc35.tar.gz upstream-b11b56e8a840471ed0cca97f43f30316468acc35.tar.bz2 upstream-b11b56e8a840471ed0cca97f43f30316468acc35.zip |
realtek: swap *_phylink_mac_link_down() contents
Fix the (accidentally?) swapped contents of
rtl83xx_phylink_mac_link_down() and rtl93xx_phylink_mac_link_down().
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[amend commit message]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/dsa.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/dsa.c index f08ede730b..3ff1a96ed6 100644 --- a/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/dsa.c +++ b/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/dsa.c @@ -864,17 +864,12 @@ static void rtl83xx_phylink_mac_link_down(struct dsa_switch *ds, int port, phy_interface_t interface) { struct rtl838x_switch_priv *priv = ds->priv; - u32 v; /* Stop TX/RX to port */ sw_w32_mask(0x3, 0, priv->r->mac_port_ctrl(port)); // No longer force link - if (priv->family_id == RTL9300_FAMILY_ID) - v = RTL930X_FORCE_EN | RTL930X_FORCE_LINK_EN; - else if (priv->family_id == RTL9310_FAMILY_ID) - v = RTL931X_FORCE_EN | RTL931X_FORCE_LINK_EN; - sw_w32_mask(v, 0, priv->r->mac_port_ctrl(port)); + sw_w32_mask(0x3, 0, priv->r->mac_force_mode_ctrl(port)); } static void rtl93xx_phylink_mac_link_down(struct dsa_switch *ds, int port, @@ -882,11 +877,17 @@ static void rtl93xx_phylink_mac_link_down(struct dsa_switch *ds, int port, phy_interface_t interface) { struct rtl838x_switch_priv *priv = ds->priv; + u32 v = 0; + /* Stop TX/RX to port */ sw_w32_mask(0x3, 0, priv->r->mac_port_ctrl(port)); // No longer force link - sw_w32_mask(3, 0, priv->r->mac_force_mode_ctrl(port)); + if (priv->family_id == RTL9300_FAMILY_ID) + v = RTL930X_FORCE_EN | RTL930X_FORCE_LINK_EN; + else if (priv->family_id == RTL9310_FAMILY_ID) + v = RTL931X_FORCE_EN | RTL931X_FORCE_LINK_EN; + sw_w32_mask(v, 0, priv->r->mac_force_mode_ctrl(port)); } static void rtl83xx_phylink_mac_link_up(struct dsa_switch *ds, int port, |