• Home
  • Raw
  • Download

Lines Matching refs:ptp_data

359 	if (!efx->ptp_data)  in efx_ptp_describe_stats()
373 if (!efx->ptp_data) in efx_ptp_update_stats()
380 stats[i] = *(unsigned int *)((char *)efx->ptp_data + in efx_ptp_update_stats()
479 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_get_attributes()
550 efx->ptp_data->ts_corrections.tx = MCDI_DWORD(outbuf, in efx_ptp_get_timestamp_corrections()
552 efx->ptp_data->ts_corrections.rx = MCDI_DWORD(outbuf, in efx_ptp_get_timestamp_corrections()
554 efx->ptp_data->ts_corrections.pps_out = MCDI_DWORD(outbuf, in efx_ptp_get_timestamp_corrections()
556 efx->ptp_data->ts_corrections.pps_in = MCDI_DWORD(outbuf, in efx_ptp_get_timestamp_corrections()
559 efx->ptp_data->ts_corrections.tx = 0; in efx_ptp_get_timestamp_corrections()
560 efx->ptp_data->ts_corrections.rx = 0; in efx_ptp_get_timestamp_corrections()
561 efx->ptp_data->ts_corrections.pps_out = 0; in efx_ptp_get_timestamp_corrections()
562 efx->ptp_data->ts_corrections.pps_in = 0; in efx_ptp_get_timestamp_corrections()
582 efx->ptp_data->channel ? in efx_ptp_enable()
583 efx->ptp_data->channel->channel : 0); in efx_ptp_enable()
584 MCDI_SET_DWORD(inbuf, PTP_IN_ENABLE_MODE, efx->ptp_data->mode); in efx_ptp_enable()
650 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_send_times()
723 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_process_times()
818 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_synchronize()
881 struct efx_ptp_data *ptp_data = efx->ptp_data; in efx_ptp_xmit_skb() local
887 MCDI_SET_DWORD(ptp_data->txbuf, PTP_IN_OP, MC_CMD_PTP_OP_TRANSMIT); in efx_ptp_xmit_skb()
888 MCDI_SET_DWORD(ptp_data->txbuf, PTP_IN_PERIPH_ID, 0); in efx_ptp_xmit_skb()
889 MCDI_SET_DWORD(ptp_data->txbuf, PTP_IN_TRANSMIT_LENGTH, skb->len); in efx_ptp_xmit_skb()
902 MCDI_PTR(ptp_data->txbuf, in efx_ptp_xmit_skb()
906 ptp_data->txbuf, MC_CMD_PTP_IN_TRANSMIT_LEN(skb->len), in efx_ptp_xmit_skb()
912 timestamps.hwtstamp = ptp_data->nic_to_kernel_time( in efx_ptp_xmit_skb()
915 ptp_data->ts_corrections.tx); in efx_ptp_xmit_skb()
929 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_drop_time_expired_events()
957 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_match_rx()
1005 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_process_events()
1039 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_remove_multicast_filters()
1052 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_insert_multicast_filters()
1101 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_start()
1126 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_stop()
1139 efx_ptp_deliver_rx_queue(&efx->ptp_data->rxq); in efx_ptp_stop()
1140 skb_queue_purge(&efx->ptp_data->txq); in efx_ptp_stop()
1143 spin_lock_bh(&efx->ptp_data->evt_lock); in efx_ptp_stop()
1144 list_for_each_safe(cursor, next, &efx->ptp_data->evt_list) { in efx_ptp_stop()
1145 list_move(cursor, &efx->ptp_data->evt_free_list); in efx_ptp_stop()
1147 spin_unlock_bh(&efx->ptp_data->evt_lock); in efx_ptp_stop()
1154 if (efx->ptp_data && efx->ptp_data->enabled) in efx_ptp_restart()
1176 struct efx_ptp_data *ptp_data = in efx_ptp_worker() local
1178 struct efx_nic *efx = ptp_data->efx; in efx_ptp_worker()
1182 if (ptp_data->reset_required) { in efx_ptp_worker()
1193 while ((skb = skb_dequeue(&ptp_data->txq))) in efx_ptp_worker()
1224 efx->ptp_data = ptp; in efx_ptp_probe()
1225 if (!efx->ptp_data) in efx_ptp_probe()
1285 ptp_clock_unregister(efx->ptp_data->phc_clock); in efx_ptp_probe()
1288 destroy_workqueue(efx->ptp_data->workwq); in efx_ptp_probe()
1294 kfree(efx->ptp_data); in efx_ptp_probe()
1295 efx->ptp_data = NULL; in efx_ptp_probe()
1317 if (!efx->ptp_data) in efx_ptp_remove()
1322 cancel_work_sync(&efx->ptp_data->work); in efx_ptp_remove()
1323 if (efx->ptp_data->pps_workwq) in efx_ptp_remove()
1324 cancel_work_sync(&efx->ptp_data->pps_work); in efx_ptp_remove()
1326 skb_queue_purge(&efx->ptp_data->rxq); in efx_ptp_remove()
1327 skb_queue_purge(&efx->ptp_data->txq); in efx_ptp_remove()
1329 if (efx->ptp_data->phc_clock) { in efx_ptp_remove()
1330 destroy_workqueue(efx->ptp_data->pps_workwq); in efx_ptp_remove()
1331 ptp_clock_unregister(efx->ptp_data->phc_clock); in efx_ptp_remove()
1334 destroy_workqueue(efx->ptp_data->workwq); in efx_ptp_remove()
1336 efx_nic_free_buffer(efx, &efx->ptp_data->start); in efx_ptp_remove()
1337 kfree(efx->ptp_data); in efx_ptp_remove()
1356 return efx->ptp_data && in efx_ptp_is_ptp_tx()
1357 efx->ptp_data->enabled && in efx_ptp_is_ptp_tx()
1376 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_rx()
1462 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_tx()
1476 return efx->ptp_data->mode; in efx_ptp_get_mode()
1482 if ((enable_wanted != efx->ptp_data->enabled) || in efx_ptp_change_mode()
1483 (enable_wanted && (efx->ptp_data->mode != new_mode))) { in efx_ptp_change_mode()
1488 if (efx->ptp_data->enabled && in efx_ptp_change_mode()
1489 (efx->ptp_data->mode != new_mode)) { in efx_ptp_change_mode()
1490 efx->ptp_data->enabled = false; in efx_ptp_change_mode()
1500 efx->ptp_data->mode = new_mode; in efx_ptp_change_mode()
1516 efx->ptp_data->enabled = enable_wanted; in efx_ptp_change_mode()
1537 efx->ptp_data->config = *init; in efx_ptp_ts_init()
1543 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_get_ts_info()
1554 if (primary && primary->ptp_data && primary->ptp_data->phc_clock) in efx_ptp_get_ts_info()
1556 ptp_clock_index(primary->ptp_data->phc_clock); in efx_ptp_get_ts_info()
1567 if (!efx->ptp_data) in efx_ptp_set_ts_config()
1583 if (!efx->ptp_data) in efx_ptp_get_ts_config()
1586 return copy_to_user(ifr->ifr_data, &efx->ptp_data->config, in efx_ptp_get_ts_config()
1587 sizeof(efx->ptp_data->config)) ? -EFAULT : 0; in efx_ptp_get_ts_config()
1592 struct efx_ptp_data *ptp = efx->ptp_data; in ptp_event_failure()
1630 evt->hwtimestamp = efx->ptp_data->nic_to_kernel_time( in ptp_event_rx()
1664 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_event()
1755 (u32) efx->ptp_data->ts_corrections.rx) & in __efx_rx_skb_attach_timestamp()
1800 struct efx_ptp_data *ptp_data = container_of(ptp, in efx_phc_adjfreq() local
1803 struct efx_nic *efx = ptp_data->efx; in efx_phc_adjfreq()
1827 ptp_data->current_adjfreq = adjustment_ns; in efx_phc_adjfreq()
1834 struct efx_ptp_data *ptp_data = container_of(ptp, in efx_phc_adjtime() local
1837 struct efx_nic *efx = ptp_data->efx; in efx_phc_adjtime()
1840 efx->ptp_data->ns_to_nic_time(delta, &nic_major, &nic_minor); in efx_phc_adjtime()
1844 MCDI_SET_QWORD(inbuf, PTP_IN_ADJUST_FREQ, ptp_data->current_adjfreq); in efx_phc_adjtime()
1853 struct efx_ptp_data *ptp_data = container_of(ptp, in efx_phc_gettime() local
1856 struct efx_nic *efx = ptp_data->efx; in efx_phc_gettime()
1870 kt = ptp_data->nic_to_kernel_time( in efx_phc_gettime()
1905 struct efx_ptp_data *ptp_data = container_of(ptp, in efx_phc_enable() local
1911 ptp_data->nic_ts_enabled = !!enable; in efx_phc_enable()