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)
commit809ff97a677ff85dfb7ce2b63be261d1633dcf29
tree66fc351ac1deaa2f7420c23ecf594f2754798faf
parente103ba33998d0f25653cc8ebe745b68d1ee10cda
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: 05b35e7eb9a1 ("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