Lines Matching full:timestamp

93  * ice_ptp_cfg_tx_interrupt - Configure Tx timestamp interrupt for the device
96 * Program the device to respond appropriately to the Tx timestamp interrupt
122 /* Configure the Tx timestamp interrupt */ in ice_ptp_cfg_tx_interrupt()
145 /* Set the timestamp flag for all the Rx rings */ in ice_set_rx_tstamp()
154 * ice_ptp_disable_timestamp_mode - Disable current timestamp mode
174 * ice_ptp_restore_timestamp_mode - Restore timestamp configuration
177 * Called at the end of rebuild to restore timestamp configuration after
215 /* Read the system timestamp pre PHC read */ in ice_ptp_read_src_clk_reg()
221 /* Read the system timestamp post PHC read */ in ice_ptp_read_src_clk_reg()
229 /* Read the system timestamp post PHC read */ in ice_ptp_read_src_clk_reg()
249 * ice_ptp_extend_32b_ts - Convert a 32b nanoseconds timestamp to 64b
251 * @in_tstamp: Ingress/egress 32b nanoseconds timestamp value
255 * Note that the captured timestamp values may be 40 bits, but the lower
258 * Extend the 32bit nanosecond timestamp using the following algorithm and
264 * 3) calculate the delta between the cached time and the timestamp
265 * 4) if the delta is smaller than 2^31 nanoseconds, then the timestamp was
266 * captured after the PHC time. In this case, the full timestamp is just
269 * timestamp was captured *before* the PHC time, i.e. because the PHC
270 * cache was updated after the timestamp was captured by hardware. In this
271 * case, the full timestamp is the cached time minus the inverse delta.
273 * This algorithm works even if the PHC time was updated after a Tx timestamp
274 * was requested, but before the Tx timestamp event was reported from
278 * date. If the timestamp was captured more than 2^31 nanoseconds after the
280 * overflowed more than once, and we might generate an incorrect timestamp.
283 * a second, and (b) discarding any Tx timestamp packet if it has waited for
284 * a timestamp for more than one second.
316 * ice_ptp_extend_40b_ts - Convert a 40b timestamp to 64b nanoseconds
318 * @in_tstamp: Ingress/egress 40b timestamp value
327 * The low bit is an indicator of whether the timestamp is valid. The next
331 * It is assumed that the caller verifies the timestamp is valid prior to
335 * time stored in the device private PTP structure as the basis for timestamp
346 /* Discard the hardware timestamp if the cached PHC time is too old */ in ice_ptp_extend_40b_ts()
359 * @tx: the PTP Tx timestamp tracker to check
361 * Check that a given PTP Tx timestamp tracker is up, i.e. that it is ready
362 * to accept new timestamp requests.
375 * ice_ptp_req_tx_single_tstamp - Request Tx timestamp for a port from FW
376 * @tx: the PTP Tx timestamp tracker
377 * @idx: index of the timestamp to request
423 * ice_ptp_complete_tx_single_tstamp - Complete Tx timestamp for a port
424 * @tx: the PTP Tx timestamp tracker
477 /* Devices using this interface always verify the timestamp differs in ice_ptp_complete_tx_single_tstamp()
478 * relative to the last cached timestamp value. in ice_ptp_complete_tx_single_tstamp()
498 /* Extend the timestamp using cached PHC time */ in ice_ptp_complete_tx_single_tstamp()
511 * @tx: the PTP Tx timestamp tracker
516 * If a given index has a valid timestamp, perform the following steps:
518 * 1) check that the timestamp request is not stale
519 * 2) check that a timestamp is ready and available in the PHY memory bank
520 * 3) read and copy the timestamp out of the PHY register
522 * 5) check if the timestamp is stale, and discard if so
523 * 6) extend the 40 bit timestamp value to get a 64 bit timestamp value
524 * 7) send this 64 bit timestamp to the stack
526 * Note that we do not hold the tracking lock while reading the Tx timestamp.
527 * This is because reading the timestamp requires taking a mutex that might
530 * The only place where we set in_use is when a new timestamp is initiated
533 * function, or during teardown when the Tx timestamp tracker is being
534 * removed. A timestamp index will never be re-used until the in_use bit for
537 * If a Tx thread starts a new timestamp, we might not begin processing it
540 * If a Tx thread starts a new timestamp just after this function exits, the
541 * interrupt for that timestamp should re-trigger this function once
542 * a timestamp is ready.
545 * timestamps may not be able to safely use the timestamp extension math. In
551 * to correctly extend the timestamp using the cached PHC time. It is
552 * extremely unlikely that a packet will ever take this long to timestamp. If
553 * we detect a Tx timestamp request that has waited for this long we assume
555 * the timestamp register.
597 /* Only read a timestamp from the PHY if its marked as ready in ice_ptp_process_tx_tstamp()
621 /* For PHYs which don't implement a proper timestamp ready in ice_ptp_process_tx_tstamp()
622 * bitmap, verify that the timestamp value is different in ice_ptp_process_tx_tstamp()
623 * from the last cached timestamp. If it is not, skip this for in ice_ptp_process_tx_tstamp()
630 /* Discard any timestamp value without the valid bit set */ in ice_ptp_process_tx_tstamp()
656 /* Extend the timestamp using cached PHC time */ in ice_ptp_process_tx_tstamp()
718 /* Process the Tx timestamp tracker */ in ice_ptp_tx_tstamp()
789 /* If we fail to read the Tx timestamp ready bitmap just in ice_ptp_flush_tx_tracker()
799 /* In case this timestamp is ready, we need to clear it. */ in ice_ptp_flush_tx_tracker()
823 * their timestamp value to the stack. This is required to prevent extending
824 * the 40bit hardware timestamp incorrectly.
840 * ice_ptp_flush_all_tx_tracker - Flush all timestamp trackers on this clock
843 * Called by the clock owner to flush all the Tx timestamp trackers associated
860 * Free memory associated with the Tx timestamp tracker.
894 * Initialize the Tx timestamp tracker for this port. For generic MAC devices,
895 * the timestamp block is shared for all ports in the same quad. To avoid
896 * ports using the same timestamp index, logically break the block of
918 * Initialize the Tx timestamp tracker for this PF. For all PHYs except E82X,
929 /* The E810 PHY does not provide a timestamp ready bitmap. Instead, in ice_ptp_init_tx()
931 * timestamp. in ice_ptp_init_tx()
1014 * with a wrong cached timestamp.
1041 * incorrect timestamp values. in ice_ptp_reset_cached_phctime()
1163 * used to configure and enable vernier timestamp calibration.
1357 * configures The E82X timestamp owner to react to interrupts from all PHYs.
1476 /* Don't process timestamp events if PTP is not ready */ in ice_ptp_extts_event()
1495 event.timestamp = (u64)hi << 32 | lo; in ice_ptp_extts_event()
1503 event.timestamp -= desc->delay[0]; in ice_ptp_extts_event()
1516 * @rq: External timestamp request
1519 * Configure an external timestamp event on the requested channel.
1930 /* Recalibrate and re-enable timestamp blocks for E822/E823 */ in ice_ptp_settime64()
2010 * struct ice_crosststamp_cfg - Device cross timestamp configuration
2013 * @ctl_reg: The hardware register to request cross timestamp
2014 * @ctl_active: Bit in the control register to request cross timestamp
2065 * struct ice_crosststamp_ctx - Device cross timestamp context
2068 * @cfg: pointer to hardware configuration for cross timestamp
2077 * ice_capture_crosststamp - Capture a device/system cross timestamp
2107 /* Poll until we obtain the cross-timestamp hardware semaphore */ in ice_capture_crosststamp()
2112 dev_err(ice_pf_to_dev(pf), "PTP failed to get cross timestamp lock\n"); in ice_capture_crosststamp()
2160 * ice_ptp_getcrosststamp - Capture a device cross timestamp
2162 * @cts: The memory to fill the cross timestamp info
2164 * Capture a cross timestamp between the ART and the device PTP hardware
2165 * clock. Fill the cross timestamp information and report it back to the
2168 * In order to correctly correlate the ART timestamp back to the TSC time, the
2221 * ice_ptp_set_timestamp_mode - Setup driver for requested timestamp mode
2299 * ice_ptp_get_rx_hwts - Get packet Rx timestamp in ns
2303 * The driver receives a notification in the receive descriptor with timestamp.
2316 /* Do not report a timestamp if we don't have a cached PHC time */ in ice_ptp_get_rx_hwts()
2612 * ice_ptp_request_ts - Request an available Tx timestamp index
2613 * @tx: the PTP Tx timestamp tracker to request from
2614 * @skb: the SKB to associate with this timestamp request
2623 /* Check that this tracker is accepting new timestamp requests */ in ice_ptp_request_ts()
2650 /* return the appropriate PHY timestamp register index, -1 if no in ice_ptp_request_ts()
2679 WARN_ONCE(1, "Unexpected Tx timestamp interrupt mode %u\n", in ice_ptp_process_ts()
2689 * Return: IRQ_WAKE_THREAD if Tx timestamp read has to be handled in the bottom
2699 * request a single timestamp in the top half and wait for in ice_ptp_ts_irq()
2751 * The device PHY issues Tx timestamp interrupts to the driver for processing
2752 * timestamp data from the PHY. It will not interrupt again until all
2753 * current timestamp data is read. In rare circumstances, it is possible that
2757 * outstanding timestamp data. If so, trigger an interrupt from software to
2788 …dev_dbg(dev, "PTP periodic task detected waiting timestamps. Triggering Tx timestamp interrupt now… in ice_ptp_maybe_trigger_tx_interrupt()
2932 * about to flush the PHY timestamp block. in ice_ptp_rebuild_owner()
2943 /* Re-enable all periodic outputs and external timestamp events */ in ice_ptp_rebuild_owner()
3178 * Initialize the Tx timestamp interrupt mode for this device. For most device