From patchwork Thu Jun 11 12:51:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Cochran X-Patchwork-Id: 483136 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 2496B140283 for ; Thu, 11 Jun 2015 22:51:41 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=ukPz3Ajp; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752738AbbFKMvh (ORCPT ); Thu, 11 Jun 2015 08:51:37 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:35726 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752411AbbFKMvf (ORCPT ); Thu, 11 Jun 2015 08:51:35 -0400 Received: by wiga1 with SMTP id a1so74686874wig.0 for ; Thu, 11 Jun 2015 05:51:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=iIV+Qo2AEyzkUxX+XGkm3rdBnk9JaKUVGzG/Tg0Qgnk=; b=ukPz3AjpzITwriSPDutxd5tfI1kKrtK0PAnYNRvs4+O0gIKG0Az0qkEeh6B4o7+8tN VABc+b37XvoT47PHyoevFLEqCg2Lm+YATUiyLqRBuA0p14rjZwGdgwgZSv2oLo6zt17R 5s9xLcNpBiteuGHeqNSsZ5/c+FMU8cJwXBk040I8fmCnM3+36Mpl5FPYaL1n0RprCNHe CHm6mBkAEbRdw/Z/WI4cU8Eoo73YkjpvbMX+9tkyDJIXhODdWZ2yM4gPEcrCOv1MHRsD lPKK01b70mKqOAtimNiy9sSTMVuglCx2xDi780mqHSX7y8mp30eXVYKiYXNKxsdlbNiS 5Hsg== X-Received: by 10.180.76.134 with SMTP id k6mr29773294wiw.43.1434027094774; Thu, 11 Jun 2015 05:51:34 -0700 (PDT) Received: from localhost.localdomain (91-114-197-10.adsl.highway.telekom.at. [91.114.197.10]) by mx.google.com with ESMTPSA id fx7sm967661wjb.10.2015.06.11.05.51.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Jun 2015 05:51:33 -0700 (PDT) From: Richard Cochran To: Cc: David Miller , Jacob Keller , Jeff Kirsher , Matthew Vick Subject: [PATCH net] net: igb: fix the start time for periodic output signals Date: Thu, 11 Jun 2015 14:51:30 +0200 Message-Id: <1434027090-26866-1-git-send-email-richardcochran@gmail.com> X-Mailer: git-send-email 2.1.4 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 Reviewed-by: Jacob Keller Acked-by: Jeff Kirsher --- 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 {