Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1305914 > unrolled thread

[PATCH] igb: add conditions for I210 to generate periodic clock output

Started byRoland Hii <roland.king.guan.hii@intel.com>
First post2016-01-11 08:40 +0100
Last post2016-01-14 04:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] igb: add conditions for I210 to generate periodic clock output Roland Hii <roland.king.guan.hii@intel.com> - 2016-01-11 08:40 +0100
    RE: [PATCH] igb: add conditions for I210 to generate periodic clock  output "Brown, Aaron F" <aaron.f.brown@intel.com> - 2016-01-14 04:30 +0100

#1305914 — [PATCH] igb: add conditions for I210 to generate periodic clock output

FromRoland Hii <roland.king.guan.hii@intel.com>
Date2016-01-11 08:40 +0100
Subject[PATCH] igb: add conditions for I210 to generate periodic clock output
Message-ID<qPFf3-7CS-5@gated-at.bofh.it>
In general case the maximum supported half cycle time of the synchronized
output clock is 70msec. Slower half cycle time than 70msec can be
programmed also as long as the output clock is synchronized to whole
seconds, useful specifically for generating a 1Hz clock.

Permitted values for the clock half cycle time are: 125,000,000 decimal,
250,000,000 decimal and 500,000,000 decimal (equals to 125msec, 250msec
and 500msec respectively).

Before this patch, only the half cycle time of less than or equal to 70msec
uses the I210 clock output function. This patch adds additional conditions
when half cycle time is equal to 125msec or 250msec or 500msec to use
clock output function.

Under other conditions, interrupt driven target time output events method
is still used to generate the desired clock output.

Signed-off-by: Roland Hii <roland.king.guan.hii@intel.com>
---
 drivers/net/ethernet/intel/igb/igb_ptp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c
index c44df87..22a8a29 100644
--- a/drivers/net/ethernet/intel/igb/igb_ptp.c
+++ b/drivers/net/ethernet/intel/igb/igb_ptp.c
@@ -525,7 +525,8 @@ static int igb_ptp_feature_enable_i210(struct ptp_clock_info *ptp,
 		ts.tv_nsec = rq->perout.period.nsec;
 		ns = timespec64_to_ns(&ts);
 		ns = ns >> 1;
-		if (on && ns <= 70000000LL) {
+		if (on && ((ns <= 70000000LL) || (ns == 125000000LL) ||
+			   (ns == 250000000LL) || (ns == 500000000LL))) {
 			if (ns < 8LL)
 				return -EINVAL;
 			use_freq = 1;
-- 
1.9.1

[toc] | [next] | [standalone]


#1308975 — RE: [PATCH] igb: add conditions for I210 to generate periodic clock output

From"Brown, Aaron F" <aaron.f.brown@intel.com>
Date2016-01-14 04:30 +0100
SubjectRE: [PATCH] igb: add conditions for I210 to generate periodic clock output
Message-ID<qQGLM-130-9@gated-at.bofh.it>
In reply to#1305914
> From: netdev-owner@vger.kernel.org [netdev-owner@vger.kernel.org] on behalf of Roland Hii [roland.king.guan.hii@intel.com]
> Sent: Sunday, January 10, 2016 11:34 PM
> To: Kirsher, Jeffrey T
> Cc: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH] igb: add conditions for I210 to generate periodic clock output
> 
> In general case the maximum supported half cycle time of the synchronized
> output clock is 70msec. Slower half cycle time than 70msec can be
> programmed also as long as the output clock is synchronized to whole
> seconds, useful specifically for generating a 1Hz clock.
> 
> Permitted values for the clock half cycle time are: 125,000,000 decimal,
> 250,000,000 decimal and 500,000,000 decimal (equals to 125msec, 250msec
> and 500msec respectively).
> 
> Before this patch, only the half cycle time of less than or equal to 70msec
> uses the I210 clock output function. This patch adds additional conditions
> when half cycle time is equal to 125msec or 250msec or 500msec to use
> clock output function.
> 
> Under other conditions, interrupt driven target time output events method
> is still used to generate the desired clock output.
> 
> Signed-off-by: Roland Hii <roland.king.guan.hii@intel.com>
> ---
>  drivers/net/ethernet/intel/igb/igb_ptp.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Tested-by: Aaron Brown <aaron.f.brown@intel.com>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web