summaryrefslogtreecommitdiffstats
path: root/net/dsa/slave.c
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2014-09-25 02:05:17 +0200
committerDavid S. Miller <davem@davemloft.net>2014-09-28 23:14:08 +0200
commitf7f1de51edbdd53b09061d12758cacd9901c363e (patch)
tree107345030b408eaed2aa9882142769eb471532ee /net/dsa/slave.c
parenttcp: use tcp_flags in tcp_data_queue() (diff)
downloadlinux-f7f1de51edbdd53b09061d12758cacd9901c363e.tar.xz
linux-f7f1de51edbdd53b09061d12758cacd9901c363e.zip
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/slave.c')
-rw-r--r--net/dsa/slave.c6
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)
goto clear_allmulti;
}
+ if (p->phy)
+ phy_start(p->phy);
+
return 0;
clear_allmulti:
@@ -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)