netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Joanna Yurdal <jyu@trackman.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 04/12] igb: Clear TSICR interrupts together with ICR
Date: Mon,  4 Jun 2018 10:56:36 -0700	[thread overview]
Message-ID: <20180604175644.24293-5-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <20180604175644.24293-1-jeffrey.t.kirsher@intel.com>

From: Joanna Yurdal <jyu@trackman.com>

Issuing "ip link set up/down" can block TSICR interrupts, what results in
missing PTP Tx timestamp and no PPS pulse generation.

Problem happens when the link is set up with the TSICR interrupts pending.
ICR is cleared before enabling interrupts, while TSICR is not. When all TSICR
interrupts are pending at this moment, time_sync interrupt will never
be generated. TSICR should be cleared as well.

In order to reproduce the issue:
1. Setup linux with IEEE 1588 grandmaster and PPS output enabled
2. Continue setting link up/down with random intervals between commands
3. Wait until PPS is not generated ( only one pulse is generated and PPS
dies), and ptp4l complains constantly about Tx timeout.

Signed-off-by: Joanna Yurdal <jyu@trackman.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 78574c06635b..20b728218d20 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -2058,6 +2058,7 @@ int igb_up(struct igb_adapter *adapter)
 		igb_assign_vector(adapter->q_vector[0], 0);
 
 	/* Clear any pending interrupts. */
+	rd32(E1000_TSICR);
 	rd32(E1000_ICR);
 	igb_irq_enable(adapter);
 
@@ -3865,6 +3866,7 @@ static int __igb_open(struct net_device *netdev, bool resuming)
 		napi_enable(&(adapter->q_vector[i]->napi));
 
 	/* Clear any pending interrupts. */
+	rd32(E1000_TSICR);
 	rd32(E1000_ICR);
 
 	igb_irq_enable(adapter);
-- 
2.17.1

  parent reply	other threads:[~2018-06-04 17:55 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-04 17:56 [net-next 00/12][pull request] Intel Wired LAN Driver Updates 2018-06-04 Jeff Kirsher
2018-06-04 17:56 ` [net-next 01/12] e1000e: Ignore TSYNCRXCTL when getting I219 clock attributes Jeff Kirsher
2018-06-04 17:56 ` [net-next 02/12] Documentation: e100: Update the Intel 10/100 driver doc Jeff Kirsher
2018-06-04 17:56 ` [net-next 03/12] Documentation: e1000: Update kernel documentation Jeff Kirsher
2018-06-04 17:56 ` Jeff Kirsher [this message]
2018-06-04 17:56 ` [net-next 05/12] igb: Wait 10ms just once after TX queues reset Jeff Kirsher
2018-06-04 17:56 ` [net-next 06/12] ixgbevf: Fix coexistence of malicious driver detection with XDP Jeff Kirsher
2018-06-04 17:56 ` [net-next 07/12] ixgbevf: fix possible race in the reset subtask Jeff Kirsher
2018-06-04 17:56 ` [net-next 08/12] ixgbe: introduce a helper to simplify code Jeff Kirsher
2018-06-04 17:56 ` [net-next 09/12] bpf, i40e: add meta data support Jeff Kirsher
2018-06-04 17:56 ` [net-next 10/12] ixgbe: fix possible race in reset subtask Jeff Kirsher
2018-06-04 17:56 ` [net-next 11/12] ixgbe: check ipsec ip addr against mgmt filters Jeff Kirsher
2018-06-04 17:56 ` [net-next 12/12] ixgbe: fix broken ipsec Rx with proper cast on spi Jeff Kirsher
2018-06-04 20:27 ` [net-next 00/12][pull request] Intel Wired LAN Driver Updates 2018-06-04 Or Gerlitz
2018-06-04 20:30   ` David Miller
2018-06-04 21:11     ` Or Gerlitz
2018-06-04 21:27       ` David Miller
2018-06-04 22:02         ` Alexander Duyck
2018-06-04 23:32           ` AF_XDP. Was: " Alexei Starovoitov
2018-06-05  1:45             ` Alexander Duyck
2018-06-05  8:44               ` Björn Töpel
2018-06-05 14:11                 ` Daniel Borkmann
2018-06-05  1:09 ` David Miller

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=20180604175644.24293-5-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=jogreene@redhat.com \
    --cc=jyu@trackman.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.com \
    /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).