]> Git Repo - linux.git/commit
ptp: ocp: have adjtime handle negative delta_ns correctly
authorJonathan Lemon <[email protected]>
Fri, 13 May 2022 22:52:31 +0000 (15:52 -0700)
committerJakub Kicinski <[email protected]>
Mon, 16 May 2022 20:07:46 +0000 (13:07 -0700)
commitda2172a9bfec858ceeb0271b9d444378490398c8
tree418bb6e59adf98dc47abb9b67452e2167cb5cb43
parent4d42d54a7d6aa6d29221d3fd4f2ae9503e94f011
ptp: ocp: have adjtime handle negative delta_ns correctly

delta_ns is a s64, but it was being passed ptp_ocp_adjtime_coarse
as an u64.  Also, it turns out that timespec64_add_ns() only handles
positive values, so perform the math with set_normalized_timespec().

Fixes: 90f8f4c0e3ce ("ptp: ocp: Add ptp_ocp_adjtime_coarse for large adjustments")
Suggested-by: Vadim Fedorenko <[email protected]>
Signed-off-by: Jonathan Lemon <[email protected]>
Acked-by: Vadim Fedorenko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
drivers/ptp/ptp_ocp.c
This page took 0.053458 seconds and 4 git commands to generate.