Lines Matching refs:ptp_data

404 	if (!efx->ptp_data)  in efx_ptp_describe_stats()
418 if (!efx->ptp_data) in efx_ptp_update_stats()
425 stats[i] = *(unsigned int *)((char *)efx->ptp_data + in efx_ptp_update_stats()
528 return efx->ptp_data ? efx->ptp_data->channel : NULL; in efx_ptp_channel()
533 if (efx->ptp_data) in efx_ptp_update_channel()
534 efx->ptp_data->channel = channel; in efx_ptp_update_channel()
605 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_nic_to_kernel_time()
626 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_get_attributes()
732 efx->ptp_data->ts_corrections.ptp_tx = MCDI_DWORD(outbuf, in efx_ptp_get_timestamp_corrections()
734 efx->ptp_data->ts_corrections.ptp_rx = MCDI_DWORD(outbuf, in efx_ptp_get_timestamp_corrections()
736 efx->ptp_data->ts_corrections.pps_out = MCDI_DWORD(outbuf, in efx_ptp_get_timestamp_corrections()
738 efx->ptp_data->ts_corrections.pps_in = MCDI_DWORD(outbuf, in efx_ptp_get_timestamp_corrections()
742 efx->ptp_data->ts_corrections.general_tx = MCDI_DWORD( in efx_ptp_get_timestamp_corrections()
745 efx->ptp_data->ts_corrections.general_rx = MCDI_DWORD( in efx_ptp_get_timestamp_corrections()
749 efx->ptp_data->ts_corrections.general_tx = in efx_ptp_get_timestamp_corrections()
750 efx->ptp_data->ts_corrections.ptp_tx; in efx_ptp_get_timestamp_corrections()
751 efx->ptp_data->ts_corrections.general_rx = in efx_ptp_get_timestamp_corrections()
752 efx->ptp_data->ts_corrections.ptp_rx; in efx_ptp_get_timestamp_corrections()
755 efx->ptp_data->ts_corrections.ptp_tx = 0; in efx_ptp_get_timestamp_corrections()
756 efx->ptp_data->ts_corrections.ptp_rx = 0; in efx_ptp_get_timestamp_corrections()
757 efx->ptp_data->ts_corrections.pps_out = 0; in efx_ptp_get_timestamp_corrections()
758 efx->ptp_data->ts_corrections.pps_in = 0; in efx_ptp_get_timestamp_corrections()
759 efx->ptp_data->ts_corrections.general_tx = 0; in efx_ptp_get_timestamp_corrections()
760 efx->ptp_data->ts_corrections.general_rx = 0; in efx_ptp_get_timestamp_corrections()
780 efx->ptp_data->channel ? in efx_ptp_enable()
781 efx->ptp_data->channel->channel : 0); in efx_ptp_enable()
782 MCDI_SET_DWORD(inbuf, PTP_IN_ENABLE_MODE, efx->ptp_data->mode); in efx_ptp_enable()
848 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_send_times()
919 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_process_times()
1014 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_synchronize()
1077 struct efx_ptp_data *ptp_data = efx->ptp_data; in efx_ptp_xmit_skb_queue() local
1081 tx_queue = efx_channel_get_tx_queue(ptp_data->channel, type); in efx_ptp_xmit_skb_queue()
1125 struct efx_ptp_data *ptp_data = efx->ptp_data; in efx_ptp_xmit_skb_mc() local
1130 MCDI_SET_DWORD(ptp_data->txbuf, PTP_IN_OP, MC_CMD_PTP_OP_TRANSMIT); in efx_ptp_xmit_skb_mc()
1131 MCDI_SET_DWORD(ptp_data->txbuf, PTP_IN_PERIPH_ID, 0); in efx_ptp_xmit_skb_mc()
1132 MCDI_SET_DWORD(ptp_data->txbuf, PTP_IN_TRANSMIT_LENGTH, skb->len); in efx_ptp_xmit_skb_mc()
1145 MCDI_PTR(ptp_data->txbuf, in efx_ptp_xmit_skb_mc()
1149 ptp_data->txbuf, MC_CMD_PTP_IN_TRANSMIT_LEN(skb->len), in efx_ptp_xmit_skb_mc()
1155 timestamps.hwtstamp = ptp_data->nic_to_kernel_time( in efx_ptp_xmit_skb_mc()
1158 ptp_data->ts_corrections.ptp_tx); in efx_ptp_xmit_skb_mc()
1179 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_process_events()
1244 struct efx_channel *channel = efx->ptp_data->channel; in efx_ptp_init_filter()
1256 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_insert_filter()
1317 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_insert_eth_multicast_filter()
1329 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_insert_multicast_filters()
1395 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_insert_unicast_filter()
1435 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_start()
1460 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_stop()
1472 efx_ptp_deliver_rx_queue(&efx->ptp_data->rxq); in efx_ptp_stop()
1473 skb_queue_purge(&efx->ptp_data->txq); in efx_ptp_stop()
1480 if (efx->ptp_data && efx->ptp_data->enabled) in efx_ptp_restart()
1502 struct efx_ptp_data *ptp_data = in efx_ptp_worker() local
1504 struct efx_nic *efx = ptp_data->efx; in efx_ptp_worker()
1508 if (ptp_data->reset_required) { in efx_ptp_worker()
1517 while ((skb = skb_dequeue(&ptp_data->txq))) in efx_ptp_worker()
1518 ptp_data->xmit_skb(efx, skb); in efx_ptp_worker()
1563 if (efx->ptp_data) { in efx_ptp_probe()
1564 efx->ptp_data->channel = channel; in efx_ptp_probe()
1569 efx->ptp_data = ptp; in efx_ptp_probe()
1570 if (!efx->ptp_data) in efx_ptp_probe()
1635 ptp_clock_unregister(efx->ptp_data->phc_clock); in efx_ptp_probe()
1638 destroy_workqueue(efx->ptp_data->workwq); in efx_ptp_probe()
1644 kfree(efx->ptp_data); in efx_ptp_probe()
1645 efx->ptp_data = NULL; in efx_ptp_probe()
1677 if (!efx->ptp_data) in efx_ptp_remove()
1682 cancel_work_sync(&efx->ptp_data->work); in efx_ptp_remove()
1683 cancel_delayed_work_sync(&efx->ptp_data->cleanup_work); in efx_ptp_remove()
1684 if (efx->ptp_data->pps_workwq) in efx_ptp_remove()
1685 cancel_work_sync(&efx->ptp_data->pps_work); in efx_ptp_remove()
1687 skb_queue_purge(&efx->ptp_data->rxq); in efx_ptp_remove()
1688 skb_queue_purge(&efx->ptp_data->txq); in efx_ptp_remove()
1690 if (efx->ptp_data->phc_clock) { in efx_ptp_remove()
1691 destroy_workqueue(efx->ptp_data->pps_workwq); in efx_ptp_remove()
1692 ptp_clock_unregister(efx->ptp_data->phc_clock); in efx_ptp_remove()
1695 destroy_workqueue(efx->ptp_data->workwq); in efx_ptp_remove()
1697 efx_nic_free_buffer(efx, &efx->ptp_data->start); in efx_ptp_remove()
1698 kfree(efx->ptp_data); in efx_ptp_remove()
1699 efx->ptp_data = NULL; in efx_ptp_remove()
1718 return efx->ptp_data && in efx_ptp_is_ptp_tx()
1719 efx->ptp_data->enabled && in efx_ptp_is_ptp_tx()
1738 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_rx()
1791 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_tx()
1806 if ((enable_wanted != efx->ptp_data->enabled) || in efx_ptp_change_mode()
1807 (enable_wanted && (efx->ptp_data->mode != new_mode))) { in efx_ptp_change_mode()
1812 if (efx->ptp_data->enabled && in efx_ptp_change_mode()
1813 (efx->ptp_data->mode != new_mode)) { in efx_ptp_change_mode()
1814 efx->ptp_data->enabled = false; in efx_ptp_change_mode()
1824 efx->ptp_data->mode = new_mode; in efx_ptp_change_mode()
1840 efx->ptp_data->enabled = enable_wanted; in efx_ptp_change_mode()
1858 efx->ptp_data->config = *init; in efx_ptp_ts_init()
1864 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_get_ts_info()
1886 if (primary && primary->ptp_data && primary->ptp_data->phc_clock) in efx_ptp_get_ts_info()
1888 ptp_clock_index(primary->ptp_data->phc_clock); in efx_ptp_get_ts_info()
1898 if (!efx->ptp_data) in efx_ptp_set_ts_config()
1908 if (!efx->ptp_data) in efx_ptp_get_ts_config()
1910 *config = efx->ptp_data->config; in efx_ptp_get_ts_config()
1916 struct efx_ptp_data *ptp = efx->ptp_data; in ptp_event_failure()
1944 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_event()
1993 struct efx_ptp_data *ptp = efx->ptp_data; in efx_time_sync_event()
2030 struct efx_ptp_data *ptp = efx->ptp_data; in __efx_rx_skb_attach_timestamp()
2085 struct efx_ptp_data *ptp_data = container_of(ptp, in efx_phc_adjfine() local
2089 struct efx_nic *efx = ptp_data->efx; in efx_phc_adjfine()
2101 (1 << (ptp_data->adjfreq_ppb_shift - 1))) >> in efx_phc_adjfine()
2102 ptp_data->adjfreq_ppb_shift; in efx_phc_adjfine()
2114 ptp_data->current_adjfreq = adjustment_ns; in efx_phc_adjfine()
2121 struct efx_ptp_data *ptp_data = container_of(ptp, in efx_phc_adjtime() local
2124 struct efx_nic *efx = ptp_data->efx; in efx_phc_adjtime()
2127 efx->ptp_data->ns_to_nic_time(delta, &nic_major, &nic_minor); in efx_phc_adjtime()
2131 MCDI_SET_QWORD(inbuf, PTP_IN_ADJUST_FREQ, ptp_data->current_adjfreq); in efx_phc_adjtime()
2140 struct efx_ptp_data *ptp_data = container_of(ptp, in efx_phc_gettime() local
2143 struct efx_nic *efx = ptp_data->efx; in efx_phc_gettime()
2157 kt = ptp_data->nic_to_kernel_time( in efx_phc_gettime()
2192 struct efx_ptp_data *ptp_data = container_of(ptp, in efx_phc_enable() local
2198 ptp_data->nic_ts_enabled = !!enable; in efx_phc_enable()