Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[linux-2.6-block.git] / drivers / net / ethernet / hisilicon / hns / hns_ethtool.c
index d1df0a44f93cbf49dbab9a3ce5184758209358ad..717fccc2efba9c3c7f27d0caa1f67350e3c42745 100644 (file)
@@ -335,6 +335,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;
@@ -361,6 +362,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;
 }