Should reduce network related latency caused by accessing MIB counters
Signed-off-by: Felix Fietkau <nbd@nbd.name>
return 0;
usleep_range(1000, 2000);
+ cond_resched();
}
return -ETIMEDOUT;
mib_stats[i] = 0;
else
mib_stats[i] += t;
+ cond_resched();
}
}
break;
udelay(10);
+ cond_resched();
}
pr_err("ar8216: timeout on reg %08x: %08x & %08x != %08x\n",
{
int timeout = 20;
- while (ar8xxx_mii_read32(priv, r2, r1) & AR8216_ATU_ACTIVE && --timeout)
- udelay(10);
+ while (ar8xxx_mii_read32(priv, r2, r1) & AR8216_ATU_ACTIVE && --timeout) {
+ udelay(10);
+ cond_resched();
+ }
if (!timeout)
pr_err("ar8216: timeout waiting for atu to become ready\n");