Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/drivers/net/ethernet/allwinner/sun8i-emac.c b/drivers/net/ethernet/allwinner/sun8i-emac.
- index 23b5e98..8e126f3 100644
- --- a/drivers/net/ethernet/allwinner/sun8i-emac.c
- +++ b/drivers/net/ethernet/allwinner/sun8i-emac.c
- @@ -17,6 +17,7 @@
- * - Jumbo frame
- * - features rx-all
- */
- +#include <linux/delay.h>
- #include <linux/bitops.h>
- #include <linux/clk.h>
- #include <linux/phy.h>
- @@ -895,9 +896,14 @@ static int sun8i_emac_open(struct net_device *ndev)
- /*TODO err = readl_poll_timeout(priv->base + SUN8I_EMAC_BASIC_CTL1, v,
- !(v & 0x01), 100, 10000);*/
- /* wait for reset to be ended */
- + int t = 0;
- do {
- v = readl(priv->base + SUN8I_EMAC_BASIC_CTL1);
- + msleep(10);
- + t++;
- } while ((v & 0x01) != 0 && timeout++ < 50);
- +
- + pr_info("%s: retry: %d\n", __func__, t);
- if (timeout >= 50) {
- dev_err(priv->dev, "EMAC reset timeout\n");
- err = -EFAULT;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement