OSDN Git Service

dpaa_eth: extend delays in ndo_stop
authorMadalin Bucur <madalin.bucur@nxp.com>
Thu, 31 Oct 2019 14:37:57 +0000 (16:37 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Oct 2019 19:13:34 +0000 (12:13 -0700)
Make sure all the frames that are in flight have time to be processed
before the interface is completely brought down. Add a missing delay
for the Rx path.

Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c

index ef81ec3..d8b41a0 100644 (file)
@@ -266,7 +266,7 @@ static int dpaa_stop(struct net_device *net_dev)
        /* Allow the Fman (Tx) port to process in-flight frames before we
         * try switching it off.
         */
-       usleep_range(5000, 10000);
+       msleep(200);
 
        err = mac_dev->stop(mac_dev);
        if (err < 0)
@@ -283,6 +283,8 @@ static int dpaa_stop(struct net_device *net_dev)
                phy_disconnect(net_dev->phydev);
        net_dev->phydev = NULL;
 
+       msleep(200);
+
        return err;
 }