Lines Matching full:timestamp

257  * ice_ptp_cfg_tx_interrupt - Configure Tx timestamp interrupt for the device
260 * Program the device to respond appropriately to the Tx timestamp interrupt
286 /* Configure the Tx timestamp interrupt */ in ice_ptp_cfg_tx_interrupt()
309 /* Set the timestamp flag for all the Rx rings */ in ice_set_rx_tstamp()
318 * ice_ptp_disable_timestamp_mode - Disable current timestamp mode
338 * ice_ptp_restore_timestamp_mode - Restore timestamp configuration
341 * Called at the end of rebuild to restore timestamp configuration after
376 /* Read the system timestamp pre PHC read */ in ice_ptp_read_src_clk_reg()
381 /* Read the system timestamp post PHC read */ in ice_ptp_read_src_clk_reg()
401 * ice_ptp_extend_32b_ts - Convert a 32b nanoseconds timestamp to 64b
403 * @in_tstamp: Ingress/egress 32b nanoseconds timestamp value
407 * Note that the captured timestamp values may be 40 bits, but the lower
410 * Extend the 32bit nanosecond timestamp using the following algorithm and
416 * 3) calculate the delta between the cached time and the timestamp
417 * 4) if the delta is smaller than 2^31 nanoseconds, then the timestamp was
418 * captured after the PHC time. In this case, the full timestamp is just
421 * timestamp was captured *before* the PHC time, i.e. because the PHC
422 * cache was updated after the timestamp was captured by hardware. In this
423 * case, the full timestamp is the cached time minus the inverse delta.
425 * This algorithm works even if the PHC time was updated after a Tx timestamp
426 * was requested, but before the Tx timestamp event was reported from
430 * date. If the timestamp was captured more than 2^31 nanoseconds after the
432 * overflowed more than once, and we might generate an incorrect timestamp.
435 * a second, and (b) discarding any Tx timestamp packet if it has waited for
436 * a timestamp for more than one second.
468 * ice_ptp_extend_40b_ts - Convert a 40b timestamp to 64b nanoseconds
470 * @in_tstamp: Ingress/egress 40b timestamp value
479 * The low bit is an indicator of whether the timestamp is valid. The next
483 * It is assumed that the caller verifies the timestamp is valid prior to
487 * time stored in the device private PTP structure as the basis for timestamp
498 /* Discard the hardware timestamp if the cached PHC time is too old */ in ice_ptp_extend_40b_ts()
511 * @tx: the PTP Tx timestamp tracker to check
513 * Check that a given PTP Tx timestamp tracker is up, i.e. that it is ready
514 * to accept new timestamp requests.
527 * ice_ptp_req_tx_single_tstamp - Request Tx timestamp for a port from FW
528 * @tx: the PTP Tx timestamp tracker
529 * @idx: index of the timestamp to request
566 * ice_ptp_complete_tx_single_tstamp - Complete Tx timestamp for a port
567 * @tx: the PTP Tx timestamp tracker
603 /* Devices using this interface always verify the timestamp differs in ice_ptp_complete_tx_single_tstamp()
604 * relative to the last cached timestamp value. in ice_ptp_complete_tx_single_tstamp()
624 /* Extend the timestamp using cached PHC time */ in ice_ptp_complete_tx_single_tstamp()
637 * @tx: the PTP Tx timestamp tracker
642 * If a given index has a valid timestamp, perform the following steps:
644 * 1) check that the timestamp request is not stale
645 * 2) check that a timestamp is ready and available in the PHY memory bank
646 * 3) read and copy the timestamp out of the PHY register
648 * 5) check if the timestamp is stale, and discard if so
649 * 6) extend the 40 bit timestamp value to get a 64 bit timestamp value
650 * 7) send this 64 bit timestamp to the stack
652 * Note that we do not hold the tracking lock while reading the Tx timestamp.
653 * This is because reading the timestamp requires taking a mutex that might
656 * The only place where we set in_use is when a new timestamp is initiated
659 * function, or during teardown when the Tx timestamp tracker is being
660 * removed. A timestamp index will never be re-used until the in_use bit for
663 * If a Tx thread starts a new timestamp, we might not begin processing it
666 * If a Tx thread starts a new timestamp just after this function exits, the
667 * interrupt for that timestamp should re-trigger this function once
668 * a timestamp is ready.
671 * timestamps may not be able to safely use the timestamp extension math. In
677 * to correctly extend the timestamp using the cached PHC time. It is
678 * extremely unlikely that a packet will ever take this long to timestamp. If
679 * we detect a Tx timestamp request that has waited for this long we assume
681 * the timestamp register.
723 /* Only read a timestamp from the PHY if its marked as ready in ice_ptp_process_tx_tstamp()
747 /* For PHYs which don't implement a proper timestamp ready in ice_ptp_process_tx_tstamp()
748 * bitmap, verify that the timestamp value is different in ice_ptp_process_tx_tstamp()
749 * from the last cached timestamp. If it is not, skip this for in ice_ptp_process_tx_tstamp()
756 /* Discard any timestamp value without the valid bit set */ in ice_ptp_process_tx_tstamp()
782 /* Extend the timestamp using cached PHC time */ in ice_ptp_process_tx_tstamp()
844 /* Process the Tx timestamp tracker */ in ice_ptp_tx_tstamp()
915 /* If we fail to read the Tx timestamp ready bitmap just in ice_ptp_flush_tx_tracker()
925 /* In case this timestamp is ready, we need to clear it. */ in ice_ptp_flush_tx_tracker()
949 * their timestamp value to the stack. This is required to prevent extending
950 * the 40bit hardware timestamp incorrectly.
966 * ice_ptp_flush_all_tx_tracker - Flush all timestamp trackers on this clock
969 * Called by the clock owner to flush all the Tx timestamp trackers associated
986 * Free memory associated with the Tx timestamp tracker.
1020 * Initialize the Tx timestamp tracker for this port. ETH56G PHYs
1042 * Initialize the Tx timestamp tracker for this port. For generic MAC devices,
1043 * the timestamp block is shared for all ports in the same quad. To avoid
1044 * ports using the same timestamp index, logically break the block of
1063 * Initialize the Tx timestamp tracker for this PF. For E810 devices, each
1072 /* The E810 PHY does not provide a timestamp ready bitmap. Instead, in ice_ptp_init_tx_e810()
1074 * timestamp. in ice_ptp_init_tx_e810()
1157 * with a wrong cached timestamp.
1184 * incorrect timestamp values. in ice_ptp_reset_cached_phctime()
1306 * used to configure and enable vernier timestamp calibration.
1505 * configures The E82X timestamp owner to react to interrupts from all PHYs.
1625 /* Don't process timestamp events if PTP is not ready */ in ice_ptp_extts_event()
1640 event.timestamp = (((u64)hi) << 32) | lo; in ice_ptp_extts_event()
1658 * Configure an external timestamp event on the requested channel.
2085 /* Recalibrate and re-enable timestamp blocks for E822/E823 */ in ice_ptp_settime64()
2250 * ice_ptp_getcrosststamp_e82x - Capture a device cross timestamp
2252 * @cts: The memory to fill the cross timestamp info
2254 * Capture a cross timestamp between the ART and the device PTP hardware
2255 * clock. Fill the cross timestamp information and report it back to the
2259 * generating the cross timestamp via PCIe PTM.
2261 * In order to correctly correlate the ART timestamp back to the TSC time, the
2296 * ice_ptp_set_timestamp_mode - Setup driver for requested timestamp mode
2374 * ice_ptp_get_rx_hwts - Get packet Rx timestamp in ns
2378 * The driver receives a notification in the receive descriptor with timestamp.
2391 /* Do not report a timestamp if we don't have a cached PHC time */ in ice_ptp_get_rx_hwts()
2613 * ice_ptp_request_ts - Request an available Tx timestamp index
2614 * @tx: the PTP Tx timestamp tracker to request from
2615 * @skb: the SKB to associate with this timestamp request
2624 /* Check that this tracker is accepting new timestamp requests */ in ice_ptp_request_ts()
2651 /* return the appropriate PHY timestamp register index, -1 if no in ice_ptp_request_ts()
2680 WARN_ONCE(1, "Unexpected Tx timestamp interrupt mode %u\n", in ice_ptp_process_ts()
2690 * The device PHY issues Tx timestamp interrupts to the driver for processing
2691 * timestamp data from the PHY. It will not interrupt again until all
2692 * current timestamp data is read. In rare circumstances, it is possible that
2696 * outstanding timestamp data. If so, trigger an interrupt from software to
2727 …dev_dbg(dev, "PTP periodic task detected waiting timestamps. Triggering Tx timestamp interrupt now… in ice_ptp_maybe_trigger_tx_interrupt()
2841 * about to flush the PHY timestamp block. in ice_ptp_rebuild_owner()
2854 /* Re-enable all periodic outputs and external timestamp events */ in ice_ptp_rebuild_owner()
3303 * Initialize the Tx timestamp interrupt mode for this device. For most device