All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 1/1] ice: Fix perout start time rounding
@ 2021-08-13 16:50 Tony Nguyen
  2021-08-14  0:30 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Tony Nguyen @ 2021-08-13 16:50 UTC (permalink / raw)
  To: davem, kuba
  Cc: Maciej Machnikowski, netdev, anthony.l.nguyen, richardcochran,
	Sunitha Mekala

From: Maciej Machnikowski <maciej.machnikowski@intel.com>

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 <maciej.machnikowski@intel.com>
Tested-by: Sunitha Mekala <sunithax.d.mekala@intel.com>
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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net 1/1] ice: Fix perout start time rounding
  2021-08-13 16:50 [PATCH net 1/1] ice: Fix perout start time rounding Tony Nguyen
@ 2021-08-14  0:30 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-08-14  0:30 UTC (permalink / raw)
  To: Tony Nguyen
  Cc: davem, kuba, maciej.machnikowski, netdev, richardcochran,
	sunithax.d.mekala

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 <maciej.machnikowski@intel.com>
> 
> 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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-14  0:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-13 16:50 [PATCH net 1/1] ice: Fix perout start time rounding Tony Nguyen
2021-08-14  0:30 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.