Sarthak-Pandey opened a new pull request, #20697:
URL: https://github.com/apache/nuttx/pull/20697

   ## Summary
   
   Resolves two issues in `arch/arm/src/imxrt/imxrt_enet.c` reported in #20692:
   
   1. **PHY Address Scanning:** In `imxrt_determine_phy()`, the scan loop 
iterated over the address range defined in `BOARD_ETH0_PHY_LIST`, but upon 
finding the matching PHY, it never stored the detected `phyaddr` into 
`priv->current_phy_address`. Consequently, `priv->current_phy_address` remained 
stuck at the initial `address_lo`, causing PHY communication to fail on any 
board where the PHY address is greater than `address_lo`.
   2. **YT8512 Configuration Symbol Typo:** In `imxrt_phyintenable()`, `#if 
defined(CONFIG_ETH0_YT8512)` was used instead of `#if 
defined(CONFIG_ETH0_PHY_YT8512)` (the actual Kconfig symbol defined in 
`drivers/net/Kconfig`). Because of this typo, builds with 
`CONFIG_ETH0_PHY_YT8512` failed the check and fell back to configuring KSZ8081 
interrupt registers instead of the YT8512 interrupt mask/status registers.
   
   Fixes #20692
   
   ## Impact
   
   * **Is new feature added?** No
   * **Is existing feature changed?** Yes (bug fixes in i.MX RT Ethernet driver)
   * **Users affected:** Users of i.MX RT boards with PHY address ranges in 
`BOARD_ETH0_PHY_LIST` or boards using Motorcomm YT8512 PHY with PHY interrupts 
enabled.
   * **Build impact:** None.
   * **Hardware impact:** Fixes PHY detection on custom i.MX RT boards and 
enables correct PHY link interrupts on YT8512.
   * **Compatibility:** Backward-compatible; fixed-address boards like EC300 
continue to work without change.
   
   ## Testing
   
   * Verified changes with `nxstyle` across modified lines: 0 errors, 0 
warnings.
   * Verified commit message and signed-off tag adherence to Apache NuttX 
guidelines.
   


-- 
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