Lines Matching full:timestamp

191  * ice_ptp_cfg_tx_interrupt - Configure Tx timestamp interrupt for the device
194 * Program the device to respond appropriately to the Tx timestamp interrupt
220 /* Configure the Tx timestamp interrupt */ in ice_ptp_cfg_tx_interrupt()
243 /* Set the timestamp flag for all the Rx rings */ in ice_set_rx_tstamp()
252 * ice_ptp_disable_timestamp_mode - Disable current timestamp mode
272 * ice_ptp_restore_timestamp_mode - Restore timestamp configuration
275 * Called at the end of rebuild to restore timestamp configuration after
310 /* Read the system timestamp pre PHC read */ in ice_ptp_read_src_clk_reg()
315 /* Read the system timestamp post PHC read */ in ice_ptp_read_src_clk_reg()
335 * ice_ptp_extend_32b_ts - Convert a 32b nanoseconds timestamp to 64b
337 * @in_tstamp: Ingress/egress 32b nanoseconds timestamp value
341 * Note that the captured timestamp values may be 40 bits, but the lower
344 * Extend the 32bit nanosecond timestamp using the following algorithm and
350 * 3) calculate the delta between the cached time and the timestamp
351 * 4) if the delta is smaller than 2^31 nanoseconds, then the timestamp was
352 * captured after the PHC time. In this case, the full timestamp is just
355 * timestamp was captured *before* the PHC time, i.e. because the PHC
356 * cache was updated after the timestamp was captured by hardware. In this
357 * case, the full timestamp is the cached time minus the inverse delta.
359 * This algorithm works even if the PHC time was updated after a Tx timestamp
360 * was requested, but before the Tx timestamp event was reported from
364 * date. If the timestamp was captured more than 2^31 nanoseconds after the
366 * overflowed more than once, and we might generate an incorrect timestamp.
369 * a second, and (b) discarding any Tx timestamp packet if it has waited for
370 * a timestamp for more than one second.
402 * ice_ptp_extend_40b_ts - Convert a 40b timestamp to 64b nanoseconds
404 * @in_tstamp: Ingress/egress 40b timestamp value
413 * The low bit is an indicator of whether the timestamp is valid. The next
417 * It is assumed that the caller verifies the timestamp is valid prior to
421 * time stored in the device private PTP structure as the basis for timestamp
432 /* Discard the hardware timestamp if the cached PHC time is too old */ in ice_ptp_extend_40b_ts()
445 * @tx: the PTP Tx timestamp tracker to check
447 * Check that a given PTP Tx timestamp tracker is up, i.e. that it is ready
448 * to accept new timestamp requests.
461 * ice_ptp_req_tx_single_tstamp - Request Tx timestamp for a port from FW
462 * @tx: the PTP Tx timestamp tracker
463 * @idx: index of the timestamp to request
509 * ice_ptp_complete_tx_single_tstamp - Complete Tx timestamp for a port
510 * @tx: the PTP Tx timestamp tracker
563 /* Devices using this interface always verify the timestamp differs in ice_ptp_complete_tx_single_tstamp()
564 * relative to the last cached timestamp value. in ice_ptp_complete_tx_single_tstamp()
584 /* Extend the timestamp using cached PHC time */ in ice_ptp_complete_tx_single_tstamp()
597 * @tx: the PTP Tx timestamp tracker
602 * If a given index has a valid timestamp, perform the following steps:
604 * 1) check that the timestamp request is not stale
605 * 2) check that a timestamp is ready and available in the PHY memory bank
606 * 3) read and copy the timestamp out of the PHY register
608 * 5) check if the timestamp is stale, and discard if so
609 * 6) extend the 40 bit timestamp value to get a 64 bit timestamp value
610 * 7) send this 64 bit timestamp to the stack
612 * Note that we do not hold the tracking lock while reading the Tx timestamp.
613 * This is because reading the timestamp requires taking a mutex that might
616 * The only place where we set in_use is when a new timestamp is initiated
619 * function, or during teardown when the Tx timestamp tracker is being
620 * removed. A timestamp index will never be re-used until the in_use bit for
623 * If a Tx thread starts a new timestamp, we might not begin processing it
626 * If a Tx thread starts a new timestamp just after this function exits, the
627 * interrupt for that timestamp should re-trigger this function once
628 * a timestamp is ready.
631 * timestamps may not be able to safely use the timestamp extension math. In
637 * to correctly extend the timestamp using the cached PHC time. It is
638 * extremely unlikely that a packet will ever take this long to timestamp. If
639 * we detect a Tx timestamp request that has waited for this long we assume
641 * the timestamp register.
683 /* Only read a timestamp from the PHY if its marked as ready in ice_ptp_process_tx_tstamp()
707 /* For PHYs which don't implement a proper timestamp ready in ice_ptp_process_tx_tstamp()
708 * bitmap, verify that the timestamp value is different in ice_ptp_process_tx_tstamp()
709 * from the last cached timestamp. If it is not, skip this for in ice_ptp_process_tx_tstamp()
716 /* Discard any timestamp value without the valid bit set */ in ice_ptp_process_tx_tstamp()
742 /* Extend the timestamp using cached PHC time */ in ice_ptp_process_tx_tstamp()
804 /* Process the Tx timestamp tracker */ in ice_ptp_tx_tstamp()
875 /* If we fail to read the Tx timestamp ready bitmap just in ice_ptp_flush_tx_tracker()
885 /* In case this timestamp is ready, we need to clear it. */ in ice_ptp_flush_tx_tracker()
909 * their timestamp value to the stack. This is required to prevent extending
910 * the 40bit hardware timestamp incorrectly.
926 * ice_ptp_flush_all_tx_tracker - Flush all timestamp trackers on this clock
929 * Called by the clock owner to flush all the Tx timestamp trackers associated
946 * Free memory associated with the Tx timestamp tracker.
980 * Initialize the Tx timestamp tracker for this port. ETH56G PHYs
1002 * Initialize the Tx timestamp tracker for this port. For generic MAC devices,
1003 * the timestamp block is shared for all ports in the same quad. To avoid
1004 * ports using the same timestamp index, logically break the block of
1023 * Initialize the Tx timestamp tracker for this PF. For E810 devices, each
1032 /* The E810 PHY does not provide a timestamp ready bitmap. Instead, in ice_ptp_init_tx_e810()
1034 * timestamp. in ice_ptp_init_tx_e810()
1117 * with a wrong cached timestamp.
1144 * incorrect timestamp values. in ice_ptp_reset_cached_phctime()
1266 * used to configure and enable vernier timestamp calibration.
1456 * configures The E82X timestamp owner to react to interrupts from all PHYs.
1576 /* Don't process timestamp events if PTP is not ready */ in ice_ptp_extts_event()
1595 event.timestamp = (u64)hi << 32 | lo; in ice_ptp_extts_event()
1603 event.timestamp -= desc->delay[0]; in ice_ptp_extts_event()
1616 * @rq: External timestamp request
1619 * Configure an external timestamp event on the requested channel.
2106 /* Recalibrate and re-enable timestamp blocks for E822/E823 */ in ice_ptp_settime64()
2271 * ice_ptp_getcrosststamp_e82x - Capture a device cross timestamp
2273 * @cts: The memory to fill the cross timestamp info
2275 * Capture a cross timestamp between the ART and the device PTP hardware
2276 * clock. Fill the cross timestamp information and report it back to the
2280 * generating the cross timestamp via PCIe PTM.
2282 * In order to correctly correlate the ART timestamp back to the TSC time, the
2317 * ice_ptp_set_timestamp_mode - Setup driver for requested timestamp mode
2395 * ice_ptp_get_rx_hwts - Get packet Rx timestamp in ns
2399 * The driver receives a notification in the receive descriptor with timestamp.
2412 /* Do not report a timestamp if we don't have a cached PHC time */ in ice_ptp_get_rx_hwts()
2689 * ice_ptp_request_ts - Request an available Tx timestamp index
2690 * @tx: the PTP Tx timestamp tracker to request from
2691 * @skb: the SKB to associate with this timestamp request
2700 /* Check that this tracker is accepting new timestamp requests */ in ice_ptp_request_ts()
2727 /* return the appropriate PHY timestamp register index, -1 if no in ice_ptp_request_ts()
2756 WARN_ONCE(1, "Unexpected Tx timestamp interrupt mode %u\n", in ice_ptp_process_ts()
2766 * The device PHY issues Tx timestamp interrupts to the driver for processing
2767 * timestamp data from the PHY. It will not interrupt again until all
2768 * current timestamp data is read. In rare circumstances, it is possible that
2772 * outstanding timestamp data. If so, trigger an interrupt from software to
2803 …dev_dbg(dev, "PTP periodic task detected waiting timestamps. Triggering Tx timestamp interrupt now… in ice_ptp_maybe_trigger_tx_interrupt()
2913 * about to flush the PHY timestamp block. in ice_ptp_rebuild_owner()
2926 /* Re-enable all periodic outputs and external timestamp events */ in ice_ptp_rebuild_owner()
3160 * Initialize the Tx timestamp interrupt mode for this device. For most device