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()
482 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_get_attributes()
547 efx->ptp_data->ts_corrections.tx = MCDI_DWORD(outbuf, in efx_ptp_get_timestamp_corrections()
549 efx->ptp_data->ts_corrections.rx = MCDI_DWORD(outbuf, in efx_ptp_get_timestamp_corrections()
551 efx->ptp_data->ts_corrections.pps_out = MCDI_DWORD(outbuf, in efx_ptp_get_timestamp_corrections()
553 efx->ptp_data->ts_corrections.pps_in = MCDI_DWORD(outbuf, in efx_ptp_get_timestamp_corrections()
556 efx->ptp_data->ts_corrections.tx = 0; in efx_ptp_get_timestamp_corrections()
557 efx->ptp_data->ts_corrections.rx = 0; in efx_ptp_get_timestamp_corrections()
558 efx->ptp_data->ts_corrections.pps_out = 0; in efx_ptp_get_timestamp_corrections()
559 efx->ptp_data->ts_corrections.pps_in = 0; in efx_ptp_get_timestamp_corrections()
577 efx->ptp_data->channel ? in efx_ptp_enable()
578 efx->ptp_data->channel->channel : 0); in efx_ptp_enable()
579 MCDI_SET_DWORD(inbuf, PTP_IN_ENABLE_MODE, efx->ptp_data->mode); in efx_ptp_enable()
640 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_send_times()
713 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_process_times()
808 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_synchronize()
871 struct efx_ptp_data *ptp_data = efx->ptp_data; in efx_ptp_xmit_skb() local
877 MCDI_SET_DWORD(ptp_data->txbuf, PTP_IN_OP, MC_CMD_PTP_OP_TRANSMIT); in efx_ptp_xmit_skb()
878 MCDI_SET_DWORD(ptp_data->txbuf, PTP_IN_PERIPH_ID, 0); in efx_ptp_xmit_skb()
879 MCDI_SET_DWORD(ptp_data->txbuf, PTP_IN_TRANSMIT_LENGTH, skb->len); in efx_ptp_xmit_skb()
892 MCDI_PTR(ptp_data->txbuf, in efx_ptp_xmit_skb()
896 ptp_data->txbuf, MC_CMD_PTP_IN_TRANSMIT_LEN(skb->len), in efx_ptp_xmit_skb()
902 timestamps.hwtstamp = ptp_data->nic_to_kernel_time( in efx_ptp_xmit_skb()
905 ptp_data->ts_corrections.tx); in efx_ptp_xmit_skb()
919 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_drop_time_expired_events()
947 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_match_rx()
995 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_process_events()
1029 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_remove_multicast_filters()
1042 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_insert_multicast_filters()
1091 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_start()
1116 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_stop()
1129 efx_ptp_deliver_rx_queue(&efx->ptp_data->rxq); in efx_ptp_stop()
1130 skb_queue_purge(&efx->ptp_data->txq); in efx_ptp_stop()
1133 spin_lock_bh(&efx->ptp_data->evt_lock); in efx_ptp_stop()
1134 list_for_each_safe(cursor, next, &efx->ptp_data->evt_list) { in efx_ptp_stop()
1135 list_move(cursor, &efx->ptp_data->evt_free_list); in efx_ptp_stop()
1137 spin_unlock_bh(&efx->ptp_data->evt_lock); in efx_ptp_stop()
1144 if (efx->ptp_data && efx->ptp_data->enabled) in efx_ptp_restart()
1166 struct efx_ptp_data *ptp_data = in efx_ptp_worker() local
1168 struct efx_nic *efx = ptp_data->efx; in efx_ptp_worker()
1172 if (ptp_data->reset_required) { in efx_ptp_worker()
1183 while ((skb = skb_dequeue(&ptp_data->txq))) in efx_ptp_worker()
1214 efx->ptp_data = ptp; in efx_ptp_probe()
1215 if (!efx->ptp_data) in efx_ptp_probe()
1275 ptp_clock_unregister(efx->ptp_data->phc_clock); in efx_ptp_probe()
1278 destroy_workqueue(efx->ptp_data->workwq); in efx_ptp_probe()
1284 kfree(efx->ptp_data); in efx_ptp_probe()
1285 efx->ptp_data = NULL; in efx_ptp_probe()
1307 if (!efx->ptp_data) in efx_ptp_remove()
1312 cancel_work_sync(&efx->ptp_data->work); in efx_ptp_remove()
1313 cancel_work_sync(&efx->ptp_data->pps_work); in efx_ptp_remove()
1315 skb_queue_purge(&efx->ptp_data->rxq); in efx_ptp_remove()
1316 skb_queue_purge(&efx->ptp_data->txq); in efx_ptp_remove()
1318 if (efx->ptp_data->phc_clock) { in efx_ptp_remove()
1319 destroy_workqueue(efx->ptp_data->pps_workwq); in efx_ptp_remove()
1320 ptp_clock_unregister(efx->ptp_data->phc_clock); in efx_ptp_remove()
1323 destroy_workqueue(efx->ptp_data->workwq); in efx_ptp_remove()
1325 efx_nic_free_buffer(efx, &efx->ptp_data->start); in efx_ptp_remove()
1326 kfree(efx->ptp_data); in efx_ptp_remove()
1345 return efx->ptp_data && in efx_ptp_is_ptp_tx()
1346 efx->ptp_data->enabled && in efx_ptp_is_ptp_tx()
1365 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_rx()
1451 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_tx()
1465 return efx->ptp_data->mode; in efx_ptp_get_mode()
1471 if ((enable_wanted != efx->ptp_data->enabled) || in efx_ptp_change_mode()
1472 (enable_wanted && (efx->ptp_data->mode != new_mode))) { in efx_ptp_change_mode()
1477 if (efx->ptp_data->enabled && in efx_ptp_change_mode()
1478 (efx->ptp_data->mode != new_mode)) { in efx_ptp_change_mode()
1479 efx->ptp_data->enabled = false; in efx_ptp_change_mode()
1489 efx->ptp_data->mode = new_mode; in efx_ptp_change_mode()
1505 efx->ptp_data->enabled = enable_wanted; in efx_ptp_change_mode()
1526 efx->ptp_data->config = *init; in efx_ptp_ts_init()
1532 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_get_ts_info()
1543 if (primary && primary->ptp_data && primary->ptp_data->phc_clock) in efx_ptp_get_ts_info()
1545 ptp_clock_index(primary->ptp_data->phc_clock); in efx_ptp_get_ts_info()
1556 if (!efx->ptp_data) in efx_ptp_set_ts_config()
1572 if (!efx->ptp_data) in efx_ptp_get_ts_config()
1575 return copy_to_user(ifr->ifr_data, &efx->ptp_data->config, in efx_ptp_get_ts_config()
1576 sizeof(efx->ptp_data->config)) ? -EFAULT : 0; in efx_ptp_get_ts_config()
1581 struct efx_ptp_data *ptp = efx->ptp_data; in ptp_event_failure()
1619 evt->hwtimestamp = efx->ptp_data->nic_to_kernel_time( in ptp_event_rx()
1653 struct efx_ptp_data *ptp = efx->ptp_data; in efx_ptp_event()
1744 (u32) efx->ptp_data->ts_corrections.rx) & in __efx_rx_skb_attach_timestamp()
1789 struct efx_ptp_data *ptp_data = container_of(ptp, in efx_phc_adjfreq() local
1792 struct efx_nic *efx = ptp_data->efx; in efx_phc_adjfreq()
1816 ptp_data->current_adjfreq = adjustment_ns; in efx_phc_adjfreq()
1823 struct efx_ptp_data *ptp_data = container_of(ptp, in efx_phc_adjtime() local
1826 struct efx_nic *efx = ptp_data->efx; in efx_phc_adjtime()
1829 efx->ptp_data->ns_to_nic_time(delta, &nic_major, &nic_minor); in efx_phc_adjtime()
1833 MCDI_SET_QWORD(inbuf, PTP_IN_ADJUST_FREQ, ptp_data->current_adjfreq); in efx_phc_adjtime()
1842 struct efx_ptp_data *ptp_data = container_of(ptp, in efx_phc_gettime() local
1845 struct efx_nic *efx = ptp_data->efx; in efx_phc_gettime()
1859 kt = ptp_data->nic_to_kernel_time( in efx_phc_gettime()
1894 struct efx_ptp_data *ptp_data = container_of(ptp, in efx_phc_enable() local
1900 ptp_data->nic_ts_enabled = !!enable; in efx_phc_enable()