Lines Matching refs:pf
231 static void i40e_partition_setting_complaint(struct i40e_pf *pf) in i40e_partition_setting_complaint() argument
233 dev_info(&pf->pdev->dev, in i40e_partition_setting_complaint()
462 struct i40e_pf *pf = np->vsi->back; in i40e_get_settings() local
463 struct i40e_hw *hw = &pf->hw; in i40e_get_settings()
546 struct i40e_pf *pf = np->vsi->back; in i40e_set_settings() local
548 struct i40e_hw *hw = &pf->hw; in i40e_set_settings()
560 i40e_partition_setting_complaint(pf); in i40e_set_settings()
564 if (vsi != pf->vsi[pf->lan_vsi]) in i40e_set_settings()
702 struct i40e_pf *pf = np->vsi->back; in i40e_nway_reset() local
703 struct i40e_hw *hw = &pf->hw; in i40e_nway_reset()
710 pf->hw.aq.asq_last_status); in i40e_nway_reset()
725 struct i40e_pf *pf = np->vsi->back; in i40e_get_pauseparam() local
726 struct i40e_hw *hw = &pf->hw; in i40e_get_pauseparam()
760 struct i40e_pf *pf = np->vsi->back; in i40e_set_pauseparam() local
762 struct i40e_hw *hw = &pf->hw; in i40e_set_pauseparam()
774 i40e_partition_setting_complaint(pf); in i40e_set_pauseparam()
778 if (vsi != pf->vsi[pf->lan_vsi]) in i40e_set_pauseparam()
788 if (!test_bit(__I40E_DOWN, &pf->state) && in i40e_set_pauseparam()
837 if (!test_bit(__I40E_DOWN, &pf->state)) { in i40e_set_pauseparam()
840 if (!test_bit(__I40E_DOWN, &pf->state)) in i40e_set_pauseparam()
850 struct i40e_pf *pf = np->vsi->back; in i40e_get_msglevel() local
852 return pf->msg_enable; in i40e_get_msglevel()
858 struct i40e_pf *pf = np->vsi->back; in i40e_set_msglevel() local
861 pf->hw.debug_mask = data; in i40e_set_msglevel()
862 pf->msg_enable = data; in i40e_set_msglevel()
880 struct i40e_pf *pf = np->vsi->back; in i40e_get_regs() local
881 struct i40e_hw *hw = &pf->hw; in i40e_get_regs()
912 struct i40e_pf *pf = np->vsi->back; in i40e_get_eeprom() local
938 dev_info(&pf->pdev->dev, in i40e_get_eeprom()
956 dev_info(&pf->pdev->dev, in i40e_get_eeprom()
976 dev_info(&pf->pdev->dev, in i40e_get_eeprom()
982 dev_info(&pf->pdev->dev, in i40e_get_eeprom()
987 dev_info(&pf->pdev->dev, in i40e_get_eeprom()
1020 struct i40e_pf *pf = np->vsi->back; in i40e_set_eeprom() local
1035 if (test_bit(__I40E_RESET_RECOVERY_PENDING, &pf->state) || in i40e_set_eeprom()
1036 test_bit(__I40E_RESET_INTR_RECEIVED, &pf->state)) in i40e_set_eeprom()
1045 dev_info(&pf->pdev->dev, in i40e_set_eeprom()
1059 struct i40e_pf *pf = vsi->back; in i40e_get_drvinfo() local
1064 strlcpy(drvinfo->fw_version, i40e_fw_version_str(&pf->hw), in i40e_get_drvinfo()
1066 strlcpy(drvinfo->bus_info, pci_name(pf->pdev), in i40e_get_drvinfo()
1075 struct i40e_pf *pf = np->vsi->back; in i40e_get_ringparam() local
1076 struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi]; in i40e_get_ringparam()
1094 struct i40e_pf *pf = vsi->back; in i40e_set_ringparam() local
1120 while (test_and_set_bit(__I40E_CONFIG_BUSY, &pf->state)) in i40e_set_ringparam()
1232 clear_bit(__I40E_CONFIG_BUSY, &pf->state); in i40e_set_ringparam()
1241 struct i40e_pf *pf = vsi->back; in i40e_get_sset_count() local
1247 if (vsi == pf->vsi[pf->lan_vsi] && pf->hw.partition_id == 1) { in i40e_get_sset_count()
1250 if (pf->lan_veb != I40E_NO_VEB) in i40e_get_sset_count()
1269 struct i40e_pf *pf = vsi->back; in i40e_get_ethtool_stats() local
1320 if (vsi != pf->vsi[pf->lan_vsi] || pf->hw.partition_id != 1) in i40e_get_ethtool_stats()
1323 if (pf->lan_veb != I40E_NO_VEB) { in i40e_get_ethtool_stats()
1324 struct i40e_veb *veb = pf->veb[pf->lan_veb]; in i40e_get_ethtool_stats()
1333 p = (char *)pf + i40e_gstrings_stats[j].stat_offset; in i40e_get_ethtool_stats()
1338 data[i++] = pf->stats.priority_xon_tx[j]; in i40e_get_ethtool_stats()
1339 data[i++] = pf->stats.priority_xoff_tx[j]; in i40e_get_ethtool_stats()
1342 data[i++] = pf->stats.priority_xon_rx[j]; in i40e_get_ethtool_stats()
1343 data[i++] = pf->stats.priority_xoff_rx[j]; in i40e_get_ethtool_stats()
1346 data[i++] = pf->stats.priority_xon_2_xoff[j]; in i40e_get_ethtool_stats()
1354 struct i40e_pf *pf = vsi->back; in i40e_get_strings() local
1393 if (vsi != pf->vsi[pf->lan_vsi] || pf->hw.partition_id != 1) in i40e_get_strings()
1396 if (pf->lan_veb != I40E_NO_VEB) { in i40e_get_strings()
1446 struct i40e_pf *pf = i40e_netdev_to_pf(dev); in i40e_get_ts_info() local
1449 if (!(pf->flags & I40E_FLAG_PTP)) in i40e_get_ts_info()
1459 if (pf->ptp_clock) in i40e_get_ts_info()
1460 info->phc_index = ptp_clock_index(pf->ptp_clock); in i40e_get_ts_info()
1485 struct i40e_pf *pf = np->vsi->back; in i40e_link_test() local
1487 netif_info(pf, hw, netdev, "link test\n"); in i40e_link_test()
1488 if (i40e_get_link_status(&pf->hw)) in i40e_link_test()
1499 struct i40e_pf *pf = np->vsi->back; in i40e_reg_test() local
1501 netif_info(pf, hw, netdev, "register test\n"); in i40e_reg_test()
1502 *data = i40e_diag_reg_test(&pf->hw); in i40e_reg_test()
1510 struct i40e_pf *pf = np->vsi->back; in i40e_eeprom_test() local
1512 netif_info(pf, hw, netdev, "eeprom test\n"); in i40e_eeprom_test()
1513 *data = i40e_diag_eeprom_test(&pf->hw); in i40e_eeprom_test()
1516 pf->hw.nvmupd_state = I40E_NVMUPD_STATE_INIT; in i40e_eeprom_test()
1524 struct i40e_pf *pf = np->vsi->back; in i40e_intr_test() local
1525 u16 swc_old = pf->sw_int_count; in i40e_intr_test()
1527 netif_info(pf, hw, netdev, "interrupt test\n"); in i40e_intr_test()
1528 wr32(&pf->hw, I40E_PFINT_DYN_CTL0, in i40e_intr_test()
1535 *data = (swc_old == pf->sw_int_count); in i40e_intr_test()
1543 struct i40e_pf *pf = np->vsi->back; in i40e_loopback_test() local
1545 netif_info(pf, hw, netdev, "loopback test not implemented\n"); in i40e_loopback_test()
1556 struct i40e_pf *pf = np->vsi->back; in i40e_diag_test() local
1560 netif_info(pf, drv, netdev, "offline testing starting\n"); in i40e_diag_test()
1562 set_bit(__I40E_TESTING, &pf->state); in i40e_diag_test()
1568 i40e_do_reset(pf, (1 << __I40E_PF_RESET_REQUESTED)); in i40e_diag_test()
1589 clear_bit(__I40E_TESTING, &pf->state); in i40e_diag_test()
1590 i40e_do_reset(pf, (1 << __I40E_PF_RESET_REQUESTED)); in i40e_diag_test()
1596 netif_info(pf, drv, netdev, "online testing starting\n"); in i40e_diag_test()
1608 netif_info(pf, drv, netdev, "testing finished\n"); in i40e_diag_test()
1615 struct i40e_pf *pf = np->vsi->back; in i40e_get_wol() local
1616 struct i40e_hw *hw = &pf->hw; in i40e_get_wol()
1626 wol->wolopts = (pf->wol_en ? WAKE_MAGIC : 0); in i40e_get_wol()
1638 struct i40e_pf *pf = np->vsi->back; in i40e_set_wol() local
1640 struct i40e_hw *hw = &pf->hw; in i40e_set_wol()
1645 i40e_partition_setting_complaint(pf); in i40e_set_wol()
1649 if (vsi != pf->vsi[pf->lan_vsi]) in i40e_set_wol()
1662 if (pf->wol_en != !!wol->wolopts) { in i40e_set_wol()
1663 pf->wol_en = !!wol->wolopts; in i40e_set_wol()
1664 device_set_wakeup_enable(&pf->pdev->dev, pf->wol_en); in i40e_set_wol()
1674 struct i40e_pf *pf = np->vsi->back; in i40e_set_phys_id() local
1675 struct i40e_hw *hw = &pf->hw; in i40e_set_phys_id()
1680 pf->led_status = i40e_led_get(hw); in i40e_set_phys_id()
1689 i40e_led_set(hw, pf->led_status, false); in i40e_set_phys_id()
1730 struct i40e_pf *pf = vsi->back; in i40e_set_coalesce() local
1731 struct i40e_hw *hw = &pf->hw; in i40e_set_coalesce()
1745 netif_info(pf, drv, netdev, "rx-usecs=0, need to disable adaptive-rx for a complete disable\n"); in i40e_set_coalesce()
1747 netif_info(pf, drv, netdev, "Invalid value, rx-usecs range is 0-8160\n"); in i40e_set_coalesce()
1757 netif_info(pf, drv, netdev, "tx-usecs=0, need to disable adaptive-tx for a complete disable\n"); in i40e_set_coalesce()
1759 netif_info(pf, drv, netdev, in i40e_set_coalesce()
1793 static int i40e_get_rss_hash_opts(struct i40e_pf *pf, struct ethtool_rxnfc *cmd) in i40e_get_rss_hash_opts() argument
1797 if (pf->vsi[pf->lan_vsi]->rxnfc.data != 0) { in i40e_get_rss_hash_opts()
1798 cmd->data = pf->vsi[pf->lan_vsi]->rxnfc.data; in i40e_get_rss_hash_opts()
1799 cmd->flow_type = pf->vsi[pf->lan_vsi]->rxnfc.flow_type; in i40e_get_rss_hash_opts()
1844 static int i40e_get_ethtool_fdir_all(struct i40e_pf *pf, in i40e_get_ethtool_fdir_all() argument
1853 cmd->data = i40e_get_fd_cnt_all(pf); in i40e_get_ethtool_fdir_all()
1856 &pf->fdir_filter_list, fdir_node) { in i40e_get_ethtool_fdir_all()
1879 static int i40e_get_ethtool_fdir_entry(struct i40e_pf *pf, in i40e_get_ethtool_fdir_entry() argument
1888 &pf->fdir_filter_list, fdir_node) { in i40e_get_ethtool_fdir_entry()
1916 if (rule->dest_vsi != pf->vsi[pf->lan_vsi]->id) { in i40e_get_ethtool_fdir_entry()
1919 vsi = i40e_find_vsi_from_id(pf, rule->dest_vsi); in i40e_get_ethtool_fdir_entry()
1941 struct i40e_pf *pf = vsi->back; in i40e_get_rxnfc() local
1950 ret = i40e_get_rss_hash_opts(pf, cmd); in i40e_get_rxnfc()
1953 cmd->rule_cnt = pf->fdir_pf_active_filters; in i40e_get_rxnfc()
1955 cmd->data = i40e_get_fd_cnt_all(pf); in i40e_get_rxnfc()
1959 ret = i40e_get_ethtool_fdir_entry(pf, cmd); in i40e_get_rxnfc()
1962 ret = i40e_get_ethtool_fdir_all(pf, cmd, rule_locs); in i40e_get_rxnfc()
1978 static int i40e_set_rss_hash_opt(struct i40e_pf *pf, struct ethtool_rxnfc *nfc) in i40e_set_rss_hash_opt() argument
1980 struct i40e_hw *hw = &pf->hw; in i40e_set_rss_hash_opt()
2084 pf->vsi[pf->lan_vsi]->rxnfc = *nfc; in i40e_set_rss_hash_opt()
2125 struct i40e_pf *pf = vsi->back; in i40e_update_ethtool_fdir_entry() local
2133 &pf->fdir_filter_list, fdir_node) { in i40e_update_ethtool_fdir_entry()
2148 pf->fdir_pf_active_filters--; in i40e_update_ethtool_fdir_entry()
2165 &pf->fdir_filter_list); in i40e_update_ethtool_fdir_entry()
2168 pf->fdir_pf_active_filters++; in i40e_update_ethtool_fdir_entry()
2188 struct i40e_pf *pf = vsi->back; in i40e_del_fdir_entry() local
2191 if (test_bit(__I40E_RESET_RECOVERY_PENDING, &pf->state) || in i40e_del_fdir_entry()
2192 test_bit(__I40E_RESET_INTR_RECEIVED, &pf->state)) in i40e_del_fdir_entry()
2195 if (test_bit(__I40E_FD_FLUSH_REQUESTED, &pf->state)) in i40e_del_fdir_entry()
2200 i40e_fdir_check_and_reenable(pf); in i40e_del_fdir_entry()
2217 struct i40e_pf *pf; in i40e_add_fdir_ethtool() local
2224 pf = vsi->back; in i40e_add_fdir_ethtool()
2226 if (!(pf->flags & I40E_FLAG_FD_SB_ENABLED)) in i40e_add_fdir_ethtool()
2229 if (pf->auto_disable_flags & I40E_FLAG_FD_SB_ENABLED) in i40e_add_fdir_ethtool()
2232 if (test_bit(__I40E_RESET_RECOVERY_PENDING, &pf->state) || in i40e_add_fdir_ethtool()
2233 test_bit(__I40E_RESET_INTR_RECEIVED, &pf->state)) in i40e_add_fdir_ethtool()
2236 if (test_bit(__I40E_FD_FLUSH_REQUESTED, &pf->state)) in i40e_add_fdir_ethtool()
2241 if (fsp->location >= (pf->hw.func_caps.fd_filters_best_effort + in i40e_add_fdir_ethtool()
2242 pf->hw.func_caps.fd_filters_guaranteed)) { in i40e_add_fdir_ethtool()
2268 input->cnt_index = pf->fd_sb_cnt_idx; in i40e_add_fdir_ethtool()
2281 if (ntohl(fsp->h_ext.data[1]) >= pf->num_alloc_vfs) { in i40e_add_fdir_ethtool()
2282 netif_info(pf, drv, vsi->netdev, "Invalid VF id\n"); in i40e_add_fdir_ethtool()
2287 input->dest_vsi = pf->vf[vf_id].lan_vsi_id; in i40e_add_fdir_ethtool()
2288 if (input->q_index >= pf->vf[vf_id].num_queue_pairs) { in i40e_add_fdir_ethtool()
2289 netif_info(pf, drv, vsi->netdev, "Invalid queue id\n"); in i40e_add_fdir_ethtool()
2315 struct i40e_pf *pf = vsi->back; in i40e_set_rxnfc() local
2320 ret = i40e_set_rss_hash_opt(pf, cmd); in i40e_set_rxnfc()
2360 struct i40e_pf *pf = vsi->back; in i40e_get_channels() local
2366 ch->other_count = (pf->flags & I40E_FLAG_FD_SB_ENABLED) ? 1 : 0; in i40e_get_channels()
2387 struct i40e_pf *pf = vsi->back; in i40e_set_channels() local
2399 if (ch->other_count != ((pf->flags & I40E_FLAG_FD_SB_ENABLED) ? 1 : 0)) in i40e_set_channels()
2412 new_count = i40e_reconfig_rss_queues(pf, count); in i40e_set_channels()
2447 struct i40e_pf *pf = vsi->back; in i40e_get_rxfh() local
2448 struct i40e_hw *hw = &pf->hw; in i40e_get_rxfh()
2492 struct i40e_pf *pf = vsi->back; in i40e_set_rxfh() local
2493 struct i40e_hw *hw = &pf->hw; in i40e_set_rxfh()
2537 struct i40e_pf *pf = vsi->back; in i40e_get_priv_flags() local
2540 ret_flags |= pf->hw.func_caps.npar_enable ? in i40e_get_priv_flags()