bnx2x: allow bnx2x_bsc_read() to schedule
authorEric Dumazet <edumazet@google.com>
Sat, 23 May 2020 19:46:49 +0000 (12:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 May 2020 00:52:48 +0000 (17:52 -0700)
commit880f8f99d12ca89d3ec76f688e0d92612054cbb1
treead0014bc0a9775b76aeb4bc64743a73488428972
parent6a1015b0b4b1f3a0de9e40d2ba86877d13f50918
bnx2x: allow bnx2x_bsc_read() to schedule

bnx2x_warpcore_read_sfp_module_eeprom() can call bnx2x_bsc_read()
three times before giving up.

This causes latency blips of at least 31 ms (58 ms being reported
by our teams)

Convert the long lasting loops of udelay() to usleep_range() ones,
and breaks the loops on precise time tracking.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Ariel Elior <aelior@marvell.com>
Cc: Sudarsana Kalluru <skalluru@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c