summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/fm10k/fm10k_pf.c
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2015-06-04 02:31:10 +0300
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2015-06-18 00:21:26 +0300
commit646725a7c9cbdefd8df4ae7b3217a992ad64a4cd (patch)
tree4fa48cb8da9095f67a69b619ffa3567fb3b398d5 /drivers/net/ethernet/intel/fm10k/fm10k_pf.c
parent7fef39322ce7a0c1bbb5b48bef61b6c1aef73b96 (diff)
downloadlinux-646725a7c9cbdefd8df4ae7b3217a992ad64a4cd.tar.xz
fm10k: fix incorrect DIR_NEVATIVE bit in 1588 code
The SYSTIME_CFG.Adjust Direction bit is actually supposed to indicate that the adjustment is positive. Fix the code to align correctly with hardware and documentation. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/fm10k/fm10k_pf.c')
-rw-r--r--drivers/net/ethernet/intel/fm10k/fm10k_pf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pf.c b/drivers/net/ethernet/intel/fm10k/fm10k_pf.c
index 49c8ad647680..85162b7d331a 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pf.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pf.c
@@ -1792,8 +1792,8 @@ static s32 fm10k_adjust_systime_pf(struct fm10k_hw *hw, s32 ppb)
if (systime_adjust > FM10K_SW_SYSTIME_ADJUST_MASK)
return FM10K_ERR_PARAM;
- if (ppb < 0)
- systime_adjust |= FM10K_SW_SYSTIME_ADJUST_DIR_NEGATIVE;
+ if (ppb > 0)
+ systime_adjust |= FM10K_SW_SYSTIME_ADJUST_DIR_POSITIVE;
fm10k_write_sw_reg(hw, FM10K_SW_SYSTIME_ADJUST, (u32)systime_adjust);