daniel-p-carvalho commented on code in PR #20451:
URL: https://github.com/apache/nuttx/pull/20451#discussion_r4176131417
##########
arch/mips/src/pic32mz/pic32mz_ethernet.c:
##########
@@ -3181,11 +3182,19 @@ static inline int pic32mz_phyinit(struct
pic32mz_driver_s *priv)
(priv->pd_mode & PIC32MZ_DUPLEX_MASK) ==
PIC32MZ_DUPLEX_FULL ?"full" : "half");
- /* Disable auto-configuration. Set the fixed speed/duplex mode.
- * (probably more than little redundant).
+#ifdef CONFIG_PIC32MZ_PHY_AUTONEG
+ /* Keep auto-negotiation enabled so that the PHY negotiates again when
+ * the cable is reconnected. Forcing the negotiated mode here would
+ * leave the link down against an auto-negotiating partner.
*/
+ ret = OK;
Review Comment:
Done: `ret` is now initialized to `OK` in its declaration, and only the
fixed-mode path remains under `#ifndef CONFIG_PIC32MZ_PHY_AUTONEG`.
--
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]