net: hns3: extend the loopback state acquisition time
authorliuzhongzhu <liuzhongzhu@huawei.com>
Thu, 25 Apr 2019 12:42:53 +0000 (20:42 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Apr 2019 16:13:28 +0000 (12:13 -0400)
The test results show that the maximum time of hardware return
to mac link state is 500MS.The software needs to set twice the
maximum time of hardware return state (1000MS).

If not modified, the loopback test returns probability failure.

Signed-off-by: liuzhongzhu <liuzhongzhu@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

index 4d5568ede04efab3c919d2865957cf93697cec80..effe89fa10dd566acac570969d09a5740e84a8b6 100644 (file)
@@ -5337,8 +5337,8 @@ static int hclge_set_serdes_loopback(struct hclge_dev *hdev, bool en,
 #define HCLGE_SERDES_RETRY_MS  10
 #define HCLGE_SERDES_RETRY_NUM 100
 
-#define HCLGE_MAC_LINK_STATUS_MS   20
-#define HCLGE_MAC_LINK_STATUS_NUM  10
+#define HCLGE_MAC_LINK_STATUS_MS   10
+#define HCLGE_MAC_LINK_STATUS_NUM  100
 #define HCLGE_MAC_LINK_STATUS_DOWN 0
 #define HCLGE_MAC_LINK_STATUS_UP   1