Lines Matching full:timestamp

259  * ice_ptp_cfg_tx_interrupt - Configure Tx timestamp interrupt for the device
262 * Program the device to respond appropriately to the Tx timestamp interrupt
288 /* Configure the Tx timestamp interrupt */ in ice_ptp_cfg_tx_interrupt()
311 /* Set the timestamp flag for all the Rx rings */ in ice_set_rx_tstamp()
320 * ice_ptp_disable_timestamp_mode - Disable current timestamp mode
340 * ice_ptp_restore_timestamp_mode - Restore timestamp configuration
343 * Called at the end of rebuild to restore timestamp configuration after
377 /* Read the system timestamp pre PHC read */ in ice_ptp_read_src_clk_reg()
382 /* Read the system timestamp post PHC read */ in ice_ptp_read_src_clk_reg()
402 * ice_ptp_extend_32b_ts - Convert a 32b nanoseconds timestamp to 64b
404 * @in_tstamp: Ingress/egress 32b nanoseconds timestamp value
408 * Note that the captured timestamp values may be 40 bits, but the lower
411 * Extend the 32bit nanosecond timestamp using the following algorithm and
417 * 3) calculate the delta between the cached time and the timestamp
418 * 4) if the delta is smaller than 2^31 nanoseconds, then the timestamp was
419 * captured after the PHC time. In this case, the full timestamp is just
422 * timestamp was captured *before* the PHC time, i.e. because the PHC
423 * cache was updated after the timestamp was captured by hardware. In this
424 * case, the full timestamp is the cached time minus the inverse delta.
426 * This algorithm works even if the PHC time was updated after a Tx timestamp
427 * was requested, but before the Tx timestamp event was reported from
431 * date. If the timestamp was captured more than 2^31 nanoseconds after the
433 * overflowed more than once, and we might generate an incorrect timestamp.
436 * a second, and (b) discarding any Tx timestamp packet if it has waited for
437 * a timestamp for more than one second.
469 * ice_ptp_extend_40b_ts - Convert a 40b timestamp to 64b nanoseconds
471 * @in_tstamp: Ingress/egress 40b timestamp value
480 * The low bit is an indicator of whether the timestamp is valid. The next
484 * It is assumed that the caller verifies the timestamp is valid prior to
488 * time stored in the device private PTP structure as the basis for timestamp
499 /* Discard the hardware timestamp if the cached PHC time is too old */ in ice_ptp_extend_40b_ts()
512 * @tx: the PTP Tx timestamp tracker to check
514 * Check that a given PTP Tx timestamp tracker is up, i.e. that it is ready
515 * to accept new timestamp requests.
528 * ice_ptp_req_tx_single_tstamp - Request Tx timestamp for a port from FW
529 * @tx: the PTP Tx timestamp tracker
530 * @idx: index of the timestamp to request
567 * ice_ptp_complete_tx_single_tstamp - Complete Tx timestamp for a port
568 * @tx: the PTP Tx timestamp tracker
604 /* For PHYs which don't implement a proper timestamp ready bitmap, in ice_ptp_complete_tx_single_tstamp()
605 * verify that the timestamp value is different from the last cached in ice_ptp_complete_tx_single_tstamp()
606 * timestamp. If it is not, skip this for now assuming it hasn't yet in ice_ptp_complete_tx_single_tstamp()
629 /* Extend the timestamp using cached PHC time */ in ice_ptp_complete_tx_single_tstamp()
642 * @tx: the PTP Tx timestamp tracker
647 * If a given index has a valid timestamp, perform the following steps:
649 * 1) check that the timestamp request is not stale
650 * 2) check that a timestamp is ready and available in the PHY memory bank
651 * 3) read and copy the timestamp out of the PHY register
653 * 5) check if the timestamp is stale, and discard if so
654 * 6) extend the 40 bit timestamp value to get a 64 bit timestamp value
655 * 7) send this 64 bit timestamp to the stack
657 * Note that we do not hold the tracking lock while reading the Tx timestamp.
658 * This is because reading the timestamp requires taking a mutex that might
661 * The only place where we set in_use is when a new timestamp is initiated
664 * function, or during teardown when the Tx timestamp tracker is being
665 * removed. A timestamp index will never be re-used until the in_use bit for
668 * If a Tx thread starts a new timestamp, we might not begin processing it
671 * If a Tx thread starts a new timestamp just after this function exits, the
672 * interrupt for that timestamp should re-trigger this function once
673 * a timestamp is ready.
676 * timestamps may not be able to safely use the timestamp extension math. In
682 * to correctly extend the timestamp using the cached PHC time. It is
683 * extremely unlikely that a packet will ever take this long to timestamp. If
684 * we detect a Tx timestamp request that has waited for this long we assume
686 * the timestamp register.
726 /* Only read a timestamp from the PHY if its marked as ready in ice_ptp_process_tx_tstamp()
749 /* For PHYs which don't implement a proper timestamp ready in ice_ptp_process_tx_tstamp()
750 * bitmap, verify that the timestamp value is different in ice_ptp_process_tx_tstamp()
751 * from the last cached timestamp. If it is not, skip this for in ice_ptp_process_tx_tstamp()
758 /* Discard any timestamp value without the valid bit set */ in ice_ptp_process_tx_tstamp()
784 /* Extend the timestamp using cached PHC time */ in ice_ptp_process_tx_tstamp()
846 /* Process the Tx timestamp tracker */ in ice_ptp_tx_tstamp()
917 /* If we fail to read the Tx timestamp ready bitmap just in ice_ptp_flush_tx_tracker()
927 /* In case this timestamp is ready, we need to clear it. */ in ice_ptp_flush_tx_tracker()
951 * their timestamp value to the stack. This is required to prevent extending
952 * the 40bit hardware timestamp incorrectly.
972 * Free memory associated with the Tx timestamp tracker.
1006 * Initialize the Tx timestamp tracker for this port. For generic MAC devices,
1007 * the timestamp block is shared for all ports in the same quad. To avoid
1008 * ports using the same timestamp index, logically break the block of
1027 * Initialize the Tx timestamp tracker for this PF. For E810 devices, each
1036 /* The E810 PHY does not provide a timestamp ready bitmap. Instead, in ice_ptp_init_tx_e810()
1038 * timestamp. in ice_ptp_init_tx_e810()
1121 * with a wrong cached timestamp.
1148 * incorrect timestamp values. in ice_ptp_reset_cached_phctime()
1295 * used to configure and enable vernier timestamp calibration.
1459 * ice_ptp_tx_ena_intr - Enable or disable the Tx timestamp interrupt
1464 * Utility function to enable or disable Tx timestamp interrupt and threshold
1577 event.timestamp = (((u64)hi) << 32) | lo; in ice_ptp_extts_event()
1943 * Start with disabling timestamp block in ice_ptp_settime64()
1965 /* Recalibrate and re-enable timestamp blocks for E822/E823 */ in ice_ptp_settime64()
2129 * ice_ptp_getcrosststamp_e82x - Capture a device cross timestamp
2131 * @cts: The memory to fill the cross timestamp info
2133 * Capture a cross timestamp between the ART and the device PTP hardware
2134 * clock. Fill the cross timestamp information and report it back to the
2138 * generating the cross timestamp via PCIe PTM.
2140 * In order to correctly correlate the ART timestamp back to the TSC time, the
2175 * ice_ptp_set_timestamp_mode - Setup driver for requested timestamp mode
2253 * ice_ptp_get_rx_hwts - Get packet Rx timestamp in ns
2257 * The driver receives a notification in the receive descriptor with timestamp.
2270 /* Do not report a timestamp if we don't have a cached PHC time */ in ice_ptp_get_rx_hwts()
2492 * ice_ptp_request_ts - Request an available Tx timestamp index
2493 * @tx: the PTP Tx timestamp tracker to request from
2494 * @skb: the SKB to associate with this timestamp request
2503 /* Check that this tracker is accepting new timestamp requests */ in ice_ptp_request_ts()
2530 /* return the appropriate PHY timestamp register index, -1 if no in ice_ptp_request_ts()
2559 WARN_ONCE(1, "Unexpected Tx timestamp interrupt mode %u\n", in ice_ptp_process_ts()
2569 * The device PHY issues Tx timestamp interrupts to the driver for processing
2570 * timestamp data from the PHY. It will not interrupt again until all
2571 * current timestamp data is read. In rare circumstances, it is possible that
2575 * outstanding timestamp data. If so, trigger an interrupt from software to
2606 …dev_dbg(dev, "PTP periodic task detected waiting timestamps. Triggering Tx timestamp interrupt now… in ice_ptp_maybe_trigger_tx_interrupt()
3157 * Initialize the Tx timestamp interrupt mode for this device. For most device