From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, pgynther@google.com, jaedon.shin@gmail.com,
Florian Fainelli <f.fainelli@gmail.com>
Subject: [PATCH net-next 3/6] net: bcmgenet: Power on integrated GPHY in bcmgenet_power_up()
Date: Thu, 16 Jul 2015 15:51:16 -0700 [thread overview]
Message-ID: <1437087079-21678-4-git-send-email-f.fainelli@gmail.com> (raw)
In-Reply-To: <1437087079-21678-1-git-send-email-f.fainelli@gmail.com>
We are currently disabling the GPHY interface during bcmgenet_close(),
and attempting to power it back on during bcmgenet_open(). This works
fine for the first time, because we called bcmgenet_mii_config() which
took care of enabling the interface, however, bcmgenet_power_up() really
needs to power on the GPHY for correctness.
This will be particularly important as we want to move
bcmgenet_mii_probe() down to bcmgenet_open() to avoid seeing the "PHY
already attached" message.
Fixes: a642c4f7906f36 ("net: bcmgenet: power up and down integrated GPHY when unused")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index c634ddbbd21d..2efe72f94869 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -907,6 +907,8 @@ static void bcmgenet_power_up(struct bcmgenet_priv *priv,
}
bcmgenet_ext_writel(priv, reg, EXT_EXT_PWR_MGMT);
+ if (mode == GENET_POWER_PASSIVE)
+ bcmgenet_phy_power_set(priv->dev, true);
}
/* ioctl handle special commands that are not present in ethtool. */
--
2.1.0
next prev parent reply other threads:[~2015-07-16 22:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-16 22:51 [PATCH net-next 0/6] net: bcmgenet: PHY initialization rework Florian Fainelli
2015-07-16 22:51 ` [PATCH net-next 1/6] net: bcmgenet: Remove excessive PHY reset Florian Fainelli
2015-07-16 22:51 ` [PATCH net-next 2/6] net: bcmgenet: Use correct dev_id for free_irq Florian Fainelli
2015-07-16 22:51 ` Florian Fainelli [this message]
2015-07-16 22:51 ` [PATCH net-next 4/6] net: bcmgenet: Determine PHY type before scanning MDIO bus Florian Fainelli
2015-07-16 22:51 ` [PATCH net-next 5/6] net: bcmgenet: Delay PHY initialization to bcmgenet_open() Florian Fainelli
2015-07-16 22:51 ` [PATCH net-next 6/6] net: bcmgenet: Remove init parameter from bcmgenet_mii_config Florian Fainelli
2015-07-17 13:53 ` [PATCH net-next 0/6] net: bcmgenet: PHY initialization rework Jaedon Shin
2015-07-20 20:00 ` Florian Fainelli
2015-07-21 3:48 ` 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=1437087079-21678-4-git-send-email-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=davem@davemloft.net \
--cc=jaedon.shin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pgynther@google.com \
/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).