Skip to content

Commit ac28b41

Browse files
jacob-kellerJeff Kirsher
authored andcommitted
igb: restore PPS signal on igb_ptp_reset
When a reset occurs, the PPS SYS_WRAP interrupt was not re-enabled which resulted in disabling of the PPS signaling. Fix this by recording when the interrupt is on and ensuring that we re-enable it every time we reset. Signed-off-by: Jacob Keller <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 0742337 commit ac28b41

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

drivers/net/ethernet/intel/igb/igb.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,7 @@ struct igb_adapter {
489489
struct timecounter tc;
490490
u32 tx_hwtstamp_timeouts;
491491
u32 rx_hwtstamp_cleared;
492+
bool pps_sys_wrap_on;
492493

493494
struct ptp_pin_desc sdp_config[IGB_N_SDP];
494495
struct {

drivers/net/ethernet/intel/igb/igb_ptp.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,7 @@ static int igb_ptp_feature_enable_i210(struct ptp_clock_info *ptp,
591591
tsim |= TSINTR_SYS_WRAP;
592592
else
593593
tsim &= ~TSINTR_SYS_WRAP;
594+
igb->pps_sys_wrap_on = !!on;
594595
wr32(E1000_TSIM, tsim);
595596
spin_unlock_irqrestore(&igb->tmreg_lock, flags);
596597
return 0;
@@ -1235,7 +1236,9 @@ void igb_ptp_reset(struct igb_adapter *adapter)
12351236
case e1000_i211:
12361237
wr32(E1000_TSAUXC, 0x0);
12371238
wr32(E1000_TSSDP, 0x0);
1238-
wr32(E1000_TSIM, TSYNC_INTERRUPTS);
1239+
wr32(E1000_TSIM,
1240+
TSYNC_INTERRUPTS |
1241+
(adapter->pps_sys_wrap_on ? TSINTR_SYS_WRAP : 0));
12391242
wr32(E1000_IMS, E1000_IMS_TS);
12401243
break;
12411244
default:

0 commit comments

Comments
 (0)