diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-12-01 02:21:17 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-28 12:06:01 -0700 |
commit | 16cec22e5099020edb0ba8b6ae8f1b011e2ec4d5 (patch) | |
tree | 499ce5b037ca7e1b450f0a56abd7b1057056e4c8 /scripts/makelst | |
parent | 376ed848f420a921325e9dc144c9cc7fa3829a38 (diff) | |
download | kernel_samsung_espresso10-16cec22e5099020edb0ba8b6ae8f1b011e2ec4d5.zip kernel_samsung_espresso10-16cec22e5099020edb0ba8b6ae8f1b011e2ec4d5.tar.gz kernel_samsung_espresso10-16cec22e5099020edb0ba8b6ae8f1b011e2ec4d5.tar.bz2 |
sfc: Fix timekeeping in efx_mcdi_poll()
[ Upstream commit ebf98e797b4e26ad52ace1511a0b503ee60a6cd4 ]
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>
[bwh: Backported to 3.0: adjust context]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/makelst')
0 files changed, 0 insertions, 0 deletions