diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2013-12-06 13:01:34 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-09 20:38:59 -0500 |
commit | 87aa9f9c61ad56d505641681812e92ad976f8608 (patch) | |
tree | f793d2ac5ed9680242a75fc363f1bee972f82f24 /Documentation | |
parent | 06d87cec73d883690f690e72da498e7f0334f9bc (diff) | |
download | linux-87aa9f9c61ad56d505641681812e92ad976f8608.tar.bz2 |
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')
-rw-r--r-- | Documentation/networking/phy.txt | 3 |
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 |