Skip to content

ice: restore timestamp config after reset

Jacob Keller intel-wired-lan netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 6 repliesIn review

Changes since v2 from the cover letter

* rebased on to Tony's net dev-queue to send through IWL

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ice: remove ptp_tx ring parameter flagdrivers/net/ethernet/intel/ice/ice_ptp.c drivers/net/ethernet/intel/ice/ice_txrx.c drivers/net/ethernet/intel/ice/ice_txrx.h+0 -182 replies
2/3ice: unify logic for programming PFINT_TSYN_MSKdrivers/net/ethernet/intel/ice/ice_ptp.c+34 -262 replies
3/3ice: restore timestamp configuration after device resetdrivers/net/ethernet/intel/ice/ice_main.c drivers/net/ethernet/intel/ice/ice_ptp.c drivers/net/ethernet/intel/ice/ice_ptp.h+52 -412 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchJesse BrandeburgSimon HormanPucha Himasekhar Reddy
1/3R-b R-b T-b
2/3R-b R-b T-b
3/3R-b R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH iwl-net 0/3] ice: restore timestamp config after reset

We recently discovered during internal validation that the ice driver has not been properly restoring Tx timestamp configuration after a device reset, which resulted in application failures after a device reset.

After some digging, it turned out this problem is two-fold. Since the introduction of the PTP support the driver has been clobbering the storage of the current timestamp configuration during reset. Thus after a reset, the driver will no longer perform Tx or Rx timestamps, and will report timestamp configuration as disabled if SIOCGHWTSTAMP ioctl is issued.

In addition, the recently merged auxiliary bus support code missed that PFINT_TSYN_MSK must be reprogrammed on the clock owner for E822 devices. Failure to restore this register configuration results in the driver no longer responding to interrupts from other ports. Depending on the traffic pattern, this can either result in increased latency responding to timestamps on the non-owner ports, or it can result in the driver never reporting any timestamps. The configuration of PFINT_TSYN_MSK was only done during initialization. Due to this, the Tx timestamp issue persists even if userspace reconfigures timestamping.

This series fixes both issues, as well as removes a redundant Tx ring field since we can rely on the skb flag as the primary detector for a Tx timestamp request.

Note that I don't think this series will directly apply to older stable releases (even v6.6) as we recently refactored a lot of the PTP code to support auxiliary bus. Patch 2/3 only matters for the post-auxiliary bus implementation. The principle of patch 1/3 and 3/3 could apply as far back as the initial PTP support, but I don't think it will apply cleanly as-is.

This was originally posted to net-next before 6.6 release, and later posted as a v2 to net. I'm re-posting this to Tony's Intel Wired LAN dev queue so we can queue it up since its driver only changes.

Changes since v2
* rebased on to Tony's net dev-queue to send through IWL

net V2 was posted here:
https://lore.kernel.org/netdev/[email protected]/

Changes since v1
* Update target to net and rebase onto current net tree.
* Add appropriate fixes tag to 1/3.
* Slightly update the cover message.
* picked up Jesse's Reviewed-by tag.

net-next V1 was posted here:
https://lore.kernel.org/netdev/[email protected]/

Jacob Keller (3):
ice: remove ptp_tx ring parameter flag
ice: unify logic for programming PFINT_TSYN_MSK
ice: restore timestamp configuration after device reset

 drivers/net/ethernet/intel/ice/ice_main.c |  12 +-
 drivers/net/ethernet/intel/ice/ice_ptp.c  | 146 ++++++++++++----------
 drivers/net/ethernet/intel/ice/ice_ptp.h  |   5 +-
 drivers/net/ethernet/intel/ice/ice_txrx.c |   3 -
 drivers/net/ethernet/intel/ice/ice_txrx.h |   1 -
 5 files changed, 84 insertions(+), 83 deletions(-)

base-commit: 1405b6c08fc9d3ba6c01de477556d127534ce52f

Signature · 1 line
2.41.0