1
0
Fork 0

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>
hifive-unleashed-5.2
Heiner Kallweit 2019-05-04 15:20:38 +02:00 committed by David S. Miller
parent 9cf9b84cc7
commit d1f5050b45
1 changed files with 1 additions and 1 deletions

View File

@ -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);