From: achaiken@aurora.tech
To: jesse.brandeburg@intel.com, richardcochran@gmail.com
Cc: spayne@aurora.tech, netdev@vger.kernel.org, achaiken@aurora.tech,
intel-wired-lan@lists.osuosl.org, alison@she-devel.com
Subject: [Intel-wired-lan] [PATCH] Use ixgbe_ptp_reset on linkup/linkdown for X550
Date: Mon, 1 Aug 2022 06:37:50 -0700 [thread overview]
Message-ID: <20220801133750.7312-1-achaiken@aurora.tech> (raw)
From: Steve Payne <spayne@aurora.tech>
For an unknown reason, when `ixgbe_ptp_start_cyclecounter` is called
from `ixgbe_watchdog_link_is_down` the PHC on the NIC jumps backward
by a seemingly inconsistent amount, which causes discontinuities in
time synchronization. Explicitly reset the NIC's PHC to
`CLOCK_REALTIME` whenever the NIC goes up or down by calling
`ixgbe_ptp_reset` instead of the bare `ixgbe_ptp_start_cyclecounter`.
Signed-off-by: Steve Payne <spayne@aurora.tech>
Signed-off-by: Alison Chaiken <achaiken@aurora.tech>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 750b02bb2fdc2..ab1ec076fa75f 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7462,7 +7462,7 @@ static void ixgbe_watchdog_link_is_up(struct ixgbe_adapter *adapter)
adapter->last_rx_ptp_check = jiffies;
if (test_bit(__IXGBE_PTP_RUNNING, &adapter->state))
- ixgbe_ptp_start_cyclecounter(adapter);
+ ixgbe_ptp_reset(adapter);
switch (link_speed) {
case IXGBE_LINK_SPEED_10GB_FULL:
@@ -7527,7 +7527,7 @@ static void ixgbe_watchdog_link_is_down(struct ixgbe_adapter *adapter)
adapter->flags2 |= IXGBE_FLAG2_SEARCH_FOR_SFP;
if (test_bit(__IXGBE_PTP_RUNNING, &adapter->state))
- ixgbe_ptp_start_cyclecounter(adapter);
+ ixgbe_ptp_reset(adapter);
e_info(drv, "NIC Link is Down\n");
netif_carrier_off(netdev);
--
2.32.0
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
next reply other threads:[~2022-08-01 20:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-01 13:37 achaiken [this message]
2022-08-01 21:34 ` [Intel-wired-lan] [PATCH] Use ixgbe_ptp_reset on linkup/linkdown for X550 Keller, Jacob E
[not found] ` <CAFzL-7tX845o2kJmE4o8EhbeD-=vkR6rmaiz_ZEWfSD4W+iWEA@mail.gmail.com>
2022-08-01 22:53 ` Ilya Evenbach
2022-08-01 23:00 ` [Intel-wired-lan] Fwd: " Ilya Evenbach
2022-08-01 23:29 ` Jacob Keller
2022-08-02 0:24 ` Alison Chaiken
2022-08-02 0:38 ` Jacob Keller
2022-08-02 0:26 ` Jacob Keller
2022-10-04 18:14 ` Alison Chaiken
2022-10-04 21:08 ` Jacob Keller
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=20220801133750.7312-1-achaiken@aurora.tech \
--to=achaiken@aurora.tech \
--cc=alison@she-devel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=spayne@aurora.tech \
/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