Lines Matching refs:pfvf

46 static int otx2_config_hw_tx_tstamp(struct otx2_nic *pfvf, bool enable);
47 static int otx2_config_hw_rx_tstamp(struct otx2_nic *pfvf, bool enable);
456 pf = vf_mbox->pfvf; in otx2_pfvf_mbox_handler()
491 struct otx2_nic *pf = vf_mbox->pfvf; in otx2_pfvf_mbox_up_handler()
608 mbox->pfvf = pf; in otx2_pfvf_mbox_init()
807 pf = af_mbox->pfvf; in otx2_pfaf_mbox_handler()
910 struct otx2_nic *pf = af_mbox->pfvf; in otx2_pfaf_mbox_up_handler()
1030 mbox->pfvf = pf; in otx2_pfaf_mbox_init()
1769 static int otx2_config_hw_rx_tstamp(struct otx2_nic *pfvf, bool enable) in otx2_config_hw_rx_tstamp() argument
1774 if (pfvf->flags & OTX2_FLAG_RX_TSTAMP_ENABLED && enable) in otx2_config_hw_rx_tstamp()
1777 mutex_lock(&pfvf->mbox.lock); in otx2_config_hw_rx_tstamp()
1779 req = otx2_mbox_alloc_msg_cgx_ptp_rx_enable(&pfvf->mbox); in otx2_config_hw_rx_tstamp()
1781 req = otx2_mbox_alloc_msg_cgx_ptp_rx_disable(&pfvf->mbox); in otx2_config_hw_rx_tstamp()
1783 mutex_unlock(&pfvf->mbox.lock); in otx2_config_hw_rx_tstamp()
1787 err = otx2_sync_mbox_msg(&pfvf->mbox); in otx2_config_hw_rx_tstamp()
1789 mutex_unlock(&pfvf->mbox.lock); in otx2_config_hw_rx_tstamp()
1793 mutex_unlock(&pfvf->mbox.lock); in otx2_config_hw_rx_tstamp()
1795 pfvf->flags |= OTX2_FLAG_RX_TSTAMP_ENABLED; in otx2_config_hw_rx_tstamp()
1797 pfvf->flags &= ~OTX2_FLAG_RX_TSTAMP_ENABLED; in otx2_config_hw_rx_tstamp()
1801 static int otx2_config_hw_tx_tstamp(struct otx2_nic *pfvf, bool enable) in otx2_config_hw_tx_tstamp() argument
1806 if (pfvf->flags & OTX2_FLAG_TX_TSTAMP_ENABLED && enable) in otx2_config_hw_tx_tstamp()
1809 mutex_lock(&pfvf->mbox.lock); in otx2_config_hw_tx_tstamp()
1811 req = otx2_mbox_alloc_msg_nix_lf_ptp_tx_enable(&pfvf->mbox); in otx2_config_hw_tx_tstamp()
1813 req = otx2_mbox_alloc_msg_nix_lf_ptp_tx_disable(&pfvf->mbox); in otx2_config_hw_tx_tstamp()
1815 mutex_unlock(&pfvf->mbox.lock); in otx2_config_hw_tx_tstamp()
1819 err = otx2_sync_mbox_msg(&pfvf->mbox); in otx2_config_hw_tx_tstamp()
1821 mutex_unlock(&pfvf->mbox.lock); in otx2_config_hw_tx_tstamp()
1825 mutex_unlock(&pfvf->mbox.lock); in otx2_config_hw_tx_tstamp()
1827 pfvf->flags |= OTX2_FLAG_TX_TSTAMP_ENABLED; in otx2_config_hw_tx_tstamp()
1829 pfvf->flags &= ~OTX2_FLAG_TX_TSTAMP_ENABLED; in otx2_config_hw_tx_tstamp()
1835 struct otx2_nic *pfvf = netdev_priv(netdev); in otx2_config_hwtstamp() local
1838 if (!pfvf->ptp) in otx2_config_hwtstamp()
1850 otx2_config_hw_tx_tstamp(pfvf, false); in otx2_config_hwtstamp()
1853 otx2_config_hw_tx_tstamp(pfvf, true); in otx2_config_hwtstamp()
1861 otx2_config_hw_rx_tstamp(pfvf, false); in otx2_config_hwtstamp()
1877 otx2_config_hw_rx_tstamp(pfvf, true); in otx2_config_hwtstamp()
1884 memcpy(&pfvf->tstamp, &config, sizeof(config)); in otx2_config_hwtstamp()
1892 struct otx2_nic *pfvf = netdev_priv(netdev); in otx2_ioctl() local
1893 struct hwtstamp_config *cfg = &pfvf->tstamp; in otx2_ioctl()