diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2019-05-04 16:20:38 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-05 20:52:02 +0300 |
commit | d1f5050b4549fbacd3b3e60126b3bb7270ad8dd1 (patch) | |
tree | 7f08003dd3e49d01ff13329a7fd390e8c6cf41c0 /drivers/net/ethernet/realtek | |
parent | 9cf9b84cc701c791a4d864ae61b673059ea32d04 (diff) | |
download | linux-d1f5050b4549fbacd3b3e60126b3bb7270ad8dd1.tar.xz |
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>
Diffstat (limited to 'drivers/net/ethernet/realtek')
-rw-r--r-- | drivers/net/ethernet/realtek/r8169.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index ee54648a3c6d..290debbe1f48 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c @@ -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); |