Commit b9dd49bc authored by Guangbin Huang's avatar Guangbin Huang Committed by Yang Yingliang
Browse files

net: hns3: fix loopback test of serdes and phy is failed if duplex is half



driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

----------------------------

If duplex setting is half, mac and phy can not transmit and receive data
at the same time, loopback test of serdes and phy will be failed, print
message as follow:
hns3 0000:bd:00.1 eth5: self test start
hns3 0000:bd:00.1 eth5: net stop
hns3 0000:bd:00.1 eth5: link down
hns3 0000:bd:00.1 eth5: mode 1 recv fail, cnt=0x0, budget=0x1
hns3 0000:bd:00.1 eth5: mode 2 recv fail, cnt=0x0, budget=0x1
hns3 0000:bd:00.1 eth5: mode 3 recv fail, cnt=0x0, budget=0x1
hns3 0000:bd:00.1 eth5: net open
hns3 0000:bd:00.1 eth5: self test end
The test result is FAIL
The test extra info:
App    Loopback test     0
Serdes serial Loopback test      3
Serdes parallel Loopback test    3
Phy    Loopback test     3

To fix this problem, duplex setting of mac or phy will be set to
full before serdes and phy starting loopback test, and restore duplex
setting after test is end.

Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
Reviewed-by: default avatarJian Shen <shenjian15@huawei.com>
Reviewed-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarYonglong Liu <liuyonglong@huawei.com>
Reviewed-by: default avatarYongxin Li <liyongxin1@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 19741023
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment