All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: igb: fix the start time for periodic output signals
@ 2015-06-11 12:51 Richard Cochran
  2015-06-11 12:53 ` Richard Cochran
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Richard Cochran @ 2015-06-11 12:51 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, Jacob Keller, Jeff Kirsher, Matthew Vick

When programming the start of a periodic output, the code wrongly places
the seconds value into the "low" register and the nanoseconds into the
"high" register.  Even though this is backwards, it slipped through my
testing, because the re-arming code in the interrupt service routine is
correct, and the signal does appear starting with the second edge.

This patch fixes the issue by programming the registers correctly.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
---
 drivers/net/ethernet/intel/igb/igb_ptp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c
index e3b9b63..c3a9392c 100644
--- a/drivers/net/ethernet/intel/igb/igb_ptp.c
+++ b/drivers/net/ethernet/intel/igb/igb_ptp.c
@@ -538,8 +538,8 @@ static int igb_ptp_feature_enable_i210(struct ptp_clock_info *ptp,
 			igb->perout[i].start.tv_nsec = rq->perout.start.nsec;
 			igb->perout[i].period.tv_sec = ts.tv_sec;
 			igb->perout[i].period.tv_nsec = ts.tv_nsec;
-			wr32(trgttiml, rq->perout.start.sec);
-			wr32(trgttimh, rq->perout.start.nsec);
+			wr32(trgttimh, rq->perout.start.sec);
+			wr32(trgttiml, rq->perout.start.nsec);
 			tsauxc |= tsauxc_mask;
 			tsim |= tsim_mask;
 		} else {
-- 
2.1.4

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

* Re: [PATCH net] net: igb: fix the start time for periodic output signals
  2015-06-11 12:51 [PATCH net] net: igb: fix the start time for periodic output signals Richard Cochran
@ 2015-06-11 12:53 ` Richard Cochran
  2015-06-11 22:56   ` David Miller
  2015-06-11 17:05 ` Keller, Jacob E
  2015-06-11 22:59 ` Jeff Kirsher
  2 siblings, 1 reply; 7+ messages in thread
From: Richard Cochran @ 2015-06-11 12:53 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, Jacob Keller, Jeff Kirsher, Matthew Vick

On Thu, Jun 11, 2015 at 02:51:30PM +0200, Richard Cochran wrote:
> This patch fixes the issue by programming the registers correctly.

Please also consider this for stable.

Thanks,
Richard

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

* Re: [PATCH net] net: igb: fix the start time for periodic output signals
  2015-06-11 12:51 [PATCH net] net: igb: fix the start time for periodic output signals Richard Cochran
  2015-06-11 12:53 ` Richard Cochran
@ 2015-06-11 17:05 ` Keller, Jacob E
  2015-06-11 22:59 ` Jeff Kirsher
  2 siblings, 0 replies; 7+ messages in thread
From: Keller, Jacob E @ 2015-06-11 17:05 UTC (permalink / raw)
  To: richardcochran; +Cc: netdev, davem, Kirsher, Jeffrey T, Vick, Matthew

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>

Thanks Richard! Easy detail to miss.

Regards,
Jake

