diff options
| -rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 1853f7ff6657..1763e48c84e2 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |||
| @@ -4120,8 +4120,15 @@ int stmmac_dvr_probe(struct device *device, | |||
| 4120 | if ((phyaddr >= 0) && (phyaddr <= 31)) | 4120 | if ((phyaddr >= 0) && (phyaddr <= 31)) |
| 4121 | priv->plat->phy_addr = phyaddr; | 4121 | priv->plat->phy_addr = phyaddr; |
| 4122 | 4122 | ||
| 4123 | if (priv->plat->stmmac_rst) | 4123 | if (priv->plat->stmmac_rst) { |
| 4124 | ret = reset_control_assert(priv->plat->stmmac_rst); | ||
| 4124 | reset_control_deassert(priv->plat->stmmac_rst); | 4125 | reset_control_deassert(priv->plat->stmmac_rst); |
| 4126 | /* Some reset controllers have only reset callback instead of | ||
| 4127 | * assert + deassert callbacks pair. | ||
| 4128 | */ | ||
| 4129 | if (ret == -ENOTSUPP) | ||
| 4130 | reset_control_reset(priv->plat->stmmac_rst); | ||
| 4131 | } | ||
| 4125 | 4132 | ||
| 4126 | /* Init MAC and get the capabilities */ | 4133 | /* Init MAC and get the capabilities */ |
| 4127 | ret = stmmac_hw_init(priv); | 4134 | ret = stmmac_hw_init(priv); |
