Commit 0ac30ce4 authored by Jesse Brandeburg's avatar Jesse Brandeburg Committed by Jeff Kirsher

i40e: fix up 32 bit timespec references

As it turns out there was only a small set of errors
on 32 bit, and we just needed to be using the right calls
for dealing with timespec64 variables.
Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 981e25c3
...@@ -158,13 +158,12 @@ static int i40e_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb) ...@@ -158,13 +158,12 @@ static int i40e_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb)
static int i40e_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) static int i40e_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
{ {
struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps); struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps);
struct timespec64 now, then; struct timespec64 now;
then = ns_to_timespec64(delta);
mutex_lock(&pf->tmreg_lock); mutex_lock(&pf->tmreg_lock);
i40e_ptp_read(pf, &now); i40e_ptp_read(pf, &now);
now = timespec64_add(now, then); timespec64_add_ns(&now, delta);
i40e_ptp_write(pf, (const struct timespec64 *)&now); i40e_ptp_write(pf, (const struct timespec64 *)&now);
mutex_unlock(&pf->tmreg_lock); mutex_unlock(&pf->tmreg_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment