]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: smsc: Re-enable EDPD mode for LAN87xx
authorPatrick Trantham <patrick.trantham@fuel7.com>
Thu, 15 Nov 2012 09:00:57 +0000 (09:00 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Nov 2012 22:48:50 +0000 (17:48 -0500)
commit1dab61124363faabef7810535b414894e6cf0fb9
tree6472e1dbeaca62e74929aa613afe98527b1086e5
parent37f500ba8d47b886fa12a6d12c9ea39dc87b4146
net: phy: smsc: Re-enable EDPD mode for LAN87xx

This patch re-enables Energy Detect Power Down (EDPD) mode for the
LAN8710/LAN8720.  EDPD mode was disabled in a previous commit,
(97d46559a6f2fa4e3b526c0013b85fe141f87385), because it was causing the
PHY to not be able to detect a link when cold started without a cable
connected.

The LAN8710/LAN8720 requires a minimum of 2 link pulses within 64ms of
each other in order to set the ENERGYON bit and exit EDPD mode.  If a
link partner does send the pulses within this interval, the PHY will
remained powered down.

This workaround will manually toggle the PHY on/off upon calls to
read_status in order to generate link test pulses if the link is down.
If a link partner is present, it will respond to the pulses, which will
cause the ENERGYON bit to be set and will cause the EDPD mode to be
exited.

Signed-off-by: Patrick Trantham <patrick.trantham@fuel7.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/smsc.c