Commit 5cb4a593 authored by David S. Miller's avatar David S. Miller

Merge branch 'stmmac-fixes'

Joakim Zhang says:

====================
net: fixes for stmmac

Two clock fixes for stmmac driver.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 13a6f315 4691ffb1
...@@ -5891,12 +5891,21 @@ static int stmmac_set_mac_address(struct net_device *ndev, void *addr) ...@@ -5891,12 +5891,21 @@ static int stmmac_set_mac_address(struct net_device *ndev, void *addr)
struct stmmac_priv *priv = netdev_priv(ndev); struct stmmac_priv *priv = netdev_priv(ndev);
int ret = 0; int ret = 0;
ret = pm_runtime_get_sync(priv->device);
if (ret < 0) {
pm_runtime_put_noidle(priv->device);
return ret;
}
ret = eth_mac_addr(ndev, addr); ret = eth_mac_addr(ndev, addr);
if (ret) if (ret)
return ret; goto set_mac_error;
stmmac_set_umac_addr(priv, priv->hw, ndev->dev_addr, 0); stmmac_set_umac_addr(priv, priv->hw, ndev->dev_addr, 0);
set_mac_error:
pm_runtime_put(priv->device);
return ret; return ret;
} }
...@@ -6191,12 +6200,6 @@ static int stmmac_vlan_rx_add_vid(struct net_device *ndev, __be16 proto, u16 vid ...@@ -6191,12 +6200,6 @@ static int stmmac_vlan_rx_add_vid(struct net_device *ndev, __be16 proto, u16 vid
bool is_double = false; bool is_double = false;
int ret; int ret;
ret = pm_runtime_get_sync(priv->device);
if (ret < 0) {
pm_runtime_put_noidle(priv->device);
return ret;
}
if (be16_to_cpu(proto) == ETH_P_8021AD) if (be16_to_cpu(proto) == ETH_P_8021AD)
is_double = true; is_double = true;
...@@ -6222,6 +6225,12 @@ static int stmmac_vlan_rx_kill_vid(struct net_device *ndev, __be16 proto, u16 vi ...@@ -6222,6 +6225,12 @@ static int stmmac_vlan_rx_kill_vid(struct net_device *ndev, __be16 proto, u16 vi
bool is_double = false; bool is_double = false;
int ret; int ret;
ret = pm_runtime_get_sync(priv->device);
if (ret < 0) {
pm_runtime_put_noidle(priv->device);
return ret;
}
if (be16_to_cpu(proto) == ETH_P_8021AD) if (be16_to_cpu(proto) == ETH_P_8021AD)
is_double = true; is_double = true;
......
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