Skip to content

Commit

Permalink
net: dsa: start and stop the PHY state machine
Browse files Browse the repository at this point in the history
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: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Sep 28, 2014
1 parent 155c6e1 commit f7f1de5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions net/dsa/slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ static int dsa_slave_open(struct net_device *dev)
goto clear_allmulti;
}

if (p->phy)
phy_start(p->phy);

return 0;

clear_allmulti:
Expand All @@ -101,6 +104,9 @@ static int dsa_slave_close(struct net_device *dev)
struct dsa_slave_priv *p = netdev_priv(dev);
struct net_device *master = p->parent->dst->master_netdev;

if (p->phy)
phy_stop(p->phy);

dev_mc_unsync(master, dev);
dev_uc_unsync(master, dev);
if (dev->flags & IFF_ALLMULTI)
Expand Down

0 comments on commit f7f1de5

Please sign in to comment.