mirror of
https://github.com/apache/nuttx.git
synced 2026-10-04 04:38:10 +00:00
arch/arm/stm32h7: fail the PHY initialization when the reset times out.
When the PHY did not clear the reset bit in time, stm32_phyinit() returned the result of the last MDIO read. The bus reads all ones when the PHY does not answer yet, and that read succeeds, so the function returned OK and the driver went on with its default of 10 Mbps and half duplex, while the PHY negotiated 100 Mbps and full duplex. The interface was up and could not talk to anyone. Return -ETIMEDOUT, so that bringing the interface up fails and the failure is not hidden. Signed-off-by: Daniel P. Carvalho <danieloak@gmail.com> Assisted-by: Claude:claude-sonnet-5
This commit is contained in:
parent
fa1bbce9c9
commit
0a4ab69e52
1 changed files with 1 additions and 1 deletions
|
|
@ -3696,7 +3696,7 @@ static int stm32_phyinit(struct stm32_ethmac_s *priv)
|
|||
if (to <= 0)
|
||||
{
|
||||
nerr("ERROR: Phy reset timeout\n");
|
||||
return ret;
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue