aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/networking
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2013-01-13 19:52:52 -0500
committerDavid S. Miller <davem@davemloft.net>2013-01-14 15:11:50 -0500
commitf9a8f83b04e0c362a2fc660dbad980d24af209fc (patch)
tree055b2c8f2d32f3cfd0dc84fd3f8d971a34aeed85 /Documentation/networking
parentc1b52739e45f5969b208ebc377f52468280af11e (diff)
net: phy: remove flags argument from phy_{attach, connect, connect_direct}
The flags argument of the phy_{attach,connect,connect_direct} functions is then used to assign a struct phy_device dev_flags with its value. All callers but the tg3 driver pass the flag 0, which results in the underlying PHY drivers in drivers/net/phy/ not being able to actually use any of the flags they would set in dev_flags. This patch gets rid of the flags argument, and passes phydev->dev_flags to the internal PHY library call phy_attach_direct() such that drivers which actually modify a phy device dev_flags get the value preserved for use by the underlying phy driver. Acked-by: Kosta Zertsekel <konszert@marvell.com> Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/networking')
-rw-r--r--Documentation/networking/phy.txt11
1 files changed, 6 insertions, 5 deletions
diff --git a/Documentation/networking/phy.txt b/Documentation/networking/phy.txt
index 95e5f5985a2a..d5b1a3935245 100644
--- a/Documentation/networking/phy.txt
+++ b/Documentation/networking/phy.txt
@@ -103,7 +103,7 @@ Letting the PHY Abstraction Layer do Everything
103 103
104 Now, to connect, just call this function: 104 Now, to connect, just call this function:
105 105
106 phydev = phy_connect(dev, phy_name, &adjust_link, flags, interface); 106 phydev = phy_connect(dev, phy_name, &adjust_link, interface);
107 107
108 phydev is a pointer to the phy_device structure which represents the PHY. If 108 phydev is a pointer to the phy_device structure which represents the PHY. If
109 phy_connect is successful, it will return the pointer. dev, here, is the 109 phy_connect is successful, it will return the pointer. dev, here, is the
@@ -113,7 +113,9 @@ Letting the PHY Abstraction Layer do Everything
113 current state, though the PHY will not yet be truly operational at this 113 current state, though the PHY will not yet be truly operational at this
114 point. 114 point.
115 115
116 flags is a u32 which can optionally contain phy-specific flags. 116 PHY-specific flags should be set in phydev->dev_flags prior to the call
117 to phy_connect() such that the underlying PHY driver can check for flags
118 and perform specific operations based on them.
117 This is useful if the system has put hardware restrictions on 119 This is useful if the system has put hardware restrictions on
118 the PHY/controller, of which the PHY needs to be aware. 120 the PHY/controller, of which the PHY needs to be aware.
119 121
@@ -185,11 +187,10 @@ Doing it all yourself
185 start, or disables then frees them for stop. 187 start, or disables then frees them for stop.
186 188
187 struct phy_device * phy_attach(struct net_device *dev, const char *phy_id, 189 struct phy_device * phy_attach(struct net_device *dev, const char *phy_id,
188 u32 flags, phy_interface_t interface); 190 phy_interface_t interface);
189 191
190 Attaches a network device to a particular PHY, binding the PHY to a generic 192 Attaches a network device to a particular PHY, binding the PHY to a generic
191 driver if none was found during bus initialization. Passes in 193 driver if none was found during bus initialization.
192 any phy-specific flags as needed.
193 194
194 int phy_start_aneg(struct phy_device *phydev); 195 int phy_start_aneg(struct phy_device *phydev);
195 196