]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: smsc: Disable Energy Detect Power-Down in interrupt mode
authorLukas Wunner <lukas@wunner.de>
Mon, 20 Jun 2022 11:04:50 +0000 (13:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:30 +0000 (14:24 +0200)
commitad5ce03a9b11afe860ab723097f4ef1087c68b61
treec58ccbd92150855d088bc2b712ff60d7c59cb8f5
parente9042c2ff68819fbb4ed3ca62b175826bb664d6e
net: phy: smsc: Disable Energy Detect Power-Down in interrupt mode

commit 5ecc5134a66a2372d5c5287093bf95ead37ae723 upstream.

Simon reports that if two LAN9514 USB adapters are directly connected
without an intermediate switch, the link fails to come up and link LEDs
remain dark.  The issue was introduced by commit 3e5d3f0549b3 ("usbnet:
smsc95xx: Forward PHY interrupts to PHY driver to avoid polling").

The PHY suffers from a known erratum wherein link detection becomes
unreliable if Energy Detect Power-Down is used.  In poll mode, the
driver works around the erratum by briefly disabling EDPD for 640 msec
to detect a neighbor, then re-enabling it to save power.

In interrupt mode, no interrupt is signaled if EDPD is used by both link
partners, so it must not be enabled at all.

We'll recoup the power savings by enabling SUSPEND1 mode on affected
LAN95xx chips in a forthcoming commit.

Fixes: 3e5d3f0549b3 ("usbnet: smsc95xx: Forward PHY interrupts to PHY driver to avoid polling")
Reported-by: Simon Han <z.han@kunbus.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Link: https://lore.kernel.org/r/439a3f3168c2f9d44b5fd9bb8d2b551711316be6.1655714438.git.lukas@wunner.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/phy/smsc.c