net: ll_temac: Replace bad usage of msleep() with usleep_range()
authorEsben Haabendal <esben@geanix.com>
Tue, 30 Apr 2019 07:17:57 +0000 (09:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 May 2019 18:33:30 +0000 (14:33 -0400)
Use usleep_range() to avoid problems with msleep() actually sleeping
much longer than expected.

Signed-off-by: Esben Haabendal <esben@geanix.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/xilinx/ll_temac_main.c

index 68375655e61b745a0aa7d5d421aed02554125901..fec8e4c229448ba2d11150f46d45e74a66bd29a5 100644 (file)
@@ -92,7 +92,7 @@ int temac_indirect_busywait(struct temac_local *lp)
                        WARN_ON(1);
                        return -ETIMEDOUT;
                }
-               msleep(1);
+               usleep_range(500, 1000);
        }
        return 0;
 }