Merge tag 'qcom-arm64-defconfig-fixes-for-4.13-rc2' of git://git.kernel.org/pub/scm...
[sfrench/cifs-2.6.git] / drivers / net / ethernet / stmicro / stmmac / stmmac_main.c
index 1853f7ff6657562cc95e78bdf7954aa8203a7ccd..1763e48c84e2090678f4ffc1b55cf1d7a62382e4 100644 (file)
@@ -4120,8 +4120,15 @@ int stmmac_dvr_probe(struct device *device,
        if ((phyaddr >= 0) && (phyaddr <= 31))
                priv->plat->phy_addr = phyaddr;
 
-       if (priv->plat->stmmac_rst)
+       if (priv->plat->stmmac_rst) {
+               ret = reset_control_assert(priv->plat->stmmac_rst);
                reset_control_deassert(priv->plat->stmmac_rst);
+               /* Some reset controllers have only reset callback instead of
+                * assert + deassert callbacks pair.
+                */
+               if (ret == -ENOTSUPP)
+                       reset_control_reset(priv->plat->stmmac_rst);
+       }
 
        /* Init MAC and get the capabilities */
        ret = stmmac_hw_init(priv);