Lines Matching refs:tstamp
550 struct igc_tx_timestamp_request *tstamp) in igc_ptp_free_tx_buffer() argument
552 if (tstamp->buffer_type == IGC_TX_BUFFER_TYPE_XSK) { in igc_ptp_free_tx_buffer()
554 tstamp->xsk_tx_buffer->xsk_pending_ts = false; in igc_ptp_free_tx_buffer()
560 tstamp->xsk_tx_buffer = NULL; in igc_ptp_free_tx_buffer()
561 tstamp->buffer_type = 0; in igc_ptp_free_tx_buffer()
564 igc_xsk_wakeup(adapter->netdev, tstamp->xsk_queue_index, 0); in igc_ptp_free_tx_buffer()
569 dev_kfree_skb_any(tstamp->skb); in igc_ptp_free_tx_buffer()
570 tstamp->skb = NULL; in igc_ptp_free_tx_buffer()
581 struct igc_tx_timestamp_request *tstamp = &adapter->tx_tstamp[i]; in igc_ptp_clear_tx_tstamp() local
583 if (tstamp->skb) in igc_ptp_clear_tx_tstamp()
584 igc_ptp_free_tx_buffer(adapter, tstamp); in igc_ptp_clear_tx_tstamp()
683 struct igc_tx_timestamp_request *tstamp) in igc_ptp_tx_timeout() argument
685 if (tstamp->skb) in igc_ptp_tx_timeout()
686 igc_ptp_free_tx_buffer(adapter, tstamp); in igc_ptp_tx_timeout()
695 struct igc_tx_timestamp_request *tstamp; in igc_ptp_tx_hang() local
704 tstamp = &adapter->tx_tstamp[i]; in igc_ptp_tx_hang()
706 if (!tstamp->skb) in igc_ptp_tx_hang()
709 if (time_is_after_jiffies(tstamp->start + IGC_PTP_TX_TIMEOUT)) in igc_ptp_tx_hang()
712 igc_ptp_tx_timeout(adapter, tstamp); in igc_ptp_tx_hang()
727 struct igc_tx_timestamp_request *tstamp, u64 regval) in igc_ptp_tx_reg_to_stamp() argument
733 skb = tstamp->skb; in igc_ptp_tx_reg_to_stamp()
759 if (tstamp->buffer_type == IGC_TX_BUFFER_TYPE_XSK) { in igc_ptp_tx_reg_to_stamp()
762 xsk_pool = adapter->tx_ring[tstamp->xsk_queue_index]->xsk_pool; in igc_ptp_tx_reg_to_stamp()
764 xsk_tx_metadata_complete(&tstamp->xsk_meta, in igc_ptp_tx_reg_to_stamp()
772 igc_ptp_free_tx_buffer(adapter, tstamp); in igc_ptp_tx_reg_to_stamp()
836 struct igc_tx_timestamp_request *tstamp = &adapter->tx_tstamp[i]; in igc_ptp_tx_hwtstamp() local
838 if (!(tstamp->mask & mask)) in igc_ptp_tx_hwtstamp()
841 regval = rd32(tstamp->regl); in igc_ptp_tx_hwtstamp()
842 regval |= (u64)rd32(tstamp->regh) << 32; in igc_ptp_tx_hwtstamp()
844 igc_ptp_tx_reg_to_stamp(adapter, tstamp, regval); in igc_ptp_tx_hwtstamp()
938 static struct system_counterval_t igc_device_tstamp_to_system(u64 tstamp) in igc_device_tstamp_to_system() argument
943 .cycles = tstamp, in igc_device_tstamp_to_system()
1099 struct igc_tx_timestamp_request *tstamp; in igc_ptp_init() local
1103 tstamp = &adapter->tx_tstamp[0]; in igc_ptp_init()
1104 tstamp->mask = IGC_TSYNCTXCTL_TXTT_0; in igc_ptp_init()
1105 tstamp->regl = IGC_TXSTMPL_0; in igc_ptp_init()
1106 tstamp->regh = IGC_TXSTMPH_0; in igc_ptp_init()
1107 tstamp->flags = 0; in igc_ptp_init()
1109 tstamp = &adapter->tx_tstamp[1]; in igc_ptp_init()
1110 tstamp->mask = IGC_TSYNCTXCTL_TXTT_1; in igc_ptp_init()
1111 tstamp->regl = IGC_TXSTMPL_1; in igc_ptp_init()
1112 tstamp->regh = IGC_TXSTMPH_1; in igc_ptp_init()
1113 tstamp->flags = IGC_TX_FLAGS_TSTAMP_1; in igc_ptp_init()
1115 tstamp = &adapter->tx_tstamp[2]; in igc_ptp_init()
1116 tstamp->mask = IGC_TSYNCTXCTL_TXTT_2; in igc_ptp_init()
1117 tstamp->regl = IGC_TXSTMPL_2; in igc_ptp_init()
1118 tstamp->regh = IGC_TXSTMPH_2; in igc_ptp_init()
1119 tstamp->flags = IGC_TX_FLAGS_TSTAMP_2; in igc_ptp_init()
1121 tstamp = &adapter->tx_tstamp[3]; in igc_ptp_init()
1122 tstamp->mask = IGC_TSYNCTXCTL_TXTT_3; in igc_ptp_init()
1123 tstamp->regl = IGC_TXSTMPL_3; in igc_ptp_init()
1124 tstamp->regh = IGC_TXSTMPH_3; in igc_ptp_init()
1125 tstamp->flags = IGC_TX_FLAGS_TSTAMP_3; in igc_ptp_init()