Commit b91e8403 authored by Paolo Abeni's avatar Paolo Abeni

Merge branch 'rswitch-fix-issues-on-specific-conditions'

Yoshihiro Shimoda says:

====================
rswitch: Fix issues on specific conditions

This patch series fix some issues of rswitch driver on specific
condtions.
====================

Link: https://lore.kernel.org/r/20231010124858.183891-1-yoshihiro.shimoda.uh@renesas.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parents 50e49214 053f13f6
...@@ -1254,7 +1254,7 @@ static void rswitch_adjust_link(struct net_device *ndev) ...@@ -1254,7 +1254,7 @@ static void rswitch_adjust_link(struct net_device *ndev)
phy_print_status(phydev); phy_print_status(phydev);
if (phydev->link) if (phydev->link)
phy_power_on(rdev->serdes); phy_power_on(rdev->serdes);
else else if (rdev->serdes->power_count)
phy_power_off(rdev->serdes); phy_power_off(rdev->serdes);
rdev->etha->link = phydev->link; rdev->etha->link = phydev->link;
...@@ -1964,15 +1964,17 @@ static void rswitch_deinit(struct rswitch_private *priv) ...@@ -1964,15 +1964,17 @@ static void rswitch_deinit(struct rswitch_private *priv)
rswitch_gwca_hw_deinit(priv); rswitch_gwca_hw_deinit(priv);
rcar_gen4_ptp_unregister(priv->ptp_priv); rcar_gen4_ptp_unregister(priv->ptp_priv);
for (i = 0; i < RSWITCH_NUM_PORTS; i++) { rswitch_for_each_enabled_port(priv, i) {
struct rswitch_device *rdev = priv->rdev[i]; struct rswitch_device *rdev = priv->rdev[i];
phy_exit(priv->rdev[i]->serdes);
rswitch_ether_port_deinit_one(rdev);
unregister_netdev(rdev->ndev); unregister_netdev(rdev->ndev);
rswitch_device_free(priv, i); rswitch_ether_port_deinit_one(rdev);
phy_exit(priv->rdev[i]->serdes);
} }
for (i = 0; i < RSWITCH_NUM_PORTS; i++)
rswitch_device_free(priv, i);
rswitch_gwca_ts_queue_free(priv); rswitch_gwca_ts_queue_free(priv);
rswitch_gwca_linkfix_free(priv); rswitch_gwca_linkfix_free(priv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment