Skip to content

Commit 688a0d6

Browse files
vlifshtsanguy11
authored andcommitted
e1000e: set fixed clock frequency indication for Nahum 11 and Nahum 13
On some systems with Nahum 11 and Nahum 13 the value of the XTAL clock in the software STRAP is incorrect. This causes the PTP timer to run at the wrong rate and can lead to synchronization issues. The STRAP value is configured by the system firmware, and a firmware update is not always possible. Since the XTAL clock on these systems always runs at 38.4MHz, the driver may ignore the STRAP and just set the correct value. Fixes: cc23f4f ("e1000e: Add support for Meteor Lake") Signed-off-by: Vitaly Lifshits <[email protected]> Tested-by: Mor Bar-Gabay <[email protected]> Reviewed-by: Gil Fine <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 48c8b21 commit 688a0d6

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

drivers/net/ethernet/intel/e1000e/netdev.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3534,9 +3534,6 @@ s32 e1000e_get_base_timinca(struct e1000_adapter *adapter, u32 *timinca)
35343534
case e1000_pch_cnp:
35353535
case e1000_pch_tgp:
35363536
case e1000_pch_adp:
3537-
case e1000_pch_mtp:
3538-
case e1000_pch_lnp:
3539-
case e1000_pch_ptp:
35403537
case e1000_pch_nvp:
35413538
if (er32(TSYNCRXCTL) & E1000_TSYNCRXCTL_SYSCFI) {
35423539
/* Stable 24MHz frequency */
@@ -3552,6 +3549,17 @@ s32 e1000e_get_base_timinca(struct e1000_adapter *adapter, u32 *timinca)
35523549
adapter->cc.shift = shift;
35533550
}
35543551
break;
3552+
case e1000_pch_mtp:
3553+
case e1000_pch_lnp:
3554+
case e1000_pch_ptp:
3555+
/* System firmware can misreport this value, so set it to a
3556+
* stable 38400KHz frequency.
3557+
*/
3558+
incperiod = INCPERIOD_38400KHZ;
3559+
incvalue = INCVALUE_38400KHZ;
3560+
shift = INCVALUE_SHIFT_38400KHZ;
3561+
adapter->cc.shift = shift;
3562+
break;
35553563
case e1000_82574:
35563564
case e1000_82583:
35573565
/* Stable 25MHz frequency */

drivers/net/ethernet/intel/e1000e/ptp.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,15 +295,17 @@ void e1000e_ptp_init(struct e1000_adapter *adapter)
295295
case e1000_pch_cnp:
296296
case e1000_pch_tgp:
297297
case e1000_pch_adp:
298-
case e1000_pch_mtp:
299-
case e1000_pch_lnp:
300-
case e1000_pch_ptp:
301298
case e1000_pch_nvp:
302299
if (er32(TSYNCRXCTL) & E1000_TSYNCRXCTL_SYSCFI)
303300
adapter->ptp_clock_info.max_adj = MAX_PPB_24MHZ;
304301
else
305302
adapter->ptp_clock_info.max_adj = MAX_PPB_38400KHZ;
306303
break;
304+
case e1000_pch_mtp:
305+
case e1000_pch_lnp:
306+
case e1000_pch_ptp:
307+
adapter->ptp_clock_info.max_adj = MAX_PPB_38400KHZ;
308+
break;
307309
case e1000_82574:
308310
case e1000_82583:
309311
adapter->ptp_clock_info.max_adj = MAX_PPB_25MHZ;

0 commit comments

Comments
 (0)