netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, Florian Fainelli <f.fainelli@gmail.com>
Subject: [PATCH net-next 1/6] net: dsa: start and stop the PHY state machine
Date: Wed, 24 Sep 2014 17:05:17 -0700	[thread overview]
Message-ID: <1411603522-8384-2-git-send-email-f.fainelli@gmail.com> (raw)
In-Reply-To: <1411603522-8384-1-git-send-email-f.fainelli@gmail.com>

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>
---
 net/dsa/slave.c | 6 ++++++
 1 file changed, 6 insertions(+)

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)
-- 
1.9.1

  reply	other threads:[~2014-09-25  0:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-25  0:05 [PATCH net-next 0/6] net: dsa: EEE and other PM features Florian Fainelli
2014-09-25  0:05 ` Florian Fainelli [this message]
2014-09-25  0:05 ` [PATCH net-next 2/6] net: dsa: allow enabling and disable switch ports Florian Fainelli
2014-09-25  0:05 ` [PATCH net-next 3/6] net: dsa: bcm_sf2: disable RGMII interface(s) when link is down Florian Fainelli
2014-09-25  0:05 ` [PATCH net-next 4/6] net: dsa: bcm_sf2: add port_enable/disable callbacks Florian Fainelli
2014-09-25  0:05 ` [PATCH net-next 5/6] net: dsa: allow switches driver to implement get/set EEE Florian Fainelli
2014-09-25  0:05 ` [PATCH net-next 6/6] net: dsa: bcm_sf2: add support for controlling EEE Florian Fainelli
2014-09-28 21:14 ` [PATCH net-next 0/6] net: dsa: EEE and other PM features David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1411603522-8384-2-git-send-email-f.fainelli@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).