Lines Matching refs:pfvf
51 static int otx2_config_hw_tx_tstamp(struct otx2_nic *pfvf, bool enable);
52 static int otx2_config_hw_rx_tstamp(struct otx2_nic *pfvf, bool enable);
471 pf = vf_mbox->pfvf; in otx2_pfvf_mbox_handler()
506 struct otx2_nic *pf = vf_mbox->pfvf; in otx2_pfvf_mbox_up_handler()
633 mbox->pfvf = pf; in otx2_pfvf_mbox_init()
831 pf = af_mbox->pfvf; in otx2_pfaf_mbox_handler()
944 struct otx2_nic *pf = af_mbox->pfvf; in otx2_pfaf_mbox_up_handler()
1064 mbox->pfvf = pf; in otx2_pfaf_mbox_init()
1653 static bool otx2_promisc_use_mce_list(struct otx2_nic *pfvf) in otx2_promisc_use_mce_list() argument
1658 if (is_otx2_vf(pfvf->pcifunc)) in otx2_promisc_use_mce_list()
1662 for (vf = 0; vf < pci_num_vf(pfvf->pdev); vf++) in otx2_promisc_use_mce_list()
1663 if (pfvf->vf_configs[vf].trusted) in otx2_promisc_use_mce_list()
1707 static void otx2_set_irq_coalesce(struct otx2_nic *pfvf) in otx2_set_irq_coalesce() argument
1711 for (cint = 0; cint < pfvf->hw.cint_cnt; cint++) in otx2_set_irq_coalesce()
1712 otx2_config_irq_coalescing(pfvf, cint); in otx2_set_irq_coalesce()
1719 struct otx2_nic *pfvf; in otx2_dim_work() local
1725 pfvf = (struct otx2_nic *)cq_poll->dev; in otx2_dim_work()
1726 pfvf->hw.cq_time_wait = (cur_moder.usec > CQ_TIMER_THRESH_MAX) ? in otx2_dim_work()
1728 pfvf->hw.cq_ecount_wait = (cur_moder.pkts > NAPI_POLL_WEIGHT) ? in otx2_dim_work()
1730 otx2_set_irq_coalesce(pfvf); in otx2_dim_work()
2172 static int otx2_config_hw_rx_tstamp(struct otx2_nic *pfvf, bool enable) in otx2_config_hw_rx_tstamp() argument
2177 if (pfvf->flags & OTX2_FLAG_RX_TSTAMP_ENABLED && enable) in otx2_config_hw_rx_tstamp()
2180 mutex_lock(&pfvf->mbox.lock); in otx2_config_hw_rx_tstamp()
2182 req = otx2_mbox_alloc_msg_cgx_ptp_rx_enable(&pfvf->mbox); in otx2_config_hw_rx_tstamp()
2184 req = otx2_mbox_alloc_msg_cgx_ptp_rx_disable(&pfvf->mbox); in otx2_config_hw_rx_tstamp()
2186 mutex_unlock(&pfvf->mbox.lock); in otx2_config_hw_rx_tstamp()
2190 err = otx2_sync_mbox_msg(&pfvf->mbox); in otx2_config_hw_rx_tstamp()
2192 mutex_unlock(&pfvf->mbox.lock); in otx2_config_hw_rx_tstamp()
2196 mutex_unlock(&pfvf->mbox.lock); in otx2_config_hw_rx_tstamp()
2198 pfvf->flags |= OTX2_FLAG_RX_TSTAMP_ENABLED; in otx2_config_hw_rx_tstamp()
2200 pfvf->flags &= ~OTX2_FLAG_RX_TSTAMP_ENABLED; in otx2_config_hw_rx_tstamp()
2204 static int otx2_config_hw_tx_tstamp(struct otx2_nic *pfvf, bool enable) in otx2_config_hw_tx_tstamp() argument
2209 if (pfvf->flags & OTX2_FLAG_TX_TSTAMP_ENABLED && enable) in otx2_config_hw_tx_tstamp()
2212 mutex_lock(&pfvf->mbox.lock); in otx2_config_hw_tx_tstamp()
2214 req = otx2_mbox_alloc_msg_nix_lf_ptp_tx_enable(&pfvf->mbox); in otx2_config_hw_tx_tstamp()
2216 req = otx2_mbox_alloc_msg_nix_lf_ptp_tx_disable(&pfvf->mbox); in otx2_config_hw_tx_tstamp()
2218 mutex_unlock(&pfvf->mbox.lock); in otx2_config_hw_tx_tstamp()
2222 err = otx2_sync_mbox_msg(&pfvf->mbox); in otx2_config_hw_tx_tstamp()
2224 mutex_unlock(&pfvf->mbox.lock); in otx2_config_hw_tx_tstamp()
2228 mutex_unlock(&pfvf->mbox.lock); in otx2_config_hw_tx_tstamp()
2230 pfvf->flags |= OTX2_FLAG_TX_TSTAMP_ENABLED; in otx2_config_hw_tx_tstamp()
2232 pfvf->flags &= ~OTX2_FLAG_TX_TSTAMP_ENABLED; in otx2_config_hw_tx_tstamp()
2238 struct otx2_nic *pfvf = netdev_priv(netdev); in otx2_config_hwtstamp() local
2241 if (!pfvf->ptp) in otx2_config_hwtstamp()
2249 if (pfvf->flags & OTX2_FLAG_PTP_ONESTEP_SYNC) in otx2_config_hwtstamp()
2250 pfvf->flags &= ~OTX2_FLAG_PTP_ONESTEP_SYNC; in otx2_config_hwtstamp()
2252 cancel_delayed_work(&pfvf->ptp->synctstamp_work); in otx2_config_hwtstamp()
2253 otx2_config_hw_tx_tstamp(pfvf, false); in otx2_config_hwtstamp()
2256 if (!test_bit(CN10K_PTP_ONESTEP, &pfvf->hw.cap_flag)) in otx2_config_hwtstamp()
2258 pfvf->flags |= OTX2_FLAG_PTP_ONESTEP_SYNC; in otx2_config_hwtstamp()
2259 schedule_delayed_work(&pfvf->ptp->synctstamp_work, in otx2_config_hwtstamp()
2263 otx2_config_hw_tx_tstamp(pfvf, true); in otx2_config_hwtstamp()
2271 otx2_config_hw_rx_tstamp(pfvf, false); in otx2_config_hwtstamp()
2287 otx2_config_hw_rx_tstamp(pfvf, true); in otx2_config_hwtstamp()
2294 memcpy(&pfvf->tstamp, &config, sizeof(config)); in otx2_config_hwtstamp()
2303 struct otx2_nic *pfvf = netdev_priv(netdev); in otx2_ioctl() local
2304 struct hwtstamp_config *cfg = &pfvf->tstamp; in otx2_ioctl()