ice_ptp_prep...t_adj_eth56g(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– ice_ptp_prep_port_adj_eth56g(9) πŸ’–

okay so this is straight out of the Kernel API Manual, section 9, and bestie it's giving "one port, one atomic time adjust, no cap". Let's get into it 🫢


✨ NAME ✨

ice_ptp_prep_port_adj_eth56g β€” prepare a single port for a time adjust ⏰✨


🌸 SYNOPSIS 🌸

int ice_ptp_prep_port_adj_eth56g(struct ice_hw *hw, u8 port, s64 time);

πŸŽ€ ARGUMENTS πŸŽ€

  • hw β€” pointer to the HW struct πŸ’» (the whole hardware vibe, handed to you)
  • port β€” the port number that's getting programmed 🎯
  • time β€” the time, in cycles, that the port clocks get adjusted by ⏱️

πŸ¦‹ DESCRIPTION πŸ¦‹

So what this icon actually does: it programs the port for an atomic adjustment by writing the Tx and Rx timer registers. Periodt. πŸ’…

Heads up bestie β€” the atomic adjustment is not done yet after this call. It stays pending until the driver issues an ICE_PTP_ADJ_TIME command. So like, this is the setup era, not the main character moment 😭

Also, lowkey the most important thing: time is not in units of nanoseconds. It's in clock time, and it includes the lower sub-nanosecond portion of the port timer. Read that again, fr fr 🧚

Negative adjustments? Supported, using 2s complement arithmetic. Slay, math ate. πŸ”₯


πŸ’… RETURN πŸ’…

  • 0 β€” success ✨ (we love to see it)
  • other β€” failed to write to the PHY πŸ’€

🫢 SEE ALSO 🫢

Kernel file: ./drivers/net/ethernet/intel/ice/ice_ptp_hw.c πŸ“

and the whole friend group πŸŽ€:


that's the whole thing bestie, go adjust some clocks πŸ’œ

source: ./drivers/net/ethernet/intel/ice Β· October 2026 Β· page ice_ptp_prep...t_adj_eth56g(9) β€” mwah, bye πŸŽ€βœ¨

πŸ“¦ where this page comes from