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

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
Loading
Loading
Loading
Loading
+16 −7
Original line number Diff line number Diff line
@@ -5891,12 +5891,21 @@ static int stmmac_set_mac_address(struct net_device *ndev, void *addr)
	struct stmmac_priv *priv = netdev_priv(ndev);
	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);
	if (ret)
		return ret;
		goto set_mac_error;

	stmmac_set_umac_addr(priv, priv->hw, ndev->dev_addr, 0);

set_mac_error:
	pm_runtime_put(priv->device);

	return ret;
}

@@ -6191,12 +6200,6 @@ static int stmmac_vlan_rx_add_vid(struct net_device *ndev, __be16 proto, u16 vid
	bool is_double = false;
	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)
		is_double = true;

@@ -6222,6 +6225,12 @@ static int stmmac_vlan_rx_kill_vid(struct net_device *ndev, __be16 proto, u16 vi
	bool is_double = false;
	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)
		is_double = true;