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 v2 1/8] of: mdio: honor flags passed to of_phy_connect
Date: Fri, 19 Sep 2014 13:07:49 -0700 [thread overview]
Message-ID: <1411157276-18260-2-git-send-email-f.fainelli@gmail.com> (raw)
In-Reply-To: <1411157276-18260-1-git-send-email-f.fainelli@gmail.com>
Commit f9a8f83b04e0 ("net: phy: remove flags argument from phy_{attach,
connect, connect_direct}") removed the flags argument to the PHY library
calls to: phy_{attach,connect,connect_direct}.
Most Device Tree aware drivers call of_phy_connect() with the flag
argument set to 0, but some of them might want to set a different value
there in order for the PHY driver to key a specific behavior based on
the phy_device::phy_flags value.
Allow such drivers to set custom phy_flags as part of the
of_phy_connect() call since of_phy_connect() does start the PHY state
machine, it will call into the PHY driver config_init() callback which
is usually where a specific phy_flags value is important.
Fixes: f9a8f83b04e0 ("net: phy: remove flags argument from phy_{attach, connect, connect_direct}")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/of/of_mdio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 401b2453da45..a85d80012993 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -224,6 +224,8 @@ struct phy_device *of_phy_connect(struct net_device *dev,
if (!phy)
return NULL;
+ phy->dev_flags = flags;
+
return phy_connect_direct(dev, phy, hndlr, iface) ? NULL : phy;
}
EXPORT_SYMBOL(of_phy_connect);
--
1.9.1
next prev parent reply other threads:[~2014-09-19 20:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-19 20:07 [PATCH net-next v2 0/8] net: phy: Broadcom BCM7xxx PHY workaround update Florian Fainelli
2014-09-19 20:07 ` Florian Fainelli [this message]
2014-09-19 20:07 ` [PATCH net-next v2 2/8] net: phy: broadcom: add helper for PHY revision and patch level Florian Fainelli
2014-09-19 20:07 ` [PATCH net-next v2 3/8] net: phy: bcm7xxx: do not use PHY_BRCM_100MBPS_WAR Florian Fainelli
2014-09-19 20:07 ` [PATCH net-next v2 4/8] net: bcmgenet: remove PHY_BRCM_100MBPS_WAR Florian Fainelli
2014-09-19 20:07 ` [PATCH net-next v2 5/8] net: bcmgenet: communicate integrated PHY revision to PHY driver Florian Fainelli
2014-09-19 20:07 ` [PATCH net-next v2 6/8] net: dsa: allow switch drivers to specify phy_device::dev_flags Florian Fainelli
2014-09-19 20:07 ` [PATCH net-next v2 7/8] net: dsa: bcm_sf2: communicate integrated PHY revision to PHY driver Florian Fainelli
2014-09-19 20:07 ` [PATCH net-next v2 8/8] net: phy: bcm7xxx: utilize PHY revision in config_init Florian Fainelli
2014-09-19 20:27 ` [PATCH net-next v2 0/8] net: phy: Broadcom BCM7xxx PHY workaround update 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=1411157276-18260-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).