Hardware:
XavierNX based CustomBoard
BSP:
L4T 32.4.4
We need to connect a custom board to a 100M/Full fixed switching hub in an end-user environment.
The Ubuntu NetworkManager settings on the custom board side are set to fixed 100M/Full as follows.
However, during the first link-up, the eqos 2490000.ether_qos port was LinkUp at 100Mbps/Half,
as shown in the following log in dmesg. The reproduction rate is 100%.
[ 9.107516] eqos_adjust_link() set SPEED_100
[ 9.107538] eqos 2490000.ether_qos eth1: Link is Up - 100Mbps/Half - flow control off
[ 9.107597] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
Also, starting DHCP in this state seems to cause fragments error in DHCP packets.
This is observed in the logs on the switching hub side.
[Thu Mar 13 14:42:02.280 2025] addr -3 RxFragments : (11144)
Because the opposing device is a switching hub with 100M/Full fixed,
I suppose that Link Up at 100Mbps/Half is caused by eqos 2490000.ether_qos on the custom board automatically
executing AutoNegotiation after HW RESET is released.
Duplex mismatch due to autonegotiation
We are currently connected at 100Mbps/Full by intefrace down /up on eth1 after being connected at 100Mbps/half.
Our goal is to connect at 100Mbps/Full from the first LinkUp to avoid fragmentation errors on the switching hub side.
Regarding the issue of eqos 2490000.ether_qos automatically performing AutoNegotiation after HW RESET is released,
Is there a workaround for this?
Hi,
Could you try Xavier NX developer kit with Jetpack 4.6.6 or 5.1.6? Certain issues are discovered and fixed in later release. Would suggest try and see whether the issue is still present.
We checked it by our custom board.
Jetpack4.6.4(R32.7.4) and Jetpack5.1.3(R35.5.0).
In both cases, the problem still remained.
R32.7.4 (Jetpack4.6.4):
[ 0.000000] Linux version 4.9.337-tegra (ubuntu1@ubuntu1-B560M) (gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) ) #1 SMP PREEMPT Mon Dec 4 13:17:35 JST 2023
...
[ 12.066670] gpio tegra-gpio wake20 for gpio=52(G:4)
[ 12.068924] net eth1: get_configure_l3v4_filter -->
[ 12.069579] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 14.235027] eqos_adjust_link() set SPEED_100
[ 14.235086] eqos 2490000.ether_qos eth1: Link is Up - 100Mbps/Half - flow control off
R35.5.0 (Jetpack5.1.3):
[ 0.000000] Linux version 5.10.192-tegra (shin@shin-miniPC) (aarch64-buildroot-linux-gnu-gcc.br_real (Buildroot 2020.08) 9.3.0, GNU ld (GNU Binutils) 2.33.1) #3 SMP PREEMPT Tue Jun 25 10:39:59 JST 2024
[ 0.000000] Machine model: NVIDIA Jetson Xavier NX based Contec Custom Board
...
[ 16.895349] nvethernet 2490000.ethernet eth1: Link is Up - 100Mbps/Half - flow control off
[ 16.895408] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[ 16.896736] ether_set_eqos_speed_led() set SPEED_100
[ 21.114408] tegradc 15200000.display: unblank
We have confirmed that the problem is resolved by setting autoneg, speed and duplex to fixed settings in eqos_init_phy().
・Drop advertise flag to prevent Link with duplex Half in case autonegotiation connection occurs.
・Disable autonegotiation and set to 100M/Full in the phydev parameter.
[Linux_for_Tegra_dev/sources/kernel/nvidia/drivers/net/ethernet/nvidia/eqos/mdio.c]
int eqos_init_phy(struct net_device *dev)
{
...
/* if multi channels are enabled, disable half duplex
* advertisement
*/
if (pdata->dt_cfg.use_multi_q) {
phydev->supported &= ~(SUPPORTED_1000baseT_Half |
SUPPORTED_100baseT_Half | SUPPORTED_10baseT_Half);
}
#if 1
+ pr_err("%s() Force disable Half duplex advertisement\n", __FUNCTION__);
+ phydev->supported &= ~(SUPPORTED_1000baseT_Half |
+ SUPPORTED_100baseT_Half | SUPPORTED_10baseT_Half);
+ pr_err("%s() Force 100M/Full Autoneg=OFF\n", __FUNCTION__);
+ phydev->autoneg = AUTONEG_DISABLE;
+ phydev->speed = SPEED_100;
+ phydev->duplex = DUPLEX_FULL;
#endif
However, when verified in the Operational Environment, Link Up itself seems to fail occasionally.
Reproduce rate is 2/30 times.
OK log:
6月 10 16:51:24 yec-desktop kernel: eqos_init_phy() Force disable Half duplex advertisement
6月 10 16:51:24 yec-desktop kernel: eqos_init_phy() Force 100M/Full Autoneg=OFF
6月 10 16:51:24 yec-desktop kernel: IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
6月 10 16:51:24 yec-desktop kernel: eqos_adjust_link() set SPEED_100
6月 10 16:51:24 yec-desktop kernel: eqos 2490000.ether_qos eth1: Link is Up - 100Mbps/Full - flow control off
NG log:
6月 10 17:59:35 yec-desktop kernel: eqos_init_phy() Force disable Half duplex advertisement
6月 10 17:59:35 yec-desktop kernel: eqos_init_phy() Force 100M/Full Autoneg=OFF
6月 10 17:59:35 yec-desktop kernel: IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
As we mentioned before, the default eqos driver, regardless of Ubuntu network settings,
It will automatically perform autonegotiation at startup at the driver level.
It causes “Duplex mismatch” problem if opposite device settings is 100M/Full fixed.
We would like to fix it so that we can link up stably with 100M/Full fixed device.
Could you please provide a patch to fix this?
Thank you for your suggestion.
But out environment is r32.4.4.
The rtlgen_read_status() is not defined anywhere.
Linux_for_Tegra/sources/kernel/kernel-4.9$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j4 Image
...
sources/kernel/kernel-4.9/drivers/net/phy/realtek.c:366:19: error: 'rtlgen_read_status' undeclared here (not in a function); did you mean 'genphy_read_status'?
.read_status = &rtlgen_read_status,
^~~~~~~~~~~~~~~~~~
genphy_read_status