aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igb/igb_main.c
diff options
context:
space:
mode:
authorJoanna Yurdal <jyu@trackman.com>2018-05-16 07:14:11 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2018-06-04 12:55:36 -0400
commit1ec2297c5cacefd9198a3cc4a27751b6a2203cf3 (patch)
tree572ac6edc713669de23ccbbc090c7303e2502406 /drivers/net/ethernet/intel/igb/igb_main.c
parent228046e76189ce542f15321b760e380551468017 (diff)
igb: Clear TSICR interrupts together with ICR
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>
Diffstat (limited to 'drivers/net/ethernet/intel/igb/igb_main.c')
-rw-r--r--drivers/net/ethernet/intel/igb/igb_main.c2
1 files changed, 2 insertions, 0 deletions
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)
2058 igb_assign_vector(adapter->q_vector[0], 0); 2058 igb_assign_vector(adapter->q_vector[0], 0);
2059 2059
2060 /* Clear any pending interrupts. */ 2060 /* Clear any pending interrupts. */
2061 rd32(E1000_TSICR);
2061 rd32(E1000_ICR); 2062 rd32(E1000_ICR);
2062 igb_irq_enable(adapter); 2063 igb_irq_enable(adapter);
2063 2064
@@ -3865,6 +3866,7 @@ static int __igb_open(struct net_device *netdev, bool resuming)
3865 napi_enable(&(adapter->q_vector[i]->napi)); 3866 napi_enable(&(adapter->q_vector[i]->napi));
3866 3867
3867 /* Clear any pending interrupts. */ 3868 /* Clear any pending interrupts. */
3869 rd32(E1000_TSICR);
3868 rd32(E1000_ICR); 3870 rd32(E1000_ICR);
3869 3871
3870 igb_irq_enable(adapter); 3872 igb_irq_enable(adapter);