Netdev List
 help / color / mirror / Atom feed
* [PATCH net 0/3] ice: E825: PHY restart fixes
@ 2026-10-29 18:55 Jacob Keller
  2026-10-29 18:55 ` [PATCH net 1/3] ice: E825: stop clearing PHY_REG_TX_OFFSET_READY Jacob Keller
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jacob Keller @ 2026-10-29 18:55 UTC (permalink / raw)
  To: Przemek Kitszel, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Petr Oros, netdev
  Cc: Grzegorz Nitka, Aleksandr Loktionov, Alexander Nowlin,
	Tony Nguyen, jacob.e.keller, maciej.machnikowski,
	przemyslaw.korba, sergey.temerkhanov, arkadiusz.kubalewski,
	richardcochran, horms

This is a subset of the timestamp processing logic fixes that were
previously posted at [1] and [2]. It focuses specifically on the E825 timer
restart procedure, including three fixes which we have deemed the most
critical for reaching customer deployments due to recently reported issues.

First, the driver is modified to stop clearing the PHY_REG_TX_OFFSET_READY
register. This register controls whether a captured timestamp will have its
"valid" bit set. A timestamp captured while this register still increments
the internal counter. However, since the valid bit is clear, reads of this
timestamp will not trigger the internal counter decrement, leading to an
off-by-one error in the hardware logic. Instead of clearing the offset
ready register, disable timestamp requests purely in software and mark
outstanding timestamps as stale to prevent reporting timestamps that should
be considered valid.

Next, the E825 soft reset procedure is extended to sweep the timestamp
memory region with reads before the soft reset is performed. Reading a
timestamp triggers hardware side effects including automatically clearing
the "valid" bit of the timestamp in the memory, and clearing the "ready"
bit from the timestamp bitmap. The hardware soft reset register does reset
the ready bitmap, but does not automatically clear the "valid" bits from
the timestamps in the memory bank. Additionally, the hardware does not
initialize the memory bank to zero at power on. The sweep ensures that
the memory region will have all the valid bits cleared and the device will
be in a consistent state after the soft reset. The sweep is performed as
part of the soft reset because the reads could otherwise leave the internal
counter in an off-by-one state. By always pairing the sweep with a soft
reset, the memory region is cleared and the soft reset resets the ready
bitmap and internal counter to a known good state.

Finally, the E825 timer restart procedure is extended to include performing
a PHY soft reset. By performing a soft reset, the driver can be sure that
the device is in a known good state at every link up. This also provides a
mechanism to recover if any faulty logic still causes the internal
timestamp counter to become out of sync. The system administrator can reset
the link, triggering a PHY timer restart.

These fixes originally came along with other changes to the driver
timestamping logic flow, but have been separated as they are deemed the
most critical for upcoming E825 deployments. The remaining changes from the
original series continue to suffer from AI feedback pointing out potential
race conditions. The link changes especially may need some deeper
investigation to resolve. I appreciate the maintainers patience with this
work including the multiple rounds on the original series and helping find
a path forward.

Link: [1] https://lore.kernel.org/netdev/710677e5-3668-4588-bd36-2d8f7fb692a9@intel.com/
Link: [2] https://lore.kernel.org/netdev/20261027-reduction-v1-0-81237c67a361@intel.com/

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
Changes:
- The missing mutex_unlock() in the -ENODEV case has been fixed.
- A small typo in the kdoc has been fixed.

I've double checked this round through my own local sashiko instance 3
times and didn't get any remaining reports after a few runs. I only have
claude models, but hopefully there won't be any remaining complaints... :D

---
Jacob Keller (3):
      ice: E825: stop clearing PHY_REG_TX_OFFSET_READY
      ice: E825: clear PHY_TSTAMP memory prior to soft reset
      ice: E825: perform a soft reset when starting the PHY timer

 drivers/net/ethernet/intel/ice/ice_ptp.h    |   5 +-
 drivers/net/ethernet/intel/ice/ice_ptp_hw.h |   2 +-
 drivers/net/ethernet/intel/ice/ice_ptp.c    |  43 ++++++--
 drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 155 ++++++++++++++++------------
 4 files changed, 126 insertions(+), 79 deletions(-)
---
base-commit: 8f44631ba02afe9fff2f0a0fb66560ab19df87fd
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git main
change-id: 20261029-jk-e825c-critical-timestamping-fixes-8e1f86335de1

Best regards,
--  
Jacob Keller <jacob.e.keller@intel.com>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-10-31  1:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-29 18:55 [PATCH net 0/3] ice: E825: PHY restart fixes Jacob Keller
2026-10-29 18:55 ` [PATCH net 1/3] ice: E825: stop clearing PHY_REG_TX_OFFSET_READY Jacob Keller
2026-10-29 18:55 ` [PATCH net 2/3] ice: E825: clear PHY_TSTAMP memory prior to soft reset Jacob Keller
2026-10-30 21:40   ` netdev-bot+sashiko
2026-10-31  0:54     ` Jacob Keller
2026-10-29 18:55 ` [PATCH net 3/3] ice: E825: perform a soft reset when starting the PHY timer Jacob Keller
2026-10-30 21:40   ` netdev-bot+sashiko
2026-10-31  1:01     ` Jacob Keller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox