]> git.baikalelectronics.ru Git - kernel.git/commit
net: usb: smsc95xx: fix external PHY reset
authorAlexandru Tachici <alexandru.tachici@analog.com>
Tue, 15 Nov 2022 11:44:34 +0000 (13:44 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 17 Nov 2022 09:38:37 +0000 (10:38 +0100)
commit85b31acb60c7ecfe4234a3d73332ed773c005185
tree66fc351ac1deaa2f7420c23ecf594f2754798faf
parent0b5cd6745ba877b436fefae1b5e9f892538c6783
net: usb: smsc95xx: fix external PHY reset

An external PHY needs settling time after power up or reset.
In the bind() function an mdio bus is registered. If at this point
the external PHY is still initialising, no valid PHY ID will be
read and on phy_find_first() the bind() function will fail.

If an external PHY is present, wait the maximum time specified
in 802.3 45.2.7.1.1.

Fixes: aba6c7f83541 ("smsc95xx: add phylib support")
Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20221115114434.9991-2-alexandru.tachici@analog.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/usb/smsc95xx.c