One of MAC is not enabled in Dual MAC case
zhiyisun opened this issue · 2 comments
open-nic-driver/onic_hardware.c
Line 219 in 2fa9668
If OpenNIC configures two ports, use a cable to connect both ports together as a loopback test case. MAC0 won't be enabled. The reason is when MAC0 is enabling, RX lane won't be aligned. The reason is MAC1 is not enabled yet.
Or if OpenNIC connects to another NIC, whether OpenNIC MAC enables or not, it will depend on the remote NIC. That will be a logical deadlock.
I would suggest to remove this rx lane alignment check here.
Please refer qep driver.
Thanks, I'll plan to remove that rx_lane_aligned check in a future update.
I met this problem when I do loopback test with one MAC.
In line 227, TX_SEND_RFI is set to 1,
open-nic-driver/onic_hardware.c
Line 227 in 33552cf
and in line 193 it assert STAT_RX_STATUS_REG is 0x3, this means the stat_rx_remote_fault is 0.
open-nic-driver/onic_hardware.c
Line 193 in 33552cf
But in loopback mode the RX will receive the RFI sent by TX. So the test will fail and L236 will never be executed.
open-nic-driver/onic_hardware.c
Line 236 in 33552cf