[PATCH net 1/1] ice: Fix perout start time rounding

Subsystems: intel ethernet drivers, networking drivers, the rest

STALE1831d LANDED: 1 (0M)

1 review trailer; landed in mainline as 5f7735196390 on 2021-08-14.

2 messages, 2 authors, 2021-08-14 · open the first message on its own page

[PATCH net 1/1] ice: Fix perout start time rounding

From: Tony Nguyen <anthony.l.nguyen@intel.com>
Date: 2021-08-13 16:46:58

From: Maciej Machnikowski <redacted>

Internal tests found out that the latest code doesn't bring up 1PPS out
as expected. As a result of incorrect define used to round the time up
the time was round down to the past second boundary.

Fix define used for rounding to properly round up to the next Top of
second in ice_ptp_cfg_clkout to fix it.

Fixes: 172db5f91d5f ("ice: add support for auxiliary input/output pins")
Signed-off-by: Maciej Machnikowski <redacted>
Tested-by: Sunitha Mekala <redacted>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_ptp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c
index 5d5207b56ca9..9e3ddb9b8b51 100644
--- a/drivers/net/ethernet/intel/ice/ice_ptp.c
+++ b/drivers/net/ethernet/intel/ice/ice_ptp.c
@@ -656,7 +656,7 @@ static int ice_ptp_cfg_clkout(struct ice_pf *pf, unsigned int chan,
 	 * maintaining phase
 	 */
 	if (start_time < current_time)
-		start_time = div64_u64(current_time + NSEC_PER_MSEC - 1,
+		start_time = div64_u64(current_time + NSEC_PER_SEC - 1,
 				       NSEC_PER_SEC) * NSEC_PER_SEC + phase;
 
 	start_time -= E810_OUT_PROP_DELAY_NS;
-- 
2.26.2

Re: [PATCH net 1/1] ice: Fix perout start time rounding

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-08-14 00:30:18

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Fri, 13 Aug 2021 09:50:18 -0700 you wrote:
From: Maciej Machnikowski <redacted>

Internal tests found out that the latest code doesn't bring up 1PPS out
as expected. As a result of incorrect define used to round the time up
the time was round down to the past second boundary.

Fix define used for rounding to properly round up to the next Top of
second in ice_ptp_cfg_clkout to fix it.

[...]
Here is the summary with links:
  - [net,1/1] ice: Fix perout start time rounding
    https://git.kernel.org/netdev/net/c/5f7735196390

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help