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: NGuangbin Huang <huangguangbin2@huawei.com> Reviewed-by: NJian Shen <shenjian15@huawei.com> Reviewed-by: NPeng Li <lipeng321@huawei.com> Signed-off-by: NYonglong Liu <liuyonglong@huawei.com> Reviewed-by: NYongxin Li <liyongxin1@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录