royzah opened a new pull request, #20457:
URL: https://github.com/apache/nuttx/pull/20457

   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   ## Summary
   
   A carrier that wires the ENET MAC straight to a switch port has no PHY on 
MDIO, so ifup fails and the interface never comes up. `IMXRT_ENET_FIXED_LINK` 
keeps trying the configured PHY, or the board's PHY list with `ETH0_PHY_MULTI`, 
first. If none answers, the MAC runs at 100 Mbps full duplex and `SIOCGMIIREG` 
reports the link up, so the network monitor keeps the interface up.
   
   | Commit | Does |
   | --- | --- |
   | nxstyle | `imxrt_enet.c` passes the check; no code change |
   | fixed link | the option and the fallback |
   
   ## Impact
   
   i.MX RT ENET only, default off. With it off nothing changes. With it on, a 
board with a PHY behaves as before; a board without one gets a link instead of 
an ifup error.
   
   ## Testing
   
   Host: Ubuntu 24.04, x86_64. Builds in 
`ghcr.io/apache/nuttx/apache-nuttx-ci-linux`.
   
   | Check | Result |
   | --- | --- |
   | `./tools/checkpatch.sh -g HEAD~2..HEAD` | OK |
   | `imxrt1170-evk:netnsh` | builds |
   | `imxrt1170-evk:netnsh` + `IMXRT_ENET_FIXED_LINK=y` | builds |
   | RT1176 on a carrier with a switch port, no PHY | ifup succeeds, link up, 
traffic flows |
   
   On the switch-port board:
   
   ```
   $ ping -c10 -i0.3 192.168.202.1
   10 packets transmitted, 10 received, 0% packet loss, time 2723ms
   rtt min/avg/max/mdev = 0.417/19.408/69.469/25.144 ms
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to