Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One of MAC is not enabled in Dual MAC case #26

Open
zhiyisun opened this issue May 11, 2022 · 2 comments
Open

One of MAC is not enabled in Dual MAC case #26

zhiyisun opened this issue May 11, 2022 · 2 comments

Comments

@zhiyisun
Copy link

if (!onic_rx_lane_aligned(hw, cmac_id)) {

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.

https://github.com/Xilinx/qep-drivers/blob/eba9eb7a6880a20e797303aa747f191170e98209/linux-kernel/driver/cmac/xcmac.c#L263

@cneely-amd
Copy link
Collaborator

Thanks, I'll plan to remove that rx_lane_aligned check in a future update.

@yrpang
Copy link

yrpang commented Feb 11, 2023

I met this problem when I do loopback test with one MAC.

In line 227, TX_SEND_RFI is set to 1,

onic_write_reg(hw, CMAC_OFFSET_CONF_TX_1(cmac_id), 0x10);

and in line 193 it assert STAT_RX_STATUS_REG is 0x3, this means the stat_rx_remote_fault is 0.
return (val == 0x3);

But in loopback mode the RX will receive the RFI sent by TX. So the test will fail and L236 will never be executed.

onic_write_reg(hw, CMAC_OFFSET_CONF_TX_1(cmac_id), 0x1);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants