@@ -3000,7 +3000,7 @@ static int __maybe_unused ravb_suspend(struct device *dev)
int ret;
if (!netif_running(ndev))
- return 0;
+ goto reset_assert;
netif_device_detach(ndev);
@@ -3012,7 +3012,11 @@ static int __maybe_unused ravb_suspend(struct device *dev)
if (priv->info->ccc_gac)
ravb_ptp_stop(ndev);
- return ret;
+ if (priv->wol_enabled)
+ return ret;
+
+reset_assert:
+ return reset_control_assert(priv->rstc);
}
static int __maybe_unused ravb_resume(struct device *dev)
@@ -3020,7 +3024,11 @@ static int __maybe_unused ravb_resume(struct device *dev)
struct net_device *ndev = dev_get_drvdata(dev);
struct ravb_private *priv = netdev_priv(ndev);
const struct ravb_hw_info *info = priv->info;
- int ret = 0;
+ int ret;
+
+ ret = reset_control_deassert(priv->rstc);
+ if (ret)
+ return ret;
/* If WoL is enabled set reset mode to rearm the WoL logic */
if (priv->wol_enabled) {