aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/handler.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-11-30 21:21:17 -0500
committerBen Hutchings <bhutchings@solarflare.com>2012-11-30 21:37:36 -0500
commitebf98e797b4e26ad52ace1511a0b503ee60a6cd4 (patch)
treef1857b52b3eced0485c059dac8a4882216cbf7a0 /net/tipc/handler.c
parentc2f3b8e3a44b6fe9e36704e30157ebe1a88c08b1 (diff)
sfc: Fix timekeeping in efx_mcdi_poll()
efx_mcdi_poll() uses get_seconds() to read the current time and to implement a polling timeout. The use of this function was chosen partly because it could easily be replaced in a co-sim environment with a macro that read the simulated time. Unfortunately the real get_seconds() returns the system time (real time) which is subject to adjustment by e.g. ntpd. If the system time is adjusted forward during a polled MCDI operation, the effective timeout can be shorter than the intended 10 seconds, resulting in a spurious failure. It is also possible for a backward adjustment to delay detection of a areal failure. Use jiffies instead, and change MCDI_RPC_TIMEOUT to be denominated in jiffies. Also correct rounding of the timeout: check time > finish (or rather time_after(time, finish)) and not time >= finish. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'net/tipc/handler.c')
0 files changed, 0 insertions, 0 deletions