Lines Matching refs:aq_ptp
98 struct aq_ptp_s *aq_ptp = aq_nic->aq_ptp; in aq_ptp_tm_offset_set() local
101 if (!aq_ptp) in aq_ptp_tm_offset_set()
115 atomic_set(&aq_ptp->offset_egress, egress); in aq_ptp_tm_offset_set()
116 atomic_set(&aq_ptp->offset_ingress, ingress); in aq_ptp_tm_offset_set()
223 static void aq_ptp_tx_timeout_start(struct aq_ptp_s *aq_ptp) in aq_ptp_tx_timeout_start() argument
225 struct ptp_tx_timeout *timeout = &aq_ptp->ptp_tx_timeout; in aq_ptp_tx_timeout_start()
234 static void aq_ptp_tx_timeout_update(struct aq_ptp_s *aq_ptp) in aq_ptp_tx_timeout_update() argument
236 if (!aq_ptp_skb_buf_len(&aq_ptp->skb_ring)) { in aq_ptp_tx_timeout_update()
237 struct ptp_tx_timeout *timeout = &aq_ptp->ptp_tx_timeout; in aq_ptp_tx_timeout_update()
246 static void aq_ptp_tx_timeout_check(struct aq_ptp_s *aq_ptp) in aq_ptp_tx_timeout_check() argument
248 struct ptp_tx_timeout *timeout = &aq_ptp->ptp_tx_timeout; in aq_ptp_tx_timeout_check()
265 aq_ptp_skb_ring_clean(&aq_ptp->skb_ring); in aq_ptp_tx_timeout_check()
266 netdev_err(aq_ptp->aq_nic->ndev, in aq_ptp_tx_timeout_check()
280 struct aq_ptp_s *aq_ptp = container_of(ptp, struct aq_ptp_s, ptp_info); in aq_ptp_adjfine() local
281 struct aq_nic_s *aq_nic = aq_ptp->aq_nic; in aq_ptp_adjfine()
299 struct aq_ptp_s *aq_ptp = container_of(ptp, struct aq_ptp_s, ptp_info); in aq_ptp_adjtime() local
300 struct aq_nic_s *aq_nic = aq_ptp->aq_nic; in aq_ptp_adjtime()
303 spin_lock_irqsave(&aq_ptp->ptp_lock, flags); in aq_ptp_adjtime()
305 spin_unlock_irqrestore(&aq_ptp->ptp_lock, flags); in aq_ptp_adjtime()
319 struct aq_ptp_s *aq_ptp = container_of(ptp, struct aq_ptp_s, ptp_info); in aq_ptp_gettime() local
320 struct aq_nic_s *aq_nic = aq_ptp->aq_nic; in aq_ptp_gettime()
324 spin_lock_irqsave(&aq_ptp->ptp_lock, flags); in aq_ptp_gettime()
326 spin_unlock_irqrestore(&aq_ptp->ptp_lock, flags); in aq_ptp_gettime()
343 struct aq_ptp_s *aq_ptp = container_of(ptp, struct aq_ptp_s, ptp_info); in aq_ptp_settime() local
344 struct aq_nic_s *aq_nic = aq_ptp->aq_nic; in aq_ptp_settime()
349 spin_lock_irqsave(&aq_ptp->ptp_lock, flags); in aq_ptp_settime()
353 spin_unlock_irqrestore(&aq_ptp->ptp_lock, flags); in aq_ptp_settime()
358 static void aq_ptp_convert_to_hwtstamp(struct aq_ptp_s *aq_ptp, in aq_ptp_convert_to_hwtstamp() argument
392 struct aq_ptp_s *aq_ptp = container_of(ptp, struct aq_ptp_s, ptp_info); in aq_ptp_perout_pin_configure() local
395 struct aq_nic_s *aq_nic = aq_ptp->aq_nic; in aq_ptp_perout_pin_configure()
429 struct aq_ptp_s *aq_ptp = container_of(ptp, struct aq_ptp_s, ptp_info); in aq_ptp_pps_pin_configure() local
430 struct aq_nic_s *aq_nic = aq_ptp->aq_nic; in aq_ptp_pps_pin_configure()
450 static void aq_ptp_extts_pin_ctrl(struct aq_ptp_s *aq_ptp) in aq_ptp_extts_pin_ctrl() argument
452 struct aq_nic_s *aq_nic = aq_ptp->aq_nic; in aq_ptp_extts_pin_ctrl()
453 u32 enable = aq_ptp->extts_pin_enabled; in aq_ptp_extts_pin_ctrl()
463 struct aq_ptp_s *aq_ptp = container_of(ptp, struct aq_ptp_s, ptp_info); in aq_ptp_extts_pin_configure() local
470 aq_ptp->extts_pin_enabled = !!on; in aq_ptp_extts_pin_configure()
472 aq_ptp->poll_timeout_ms = POLL_SYNC_TIMER_MS; in aq_ptp_extts_pin_configure()
473 cancel_delayed_work_sync(&aq_ptp->poll_sync); in aq_ptp_extts_pin_configure()
474 schedule_delayed_work(&aq_ptp->poll_sync, in aq_ptp_extts_pin_configure()
475 msecs_to_jiffies(aq_ptp->poll_timeout_ms)); in aq_ptp_extts_pin_configure()
478 aq_ptp_extts_pin_ctrl(aq_ptp); in aq_ptp_extts_pin_configure()
537 struct aq_ptp_s *aq_ptp = aq_nic->aq_ptp; in aq_ptp_tx_hwtstamp() local
538 struct sk_buff *skb = aq_ptp_skb_get(&aq_ptp->skb_ring); in aq_ptp_tx_hwtstamp()
546 timestamp += atomic_read(&aq_ptp->offset_egress); in aq_ptp_tx_hwtstamp()
547 aq_ptp_convert_to_hwtstamp(aq_ptp, &hwtstamp, timestamp); in aq_ptp_tx_hwtstamp()
551 aq_ptp_tx_timeout_update(aq_ptp); in aq_ptp_tx_hwtstamp()
562 static void aq_ptp_rx_hwtstamp(struct aq_ptp_s *aq_ptp, struct sk_buff *skb, in aq_ptp_rx_hwtstamp() argument
565 timestamp -= atomic_read(&aq_ptp->offset_ingress); in aq_ptp_rx_hwtstamp()
566 aq_ptp_convert_to_hwtstamp(aq_ptp, skb_hwtstamps(skb), timestamp); in aq_ptp_rx_hwtstamp()
569 void aq_ptp_hwtstamp_config_get(struct aq_ptp_s *aq_ptp, in aq_ptp_hwtstamp_config_get() argument
572 *config = aq_ptp->hwtstamp_config; in aq_ptp_hwtstamp_config_get()
575 static void aq_ptp_prepare_filters(struct aq_ptp_s *aq_ptp) in aq_ptp_prepare_filters() argument
577 aq_ptp->udp_filter.cmd = HW_ATL_RX_ENABLE_FLTR_L3L4 | in aq_ptp_prepare_filters()
583 aq_ptp->ptp_rx.idx << HW_ATL_RX_QUEUE_FL3L4_SHIFT; in aq_ptp_prepare_filters()
584 aq_ptp->udp_filter.p_dst = PTP_EV_PORT; in aq_ptp_prepare_filters()
586 aq_ptp->eth_type_filter.ethertype = ETH_P_1588; in aq_ptp_prepare_filters()
587 aq_ptp->eth_type_filter.queue = aq_ptp->ptp_rx.idx; in aq_ptp_prepare_filters()
590 int aq_ptp_hwtstamp_config_set(struct aq_ptp_s *aq_ptp, in aq_ptp_hwtstamp_config_set() argument
593 struct aq_nic_s *aq_nic = aq_ptp->aq_nic; in aq_ptp_hwtstamp_config_set()
600 aq_ptp_prepare_filters(aq_ptp); in aq_ptp_hwtstamp_config_set()
603 &aq_ptp->udp_filter); in aq_ptp_hwtstamp_config_set()
607 &aq_ptp->eth_type_filter); in aq_ptp_hwtstamp_config_set()
611 aq_ptp->udp_filter.cmd &= ~HW_ATL_RX_ENABLE_FLTR_L3L4; in aq_ptp_hwtstamp_config_set()
614 &aq_ptp->udp_filter); in aq_ptp_hwtstamp_config_set()
618 &aq_ptp->eth_type_filter); in aq_ptp_hwtstamp_config_set()
626 aq_ptp->hwtstamp_config = *config; in aq_ptp_hwtstamp_config_set()
633 struct aq_ptp_s *aq_ptp = aq_nic->aq_ptp; in aq_ptp_ring() local
635 if (!aq_ptp) in aq_ptp_ring()
638 return &aq_ptp->ptp_tx == ring || in aq_ptp_ring()
639 &aq_ptp->ptp_rx == ring || &aq_ptp->hwts_rx == ring; in aq_ptp_ring()
645 struct aq_ptp_s *aq_ptp = aq_nic->aq_ptp; in aq_ptp_extract_ts() local
651 aq_ptp_rx_hwtstamp(aq_ptp, skb, timestamp); in aq_ptp_extract_ts()
658 struct aq_ptp_s *aq_ptp = container_of(napi, struct aq_ptp_s, napi); in aq_ptp_poll() local
659 struct aq_nic_s *aq_nic = aq_ptp->aq_nic; in aq_ptp_poll()
666 &aq_ptp->ptp_tx); in aq_ptp_poll()
670 if (aq_ptp->ptp_tx.sw_head != aq_ptp->ptp_tx.hw_head) { in aq_ptp_poll()
671 aq_ring_tx_clean(&aq_ptp->ptp_tx); in aq_ptp_poll()
678 &aq_ptp->hwts_rx); in aq_ptp_poll()
682 if (aq_ptp->hwts_rx.sw_head != aq_ptp->hwts_rx.hw_head) { in aq_ptp_poll()
683 aq_ring_hwts_rx_clean(&aq_ptp->hwts_rx, aq_nic); in aq_ptp_poll()
686 &aq_ptp->hwts_rx); in aq_ptp_poll()
695 &aq_ptp->ptp_rx); in aq_ptp_poll()
699 if (aq_ptp->ptp_rx.sw_head != aq_ptp->ptp_rx.hw_head) { in aq_ptp_poll()
702 err = aq_ring_rx_clean(&aq_ptp->ptp_rx, napi, &work_done, budget); in aq_ptp_poll()
706 sw_tail_old = aq_ptp->ptp_rx.sw_tail; in aq_ptp_poll()
707 err = aq_ring_rx_fill(&aq_ptp->ptp_rx); in aq_ptp_poll()
712 &aq_ptp->ptp_rx, in aq_ptp_poll()
724 BIT_ULL(aq_ptp->ptp_ring_param.vec_idx)); in aq_ptp_poll()
733 struct aq_ptp_s *aq_ptp = private; in aq_ptp_isr() local
736 if (!aq_ptp) { in aq_ptp_isr()
740 napi_schedule(&aq_ptp->napi); in aq_ptp_isr()
748 struct aq_ptp_s *aq_ptp = aq_nic->aq_ptp; in aq_ptp_xmit() local
749 struct aq_ring_s *ring = &aq_ptp->ptp_tx; in aq_ptp_xmit()
770 err = aq_ptp_skb_put(&aq_ptp->skb_ring, skb); in aq_ptp_xmit()
777 aq_ptp_tx_timeout_start(aq_ptp); in aq_ptp_xmit()
780 spin_lock_irqsave(&aq_nic->aq_ptp->ptp_ring_lock, irq_flags); in aq_ptp_xmit()
795 spin_unlock_irqrestore(&aq_nic->aq_ptp->ptp_ring_lock, irq_flags); in aq_ptp_xmit()
803 struct aq_ptp_s *aq_ptp = aq_nic->aq_ptp; in aq_ptp_service_task() local
805 if (!aq_ptp) in aq_ptp_service_task()
808 aq_ptp_tx_timeout_check(aq_ptp); in aq_ptp_service_task()
814 struct aq_ptp_s *aq_ptp = aq_nic->aq_ptp; in aq_ptp_irq_alloc() local
817 if (!aq_ptp) in aq_ptp_irq_alloc()
821 err = request_irq(pci_irq_vector(pdev, aq_ptp->idx_vector), in aq_ptp_irq_alloc()
822 aq_ptp_isr, 0, aq_nic->ndev->name, aq_ptp); in aq_ptp_irq_alloc()
834 struct aq_ptp_s *aq_ptp = aq_nic->aq_ptp; in aq_ptp_irq_free() local
837 if (!aq_ptp) in aq_ptp_irq_free()
840 free_irq(pci_irq_vector(pdev, aq_ptp->idx_vector), aq_ptp); in aq_ptp_irq_free()
845 struct aq_ptp_s *aq_ptp = aq_nic->aq_ptp; in aq_ptp_ring_init() local
848 if (!aq_ptp) in aq_ptp_ring_init()
851 err = aq_ring_init(&aq_ptp->ptp_tx, ATL_RING_TX); in aq_ptp_ring_init()
855 &aq_ptp->ptp_tx, in aq_ptp_ring_init()
856 &aq_ptp->ptp_ring_param); in aq_ptp_ring_init()
860 err = aq_ring_init(&aq_ptp->ptp_rx, ATL_RING_RX); in aq_ptp_ring_init()
864 &aq_ptp->ptp_rx, in aq_ptp_ring_init()
865 &aq_ptp->ptp_ring_param); in aq_ptp_ring_init()
869 err = aq_ring_rx_fill(&aq_ptp->ptp_rx); in aq_ptp_ring_init()
873 &aq_ptp->ptp_rx, in aq_ptp_ring_init()
878 err = aq_ring_init(&aq_ptp->hwts_rx, ATL_RING_RX); in aq_ptp_ring_init()
882 &aq_ptp->hwts_rx, in aq_ptp_ring_init()
883 &aq_ptp->ptp_ring_param); in aq_ptp_ring_init()
887 &aq_ptp->hwts_rx); in aq_ptp_ring_init()
894 aq_ring_rx_deinit(&aq_ptp->ptp_rx); in aq_ptp_ring_init()
901 struct aq_ptp_s *aq_ptp = aq_nic->aq_ptp; in aq_ptp_ring_start() local
904 if (!aq_ptp) in aq_ptp_ring_start()
907 err = aq_nic->aq_hw_ops->hw_ring_tx_start(aq_nic->aq_hw, &aq_ptp->ptp_tx); in aq_ptp_ring_start()
911 err = aq_nic->aq_hw_ops->hw_ring_rx_start(aq_nic->aq_hw, &aq_ptp->ptp_rx); in aq_ptp_ring_start()
916 &aq_ptp->hwts_rx); in aq_ptp_ring_start()
920 napi_enable(&aq_ptp->napi); in aq_ptp_ring_start()
928 struct aq_ptp_s *aq_ptp = aq_nic->aq_ptp; in aq_ptp_ring_stop() local
930 if (!aq_ptp) in aq_ptp_ring_stop()
933 aq_nic->aq_hw_ops->hw_ring_tx_stop(aq_nic->aq_hw, &aq_ptp->ptp_tx); in aq_ptp_ring_stop()
934 aq_nic->aq_hw_ops->hw_ring_rx_stop(aq_nic->aq_hw, &aq_ptp->ptp_rx); in aq_ptp_ring_stop()
936 aq_nic->aq_hw_ops->hw_ring_rx_stop(aq_nic->aq_hw, &aq_ptp->hwts_rx); in aq_ptp_ring_stop()
938 napi_disable(&aq_ptp->napi); in aq_ptp_ring_stop()
943 struct aq_ptp_s *aq_ptp = aq_nic->aq_ptp; in aq_ptp_ring_deinit() local
945 if (!aq_ptp || !aq_ptp->ptp_tx.aq_nic || !aq_ptp->ptp_rx.aq_nic) in aq_ptp_ring_deinit()
948 aq_ring_tx_clean(&aq_ptp->ptp_tx); in aq_ptp_ring_deinit()
949 aq_ring_rx_deinit(&aq_ptp->ptp_rx); in aq_ptp_ring_deinit()
954 struct aq_ptp_s *aq_ptp = aq_nic->aq_ptp; in aq_ptp_ring_alloc() local
960 if (!aq_ptp) in aq_ptp_ring_alloc()
965 ring = aq_ring_tx_alloc(&aq_ptp->ptp_tx, aq_nic, in aq_ptp_ring_alloc()
974 ring = aq_ring_rx_alloc(&aq_ptp->ptp_rx, aq_nic, in aq_ptp_ring_alloc()
981 hwts = aq_ring_hwts_rx_alloc(&aq_ptp->hwts_rx, aq_nic, PTP_HWST_RING_IDX, in aq_ptp_ring_alloc()
989 err = aq_ptp_skb_ring_init(&aq_ptp->skb_ring, aq_nic->aq_nic_cfg.rxds); in aq_ptp_ring_alloc()
995 aq_ptp->ptp_ring_param.vec_idx = aq_ptp->idx_vector; in aq_ptp_ring_alloc()
996 aq_ptp->ptp_ring_param.cpu = aq_ptp->ptp_ring_param.vec_idx + in aq_ptp_ring_alloc()
998 cpumask_set_cpu(aq_ptp->ptp_ring_param.cpu, in aq_ptp_ring_alloc()
999 &aq_ptp->ptp_ring_param.affinity_mask); in aq_ptp_ring_alloc()
1004 aq_ring_free(&aq_ptp->hwts_rx); in aq_ptp_ring_alloc()
1006 aq_ring_free(&aq_ptp->ptp_rx); in aq_ptp_ring_alloc()
1008 aq_ring_free(&aq_ptp->ptp_tx); in aq_ptp_ring_alloc()
1015 struct aq_ptp_s *aq_ptp = aq_nic->aq_ptp; in aq_ptp_ring_free() local
1017 if (!aq_ptp) in aq_ptp_ring_free()
1020 aq_ring_free(&aq_ptp->ptp_tx); in aq_ptp_ring_free()
1021 aq_ring_free(&aq_ptp->ptp_rx); in aq_ptp_ring_free()
1022 aq_ring_free(&aq_ptp->hwts_rx); in aq_ptp_ring_free()
1024 aq_ptp_skb_ring_release(&aq_ptp->skb_ring); in aq_ptp_ring_free()
1153 struct aq_ptp_s *aq_ptp = aq_nic->aq_ptp; in aq_ptp_clock_init() local
1157 aq_ptp_settime(&aq_ptp->ptp_info, &ts); in aq_ptp_clock_init()
1167 struct aq_ptp_s *aq_ptp; in aq_ptp_init() local
1171 aq_nic->aq_ptp = NULL; in aq_ptp_init()
1176 aq_nic->aq_ptp = NULL; in aq_ptp_init()
1181 aq_nic->aq_ptp = NULL; in aq_ptp_init()
1188 aq_nic->aq_ptp = NULL; in aq_ptp_init()
1194 aq_ptp = kzalloc(sizeof(*aq_ptp), GFP_KERNEL); in aq_ptp_init()
1195 if (!aq_ptp) { in aq_ptp_init()
1200 aq_ptp->aq_nic = aq_nic; in aq_ptp_init()
1201 aq_ptp->a1_ptp = a1_ptp; in aq_ptp_init()
1203 spin_lock_init(&aq_ptp->ptp_lock); in aq_ptp_init()
1204 spin_lock_init(&aq_ptp->ptp_ring_lock); in aq_ptp_init()
1206 aq_ptp->ptp_info = aq_ptp_clock; in aq_ptp_init()
1207 aq_ptp_gpio_init(&aq_ptp->ptp_info, &mbox.info); in aq_ptp_init()
1208 clock = ptp_clock_register(&aq_ptp->ptp_info, &aq_nic->ndev->dev); in aq_ptp_init()
1214 aq_ptp->ptp_clock = clock; in aq_ptp_init()
1215 aq_ptp_tx_timeout_init(&aq_ptp->ptp_tx_timeout); in aq_ptp_init()
1217 atomic_set(&aq_ptp->offset_egress, 0); in aq_ptp_init()
1218 atomic_set(&aq_ptp->offset_ingress, 0); in aq_ptp_init()
1220 netif_napi_add(aq_nic_get_ndev(aq_nic), &aq_ptp->napi, in aq_ptp_init()
1223 aq_ptp->idx_vector = idx_vec; in aq_ptp_init()
1225 aq_nic->aq_ptp = aq_ptp; in aq_ptp_init()
1234 INIT_DELAYED_WORK(&aq_ptp->poll_sync, &aq_ptp_poll_sync_work_cb); in aq_ptp_init()
1235 aq_ptp->eth_type_filter.location = in aq_ptp_init()
1237 aq_ptp->udp_filter.location = in aq_ptp_init()
1243 if (aq_ptp) in aq_ptp_init()
1244 kfree(aq_ptp->ptp_info.pin_config); in aq_ptp_init()
1245 kfree(aq_ptp); in aq_ptp_init()
1246 aq_nic->aq_ptp = NULL; in aq_ptp_init()
1252 struct aq_ptp_s *aq_ptp = aq_nic->aq_ptp; in aq_ptp_unregister() local
1254 if (!aq_ptp) in aq_ptp_unregister()
1257 ptp_clock_unregister(aq_ptp->ptp_clock); in aq_ptp_unregister()
1262 struct aq_ptp_s *aq_ptp = aq_nic->aq_ptp; in aq_ptp_free() local
1264 if (!aq_ptp) in aq_ptp_free()
1268 aq_ptp->eth_type_filter.location); in aq_ptp_free()
1270 aq_ptp->udp_filter.location); in aq_ptp_free()
1271 cancel_delayed_work_sync(&aq_ptp->poll_sync); in aq_ptp_free()
1277 kfree(aq_ptp->ptp_info.pin_config); in aq_ptp_free()
1279 netif_napi_del(&aq_ptp->napi); in aq_ptp_free()
1280 kfree(aq_ptp); in aq_ptp_free()
1281 aq_nic->aq_ptp = NULL; in aq_ptp_free()
1284 struct ptp_clock *aq_ptp_get_ptp_clock(struct aq_ptp_s *aq_ptp) in aq_ptp_get_ptp_clock() argument
1286 return aq_ptp->ptp_clock; in aq_ptp_get_ptp_clock()
1300 static void aq_ptp_start_work(struct aq_ptp_s *aq_ptp) in aq_ptp_start_work() argument
1302 if (aq_ptp->extts_pin_enabled) { in aq_ptp_start_work()
1303 aq_ptp->poll_timeout_ms = POLL_SYNC_TIMER_MS; in aq_ptp_start_work()
1304 aq_ptp->last_sync1588_ts = in aq_ptp_start_work()
1305 aq_ptp_get_sync1588_ts(aq_ptp->aq_nic); in aq_ptp_start_work()
1306 schedule_delayed_work(&aq_ptp->poll_sync, in aq_ptp_start_work()
1307 msecs_to_jiffies(aq_ptp->poll_timeout_ms)); in aq_ptp_start_work()
1313 struct aq_ptp_s *aq_ptp = aq_nic->aq_ptp; in aq_ptp_link_change() local
1315 if (!aq_ptp) in aq_ptp_link_change()
1319 aq_ptp_start_work(aq_ptp); in aq_ptp_link_change()
1321 cancel_delayed_work_sync(&aq_ptp->poll_sync); in aq_ptp_link_change()
1326 static bool aq_ptp_sync_ts_updated(struct aq_ptp_s *aq_ptp, u64 *new_ts) in aq_ptp_sync_ts_updated() argument
1328 struct aq_nic_s *aq_nic = aq_ptp->aq_nic; in aq_ptp_sync_ts_updated()
1334 if (sync_ts != aq_ptp->last_sync1588_ts) { in aq_ptp_sync_ts_updated()
1353 static int aq_ptp_check_sync1588(struct aq_ptp_s *aq_ptp) in aq_ptp_check_sync1588() argument
1355 struct aq_nic_s *aq_nic = aq_ptp->aq_nic; in aq_ptp_check_sync1588()
1359 if (aq_ptp_sync_ts_updated(aq_ptp, &sync_ts)) { in aq_ptp_check_sync1588()
1360 if (aq_ptp->extts_pin_enabled) { in aq_ptp_check_sync1588()
1366 ptp_event.index = aq_ptp->ptp_info.n_pins - 1; in aq_ptp_check_sync1588()
1370 ptp_clock_event(aq_ptp->ptp_clock, &ptp_event); in aq_ptp_check_sync1588()
1373 aq_ptp->last_sync1588_ts = sync_ts; in aq_ptp_check_sync1588()
1382 struct aq_ptp_s *aq_ptp = container_of(dw, struct aq_ptp_s, poll_sync); in aq_ptp_poll_sync_work_cb() local
1384 aq_ptp_check_sync1588(aq_ptp); in aq_ptp_poll_sync_work_cb()
1386 if (aq_ptp->extts_pin_enabled) { in aq_ptp_poll_sync_work_cb()
1387 unsigned long timeout = msecs_to_jiffies(aq_ptp->poll_timeout_ms); in aq_ptp_poll_sync_work_cb()
1389 schedule_delayed_work(&aq_ptp->poll_sync, timeout); in aq_ptp_poll_sync_work_cb()
1395 if (!aq_nic->aq_ptp) in aq_ptp_get_ring_cnt()
1399 return (aq_nic->aq_ptp->a1_ptp && ring_type == ATL_RING_RX) ? 2 : 1; in aq_ptp_get_ring_cnt()
1404 struct aq_ptp_s *aq_ptp = aq_nic->aq_ptp; in aq_ptp_get_stats() local
1407 if (!aq_ptp) in aq_ptp_get_stats()
1410 count = aq_ring_fill_stats_data(&aq_ptp->ptp_rx, data); in aq_ptp_get_stats()
1412 count = aq_ring_fill_stats_data(&aq_ptp->ptp_tx, data); in aq_ptp_get_stats()
1415 if (aq_ptp->a1_ptp) { in aq_ptp_get_stats()
1417 count = aq_ring_fill_stats_data(&aq_ptp->hwts_rx, data); in aq_ptp_get_stats()