r8169: speed up rtl_loop_wait
When testing I figured out that most operations signal finish even before we trigger the first delay. Seems like PCI(e) access and memory barriers typically add enough latency. Therefore move the first delay after the first check. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9cf9b84cc7
commit
d1f5050b45
@ -775,9 +775,9 @@ static bool rtl_loop_wait(struct rtl8169_private *tp, const struct rtl_cond *c,
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
delay(d);
|
||||
if (c->check(tp) == high)
|
||||
return true;
|
||||
delay(d);
|
||||
}
|
||||
netif_err(tp, drv, tp->dev, "%s == %d (loop: %d, delay: %d).\n",
|
||||
c->msg, !high, n, d);
|
||||
|
Loading…
Reference in New Issue
Block a user