|
|
@@ -339,6 +339,7 @@ static int __lb_setup(struct net_device *ndev,
|
|
|
static int __lb_up(struct net_device *ndev,
|
|
|
enum hnae_loop loop_mode)
|
|
|
{
|
|
|
+#define NIC_LB_TEST_WAIT_PHY_LINK_TIME 300
|
|
|
struct hns_nic_priv *priv = netdev_priv(ndev);
|
|
|
struct hnae_handle *h = priv->ae_handle;
|
|
|
int speed, duplex;
|
|
|
@@ -365,6 +366,9 @@ static int __lb_up(struct net_device *ndev,
|
|
|
|
|
|
h->dev->ops->adjust_link(h, speed, duplex);
|
|
|
|
|
|
+ /* wait adjust link done and phy ready */
|
|
|
+ msleep(NIC_LB_TEST_WAIT_PHY_LINK_TIME);
|
|
|
+
|
|
|
return 0;
|
|
|
}
|
|
|
|