提交 f7f1de51 编写于 作者: F Florian Fainelli 提交者: David S. Miller

net: dsa: start and stop the PHY state machine

dsa_slave_open() should start the PHY library state machine for its PHY
interface, and dsa_slave_close() should stop the PHY library state
machine accordingly.
Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 155c6e1a
...@@ -84,6 +84,9 @@ static int dsa_slave_open(struct net_device *dev) ...@@ -84,6 +84,9 @@ static int dsa_slave_open(struct net_device *dev)
goto clear_allmulti; goto clear_allmulti;
} }
if (p->phy)
phy_start(p->phy);
return 0; return 0;
clear_allmulti: clear_allmulti:
...@@ -101,6 +104,9 @@ static int dsa_slave_close(struct net_device *dev) ...@@ -101,6 +104,9 @@ static int dsa_slave_close(struct net_device *dev)
struct dsa_slave_priv *p = netdev_priv(dev); struct dsa_slave_priv *p = netdev_priv(dev);
struct net_device *master = p->parent->dst->master_netdev; struct net_device *master = p->parent->dst->master_netdev;
if (p->phy)
phy_stop(p->phy);
dev_mc_unsync(master, dev); dev_mc_unsync(master, dev);
dev_uc_unsync(master, dev); dev_uc_unsync(master, dev);
if (dev->flags & IFF_ALLMULTI) if (dev->flags & IFF_ALLMULTI)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册