On Thu, 2015-06-11 at 14:51 +0200, Richard Cochran wrote:
> When programming the start of a periodic output, the code wrongly 
> places
> the seconds value into the "low" register and the nanoseconds into 
> the
> "high" register.  Even though this is backwards, it slipped through 
> my
> testing, because the re-arming code in the interrupt service routine 
> is
> correct, and the signal does appear starting with the second edge.
> 
> This patch fixes the issue by programming the registers correctly.
> 
> Signed-off-by: Richard Cochran <richardcochran@gmail.com>
> ---
>  drivers/net/ethernet/intel/igb/igb_ptp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c 
> b/drivers/net/ethernet/intel/igb/igb_ptp.c
> index e3b9b63..c3a9392c 100644
> --- a/drivers/net/ethernet/intel/igb/igb_ptp.c
> +++ b/drivers/net/ethernet/intel/igb/igb_ptp.c
> @@ -538,8 +538,8 @@ static int igb_ptp_feature_enable_i210(struct 
> ptp_clock_info *ptp,
>                       igb->perout[i].start.tv_nsec = rq
> ->perout.start.nsec;
>                       igb->perout[i].period.tv_sec = ts.tv_sec;
>                       igb->perout[i].period.tv_nsec = ts.tv_nsec;
> -                     wr32(trgttiml, rq->perout.start.sec);
> -                     wr32(trgttimh, rq->perout.start.nsec);
> +                     wr32(trgttimh, rq->perout.start.sec);
> +                     wr32(trgttiml, rq->perout.start.nsec);
>                       tsauxc |= tsauxc_mask;
>                       tsim |= tsim_mask;
>               } else {

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

* Re: [PATCH net] net: igb: fix the start time for periodic output signals
  2015-06-11 12:53 ` Richard Cochran
@ 2015-06-11 22:56   ` David Miller
  2015-06-11 22:58     ` Jeff Kirsher
  0 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2015-06-11 22:56 UTC (permalink / raw)
  To: richardcochran; +Cc: netdev, jacob.e.keller, jeffrey.t.kirsher, matthew.vick

From: Richard Cochran <richardcochran@gmail.com>
Date: Thu, 11 Jun 2015 14:53:10 +0200

> On Thu, Jun 11, 2015 at 02:51:30PM +0200, Richard Cochran wrote:
>> This patch fixes the issue by programming the registers correctly.
> 
> Please also consider this for stable.

Jeff, do you want me to integrate this directly?

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

* Re: [PATCH net] net: igb: fix the start time for periodic output signals
  2015-06-11 22:56   ` David Miller
@ 2015-06-11 22:58     ` Jeff Kirsher
  0 siblings, 0 replies; 7+ messages in thread
From: Jeff Kirsher @ 2015-06-11 22:58 UTC (permalink / raw)
  To: David Miller; +Cc: richardcochran, netdev, jacob.e.keller, matthew.vick

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

On Thu, 2015-06-11 at 15:56 -0700, David Miller wrote:
> From: Richard Cochran <richardcochran@gmail.com>
> Date: Thu, 11 Jun 2015 14:53:10 +0200
> 
> > On Thu, Jun 11, 2015 at 02:51:30PM +0200, Richard Cochran wrote:
> >> This patch fixes the issue by programming the registers correctly.
> > 
> > Please also consider this for stable.
> 
> Jeff, do you want me to integrate this directly?

Yes please.  I was just about to send email asking that.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH net] net: igb: fix the start time for periodic output signals
  2015-06-11 12:51 [PATCH net] net: igb: fix the start time for periodic output signals Richard Cochran
  2015-06-11 12:53 ` Richard Cochran
  2015-06-11 17:05 ` Keller, Jacob E
@ 2015-06-11 22:59 ` Jeff Kirsher
  2015-06-11 23:04   ` David Miller
  2 siblings, 1 reply; 7+ messages in thread
From: Jeff Kirsher @ 2015-06-11 22:59 UTC (permalink / raw)
  To: Richard Cochran; +Cc: netdev, David Miller, Jacob Keller, Matthew Vick

[-- Attachment #1: Type: text/plain, Size: 629 bytes --]

On Thu, 2015-06-11 at 14:51 +0200, Richard Cochran wrote:
> When programming the start of a periodic output, the code wrongly
> places
> the seconds value into the "low" register and the nanoseconds into the
> "high" register.  Even though this is backwards, it slipped through my
> testing, because the re-arming code in the interrupt service routine
> is
> correct, and the signal does appear starting with the second edge.
> 
> This patch fixes the issue by programming the registers correctly.
> 
> Signed-off-by: Richard Cochran <richardcochran@gmail.com>

Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH net] net: igb: fix the start time for periodic output signals
  2015-06-11 22:59 ` Jeff Kirsher
@ 2015-06-11 23:04   ` David Miller
  0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2015-06-11 23:04 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: richardcochran, netdev, jacob.e.keller, matthew.vick

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 11 Jun 2015 15:59:05 -0700

> On Thu, 2015-06-11 at 14:51 +0200, Richard Cochran wrote:
>> When programming the start of a periodic output, the code wrongly
>> places
>> the seconds value into the "low" register and the nanoseconds into the
>> "high" register.  Even though this is backwards, it slipped through my
>> testing, because the re-arming code in the interrupt service routine
>> is
>> correct, and the signal does appear starting with the second edge.
>> 
>> This patch fixes the issue by programming the registers correctly.
>> 
>> Signed-off-by: Richard Cochran <richardcochran@gmail.com>
> 
> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied and queued up for -stable, thanks.

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

end of thread, other threads:[~2015-06-11 23:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-11 12:51 [PATCH net] net: igb: fix the start time for periodic output signals Richard Cochran
2015-06-11 12:53 ` Richard Cochran
2015-06-11 22:56   ` David Miller
2015-06-11 22:58     ` Jeff Kirsher
2015-06-11 17:05 ` Keller, Jacob E
2015-06-11 22:59 ` Jeff Kirsher
2015-06-11 23:04   ` David Miller

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.