netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: <netdev@vger.kernel.org>
Cc: e1000-devel@lists.sourceforge.net,
	Jacob Keller <jacob.e.keller@intel.com>,
	David Miller <davem@davemloft.net>
Subject: [PATCH net-next 3/4] igb: do not clobber the TSAUXC bits on reset.
Date: Mon, 27 May 2013 11:21:44 +0200	[thread overview]
Message-ID: <0c838f7cd866c88eb85bb8d2aaaef21048a7d0e9.1369645944.git.richardcochran@gmail.com> (raw)
In-Reply-To: <cover.1369645944.git.richardcochran@gmail.com>
In-Reply-To: <cover.1369645944.git.richardcochran@gmail.com>

The TSAUXC register has a number of different bits, one of which disables
the main clock function. Previously, the clock was re-enabled by clearing
the entire register. This patch changes the code to preserve the values
of the other bits in that register.

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

diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c
index ebc2f72..5944de0 100644
--- a/drivers/net/ethernet/intel/igb/igb_ptp.c
+++ b/drivers/net/ethernet/intel/igb/igb_ptp.c
@@ -860,6 +860,8 @@ void igb_ptp_stop(struct igb_adapter *adapter)
 void igb_ptp_reset(struct igb_adapter *adapter)
 {
 	struct e1000_hw *hw = &adapter->hw;
+	unsigned long flags;
+	u32 tsauxc;
 
 	if (!(adapter->flags & IGB_FLAG_PTP))
 		return;
@@ -875,7 +877,11 @@ void igb_ptp_reset(struct igb_adapter *adapter)
 	case e1000_i210:
 	case e1000_i211:
 		/* Enable the timer functions and interrupts. */
-		wr32(E1000_TSAUXC, 0x0);
+		spin_lock_irqsave(&adapter->tmreg_lock, flags);
+		tsauxc = rd32(E1000_TSAUXC);
+		tsauxc &= ~TSAUXC_DISABLE;
+		wr32(E1000_TSAUXC, tsauxc);
+		spin_unlock_irqrestore(&adapter->tmreg_lock, flags);
 		wr32(E1000_TSIM, TSYNC_INTERRUPTS);
 		wr32(E1000_IMS, E1000_IMS_TS);
 		break;
-- 
1.7.10.4


------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

  parent reply	other threads:[~2013-05-27  9:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-27  9:21 [PATCH net-next 0/4] igb: auxiliary PHC functions for the i210 Richard Cochran
2013-05-27  9:21 ` [PATCH net-next 1/4] igb: refactor and simplify time sync interrupt handling Richard Cochran
2013-05-28  0:44   ` Jeff Kirsher
2013-05-28 15:24   ` Vick, Matthew
2013-05-27  9:21 ` [PATCH net-next 2/4] igb: add more register definitions for time sync functions Richard Cochran
2013-05-28  0:44   ` Jeff Kirsher
2013-05-27  9:21 ` Richard Cochran [this message]
2013-05-28  0:44   ` [PATCH net-next 3/4] igb: do not clobber the TSAUXC bits on reset Jeff Kirsher
2013-05-27  9:21 ` [PATCH net-next 4/4] igb: enable auxiliary PHC functions for the i210 Richard Cochran
2013-05-28  0:45   ` Jeff Kirsher
2013-05-28 15:58   ` Vick, Matthew
2013-05-28 16:23     ` Richard Cochran
2013-05-28 17:39       ` [E1000-devel] " Alexander Duyck
2013-05-28 17:49       ` Vick, Matthew
2013-05-28 21:12         ` Keller, Jacob E
2013-05-29  7:24           ` Richard Cochran
2013-05-29  7:34             ` David Miller
2013-05-29 20:32             ` Ben Hutchings
2013-05-28 15:58 ` [PATCH net-next 0/4] igb: " Vick, Matthew

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0c838f7cd866c88eb85bb8d2aaaef21048a7d0e9.1369645944.git.richardcochran@gmail.com \
    --to=richardcochran@gmail.com \
    --cc=davem@davemloft.net \
    --cc=e1000-devel@lists.sourceforge.net \
    --cc=jacob.e.keller@intel.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).