diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2014-09-24 20:05:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-28 17:14:08 -0400 |
commit | f7f1de51edbdd53b09061d12758cacd9901c363e (patch) | |
tree | 107345030b408eaed2aa9882142769eb471532ee /net/dsa | |
parent | 155c6e1ad4a778cad7f9fe6695afc91b3f5fe1ac (diff) |
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: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r-- | net/dsa/slave.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 43c1e4ade689..4392e983abda 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c | |||
@@ -84,6 +84,9 @@ static int dsa_slave_open(struct net_device *dev) | |||
84 | goto clear_allmulti; | 84 | goto clear_allmulti; |
85 | } | 85 | } |
86 | 86 | ||
87 | if (p->phy) | ||
88 | phy_start(p->phy); | ||
89 | |||
87 | return 0; | 90 | return 0; |
88 | 91 | ||
89 | clear_allmulti: | 92 | clear_allmulti: |
@@ -101,6 +104,9 @@ static int dsa_slave_close(struct net_device *dev) | |||
101 | struct dsa_slave_priv *p = netdev_priv(dev); | 104 | struct dsa_slave_priv *p = netdev_priv(dev); |
102 | struct net_device *master = p->parent->dst->master_netdev; | 105 | struct net_device *master = p->parent->dst->master_netdev; |
103 | 106 | ||
107 | if (p->phy) | ||
108 | phy_stop(p->phy); | ||
109 | |||
104 | dev_mc_unsync(master, dev); | 110 | dev_mc_unsync(master, dev); |
105 | dev_uc_unsync(master, dev); | 111 | dev_uc_unsync(master, dev); |
106 | if (dev->flags & IFF_ALLMULTI) | 112 | if (dev->flags & IFF_ALLMULTI) |