]> git.baikalelectronics.ru Git - kernel.git/commit
net: mdio-ipq4019: add delay after clock enable
authorBaruch Siach <baruch.siach@siklu.com>
Mon, 21 Feb 2022 11:45:57 +0000 (13:45 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Feb 2022 13:04:53 +0000 (13:04 +0000)
commit8789811420343d56722dc0b6ce5b9fb6c3751ec0
tree61575b0b96c9c539846ceefeae3157df5980dea8
parentd90188eeb678a7a6883a3f75e593d7243fad0ce8
net: mdio-ipq4019: add delay after clock enable

Experimentation shows that PHY detect might fail when the code attempts
MDIO bus read immediately after clock enable. Add delay to stabilize the
clock before bus access.

PHY detect failure started to show after commit c85edd943320 ("net:
mdio: Demote probed message to debug print") that removed coincidental
delay between clock enable and bus access.

10ms is meant to match the time it take to send the probed message over
UART at 115200 bps. This might be a far overshoot.

Fixes: 2c6a8126248d ("net: mdio: Add the reset function for IPQ MDIO driver")
Signed-off-by: Baruch Siach <baruch.siach@siklu.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/mdio/mdio-ipq4019.c