Lines Matching refs:pfvf
52 static int otx2_config_hw_tx_tstamp(struct otx2_nic *pfvf, bool enable);
53 static int otx2_config_hw_rx_tstamp(struct otx2_nic *pfvf, bool enable);
459 pf = vf_mbox->pfvf; in otx2_pfvf_mbox_handler()
493 struct otx2_nic *pf = vf_mbox->pfvf; in otx2_pfvf_mbox_up_handler()
619 mbox->pfvf = pf; in otx2_pfvf_mbox_init()
819 pf = af_mbox->pfvf; in otx2_pfaf_mbox_handler()
965 struct otx2_nic *pf = af_mbox->pfvf; in otx2_pfaf_mbox_up_handler()
1123 mbox->pfvf = pf; in otx2_pfaf_mbox_init()
1186 int otx2_reset_mac_stats(struct otx2_nic *pfvf) in otx2_reset_mac_stats() argument
1191 mutex_lock(&pfvf->mbox.lock); in otx2_reset_mac_stats()
1192 req = otx2_mbox_alloc_msg_cgx_stats_rst(&pfvf->mbox); in otx2_reset_mac_stats()
1194 mutex_unlock(&pfvf->mbox.lock); in otx2_reset_mac_stats()
1198 err = otx2_sync_mbox_msg(&pfvf->mbox); in otx2_reset_mac_stats()
1199 mutex_unlock(&pfvf->mbox.lock); in otx2_reset_mac_stats()
1749 static bool otx2_promisc_use_mce_list(struct otx2_nic *pfvf) in otx2_promisc_use_mce_list() argument
1754 if (is_otx2_vf(pfvf->pcifunc)) in otx2_promisc_use_mce_list()
1758 for (vf = 0; vf < pci_num_vf(pfvf->pdev); vf++) in otx2_promisc_use_mce_list()
1759 if (pfvf->vf_configs[vf].trusted) in otx2_promisc_use_mce_list()
1803 static void otx2_set_irq_coalesce(struct otx2_nic *pfvf) in otx2_set_irq_coalesce() argument
1807 for (cint = 0; cint < pfvf->hw.cint_cnt; cint++) in otx2_set_irq_coalesce()
1808 otx2_config_irq_coalescing(pfvf, cint); in otx2_set_irq_coalesce()
1815 struct otx2_nic *pfvf; in otx2_dim_work() local
1821 pfvf = (struct otx2_nic *)cq_poll->dev; in otx2_dim_work()
1822 pfvf->hw.cq_time_wait = (cur_moder.usec > CQ_TIMER_THRESH_MAX) ? in otx2_dim_work()
1824 pfvf->hw.cq_ecount_wait = (cur_moder.pkts > NAPI_POLL_WEIGHT) ? in otx2_dim_work()
1826 otx2_set_irq_coalesce(pfvf); in otx2_dim_work()
2304 static int otx2_config_hw_rx_tstamp(struct otx2_nic *pfvf, bool enable) in otx2_config_hw_rx_tstamp() argument
2309 if (pfvf->flags & OTX2_FLAG_RX_TSTAMP_ENABLED && enable) in otx2_config_hw_rx_tstamp()
2312 mutex_lock(&pfvf->mbox.lock); in otx2_config_hw_rx_tstamp()
2314 req = otx2_mbox_alloc_msg_cgx_ptp_rx_enable(&pfvf->mbox); in otx2_config_hw_rx_tstamp()
2316 req = otx2_mbox_alloc_msg_cgx_ptp_rx_disable(&pfvf->mbox); in otx2_config_hw_rx_tstamp()
2318 mutex_unlock(&pfvf->mbox.lock); in otx2_config_hw_rx_tstamp()
2322 err = otx2_sync_mbox_msg(&pfvf->mbox); in otx2_config_hw_rx_tstamp()
2324 mutex_unlock(&pfvf->mbox.lock); in otx2_config_hw_rx_tstamp()
2328 mutex_unlock(&pfvf->mbox.lock); in otx2_config_hw_rx_tstamp()
2330 pfvf->flags |= OTX2_FLAG_RX_TSTAMP_ENABLED; in otx2_config_hw_rx_tstamp()
2332 pfvf->flags &= ~OTX2_FLAG_RX_TSTAMP_ENABLED; in otx2_config_hw_rx_tstamp()
2336 static int otx2_config_hw_tx_tstamp(struct otx2_nic *pfvf, bool enable) in otx2_config_hw_tx_tstamp() argument
2341 if (pfvf->flags & OTX2_FLAG_TX_TSTAMP_ENABLED && enable) in otx2_config_hw_tx_tstamp()
2344 mutex_lock(&pfvf->mbox.lock); in otx2_config_hw_tx_tstamp()
2346 req = otx2_mbox_alloc_msg_nix_lf_ptp_tx_enable(&pfvf->mbox); in otx2_config_hw_tx_tstamp()
2348 req = otx2_mbox_alloc_msg_nix_lf_ptp_tx_disable(&pfvf->mbox); in otx2_config_hw_tx_tstamp()
2350 mutex_unlock(&pfvf->mbox.lock); in otx2_config_hw_tx_tstamp()
2354 err = otx2_sync_mbox_msg(&pfvf->mbox); in otx2_config_hw_tx_tstamp()
2356 mutex_unlock(&pfvf->mbox.lock); in otx2_config_hw_tx_tstamp()
2360 mutex_unlock(&pfvf->mbox.lock); in otx2_config_hw_tx_tstamp()
2362 pfvf->flags |= OTX2_FLAG_TX_TSTAMP_ENABLED; in otx2_config_hw_tx_tstamp()
2364 pfvf->flags &= ~OTX2_FLAG_TX_TSTAMP_ENABLED; in otx2_config_hw_tx_tstamp()
2370 struct otx2_nic *pfvf = netdev_priv(netdev); in otx2_config_hwtstamp() local
2373 if (!pfvf->ptp) in otx2_config_hwtstamp()
2381 if (pfvf->flags & OTX2_FLAG_PTP_ONESTEP_SYNC) in otx2_config_hwtstamp()
2382 pfvf->flags &= ~OTX2_FLAG_PTP_ONESTEP_SYNC; in otx2_config_hwtstamp()
2384 cancel_delayed_work(&pfvf->ptp->synctstamp_work); in otx2_config_hwtstamp()
2385 otx2_config_hw_tx_tstamp(pfvf, false); in otx2_config_hwtstamp()
2388 if (!test_bit(CN10K_PTP_ONESTEP, &pfvf->hw.cap_flag)) in otx2_config_hwtstamp()
2390 pfvf->flags |= OTX2_FLAG_PTP_ONESTEP_SYNC; in otx2_config_hwtstamp()
2391 schedule_delayed_work(&pfvf->ptp->synctstamp_work, in otx2_config_hwtstamp()
2395 otx2_config_hw_tx_tstamp(pfvf, true); in otx2_config_hwtstamp()
2403 otx2_config_hw_rx_tstamp(pfvf, false); in otx2_config_hwtstamp()
2419 otx2_config_hw_rx_tstamp(pfvf, true); in otx2_config_hwtstamp()
2426 memcpy(&pfvf->tstamp, &config, sizeof(config)); in otx2_config_hwtstamp()
2435 struct otx2_nic *pfvf = netdev_priv(netdev); in otx2_ioctl() local
2436 struct hwtstamp_config *cfg = &pfvf->tstamp; in otx2_ioctl()