summaryrefslogtreecommitdiffstats
path: root/Documentation/networking/phy.txt
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2013-12-06 13:01:34 -0800
committerDavid S. Miller <davem@davemloft.net>2013-12-09 20:38:59 -0500
commit87aa9f9c61ad56d505641681812e92ad976f8608 (patch)
treef793d2ac5ed9680242a75fc363f1bee972f82f24 /Documentation/networking/phy.txt
parent06d87cec73d883690f690e72da498e7f0334f9bc (diff)
downloadlinux-87aa9f9c61ad56d505641681812e92ad976f8608.tar.gz
linux-87aa9f9c61ad56d505641681812e92ad976f8608.tar.bz2
linux-87aa9f9c61ad56d505641681812e92ad976f8608.zip
net: phy: consolidate PHY reset in phy_init_hw()
There are quite a lot of drivers touching a PHY device MII_BMCR register to reset the PHY without taking care of: 1) ensuring that BMCR_RESET is cleared after a given timeout 2) the PHY state machine resuming to the proper state and re-applying potentially changed settings such as auto-negotiation Introduce phy_poll_reset() which will take care of polling the MII_BMCR for the BMCR_RESET bit to be cleared after a given timeout or return a timeout error code. In order to make sure the PHY is in a correct state, phy_init_hw() first issues a software reset through MII_BMCR and then applies any fixups. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/networking/phy.txt')
-rw-r--r--Documentation/networking/phy.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/networking/phy.txt b/Documentation/networking/phy.txt
index d5b1a3935245..ebf270719402 100644
--- a/Documentation/networking/phy.txt
+++ b/Documentation/networking/phy.txt
@@ -255,7 +255,8 @@ Writing a PHY driver
config_init: configures PHY into a sane state after a reset.
For instance, a Davicom PHY requires descrambling disabled.
- probe: Does any setup needed by the driver
+ probe: Allocate phy->priv, optionally refuse to bind.
+ PHY may not have been reset or had fixups run yet.
suspend/resume: power management
config_aneg: Changes the speed/duplex/negotiation settings
read_status: Reads the current speed/duplex/negotiation settings