Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next

Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates 2015-03-09

This series contains updates to i40e and i40evf.

Greg cleans up some "hello world" strings which were left around from
early development.

Shannon modifies the drive to make sure the sizeof() calls are taking
the size of the actual struct that we care about. Also updates the
NVMUpdate read/write so that it is less noisy when logging. This was
because the NVMUpdate tool does not necessarily know the ReadOnly map of
the current NVM image, and must try reading and writing words that may be
protected. This generates an error out of the Firmware request that the
driver logs. Unfortunately, this ended up spitting out hundreds of
bogus read/write error messages. If a user wants the noisy logging,
the change can be overridden by enabling the NVM update debugging.

Mitch fixes a possible deadlock issue where if a reset occurred when the
netdev is closed, the reset task will hang in napi_disable. Added
ethtool RSS support as suggested by Ben Hutchings.

Jesse fixes a bug introduced in the force writeback code, where the
interrupt rate was set to 0 (maximum) by accident. The driver must
correctly set the NOITR fields to avoid IT update as a side effect
of triggering the software interrupt.

I provided a simple cleanup to make the use of PF/VF consistent, which
was reported by Joe Perches.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+313 -187
+9 -7
drivers/net/ethernet/intel/i40e/i40e.h
··· 177 177 #define I40E_FDIR_BUFFER_HEAD_ROOM 32 178 178 #define I40E_FDIR_BUFFER_HEAD_ROOM_FOR_ATR (I40E_FDIR_BUFFER_HEAD_ROOM * 4) 179 179 180 + #define I40E_HKEY_ARRAY_SIZE ((I40E_PFQF_HKEY_MAX_INDEX + 1) * 4) 181 + 180 182 enum i40e_fd_stat_idx { 181 183 I40E_FD_STAT_ATR, 182 184 I40E_FD_STAT_SB, ··· 242 240 bool fc_autoneg_status; 243 241 244 242 u16 eeprom_version; 245 - u16 num_vmdq_vsis; /* num vmdq vsis this pf has set up */ 243 + u16 num_vmdq_vsis; /* num vmdq vsis this PF has set up */ 246 244 u16 num_vmdq_qps; /* num queue pairs per vmdq pool */ 247 245 u16 num_vmdq_msix; /* num queue vectors per vmdq pool */ 248 - u16 num_req_vfs; /* num vfs requested for this vf */ 249 - u16 num_vf_qps; /* num queue pairs per vf */ 246 + u16 num_req_vfs; /* num VFs requested for this VF */ 247 + u16 num_vf_qps; /* num queue pairs per VF */ 250 248 #ifdef I40E_FCOE 251 - u16 num_fcoe_qps; /* num fcoe queues this pf has set up */ 249 + u16 num_fcoe_qps; /* num fcoe queues this PF has set up */ 252 250 u16 num_fcoe_msix; /* num queue vectors per fcoe pool */ 253 251 #endif /* I40E_FCOE */ 254 - u16 num_lan_qps; /* num lan queues this pf has set up */ 255 - u16 num_lan_msix; /* num queue vectors for the base pf vsi */ 252 + u16 num_lan_qps; /* num lan queues this PF has set up */ 253 + u16 num_lan_msix; /* num queue vectors for the base PF vsi */ 256 254 int queues_left; /* queues left unclaimed */ 257 255 u16 rss_size; /* num queues in the RSS array */ 258 256 u16 rss_size_max; /* HW defined max RSS queues */ ··· 614 612 615 613 /** 616 614 * i40e_get_fd_cnt_all - get the total FD filter space available 617 - * @pf: pointer to the pf struct 615 + * @pf: pointer to the PF struct 618 616 **/ 619 617 static inline int i40e_get_fd_cnt_all(struct i40e_pf *pf) 620 618 {
+5 -5
drivers/net/ethernet/intel/i40e/i40e_common.c
··· 691 691 /** 692 692 * i40e_pre_tx_queue_cfg - pre tx queue configure 693 693 * @hw: pointer to the HW structure 694 - * @queue: target pf queue index 694 + * @queue: target PF queue index 695 695 * @enable: state change request 696 696 * 697 697 * Handles hw requirement to indicate intention to enable ··· 955 955 u32 val; 956 956 u32 eol = 0x7ff; 957 957 958 - /* get number of interrupts, queues, and vfs */ 958 + /* get number of interrupts, queues, and VFs */ 959 959 val = rd32(hw, I40E_GLPCI_CNF2); 960 960 num_pf_int = (val & I40E_GLPCI_CNF2_MSI_X_PF_N_MASK) >> 961 961 I40E_GLPCI_CNF2_MSI_X_PF_N_SHIFT; ··· 2017 2017 if (count == 0 || !mv_list || !hw) 2018 2018 return I40E_ERR_PARAM; 2019 2019 2020 - buf_size = count * sizeof(struct i40e_aqc_add_macvlan_element_data); 2020 + buf_size = count * sizeof(*mv_list); 2021 2021 2022 2022 /* prep the rest of the request */ 2023 2023 i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_add_macvlan); ··· 2059 2059 if (count == 0 || !mv_list || !hw) 2060 2060 return I40E_ERR_PARAM; 2061 2061 2062 - buf_size = count * sizeof(struct i40e_aqc_remove_macvlan_element_data); 2062 + buf_size = count * sizeof(*mv_list); 2063 2063 2064 2064 /* prep the rest of the request */ 2065 2065 i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_remove_macvlan); ··· 2081 2081 /** 2082 2082 * i40e_aq_send_msg_to_vf 2083 2083 * @hw: pointer to the hardware structure 2084 - * @vfid: vf id to send msg 2084 + * @vfid: VF id to send msg 2085 2085 * @v_opcode: opcodes for VF-PF communication 2086 2086 * @v_retval: return error code 2087 2087 * @msg: pointer to the msg buffer
+2 -2
drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c
··· 223 223 224 224 /** 225 225 * i40e_dcbnl_del_app - Delete APP on all VSIs 226 - * @pf: the corresponding pf 226 + * @pf: the corresponding PF 227 227 * @app: APP to delete 228 228 * 229 229 * Delete given APP from all the VSIs for given PF ··· 268 268 269 269 /** 270 270 * i40e_dcbnl_flush_apps - Delete all removed APPs 271 - * @pf: the corresponding pf 271 + * @pf: the corresponding PF 272 272 * @old_cfg: old DCBX configuration data 273 273 * @new_cfg: new DCBX configuration data 274 274 *
+17 -12
drivers/net/ethernet/intel/i40e/i40e_debugfs.c
··· 35 35 36 36 /** 37 37 * i40e_dbg_find_vsi - searches for the vsi with the given seid 38 - * @pf - the pf structure to search for the vsi 38 + * @pf - the PF structure to search for the vsi 39 39 * @seid - seid of the vsi it is searching for 40 40 **/ 41 41 static struct i40e_vsi *i40e_dbg_find_vsi(struct i40e_pf *pf, int seid) ··· 54 54 55 55 /** 56 56 * i40e_dbg_find_veb - searches for the veb with the given seid 57 - * @pf - the pf structure to search for the veb 57 + * @pf - the PF structure to search for the veb 58 58 * @seid - seid of the veb it is searching for 59 59 **/ 60 60 static struct i40e_veb *i40e_dbg_find_veb(struct i40e_pf *pf, int seid) ··· 112 112 113 113 /** 114 114 * i40e_dbg_prep_dump_buf 115 - * @pf: the pf we're working with 115 + * @pf: the PF we're working with 116 116 * @buflen: the desired buffer length 117 117 * 118 118 * Return positive if success, 0 if failed ··· 318 318 * setup, adding or removing filters, or other things. Many of 319 319 * these will be useful for some forms of unit testing. 320 320 **************************************************************/ 321 - static char i40e_dbg_command_buf[256] = "hello world"; 321 + static char i40e_dbg_command_buf[256] = ""; 322 322 323 323 /** 324 324 * i40e_dbg_command_read - read for command datum ··· 390 390 " netdev_registered = %i, current_netdev_flags = 0x%04x, state = %li flags = 0x%08lx\n", 391 391 vsi->netdev_registered, 392 392 vsi->current_netdev_flags, vsi->state, vsi->flags); 393 + if (vsi == pf->vsi[pf->lan_vsi]) 394 + dev_info(&pf->pdev->dev, "MAC address: %pM SAN MAC: %pM Port MAC: %pM\n", 395 + pf->hw.mac.addr, 396 + pf->hw.mac.san_addr, 397 + pf->hw.mac.port_addr); 393 398 list_for_each_entry(f, &vsi->mac_filter_list, list) { 394 399 dev_info(&pf->pdev->dev, 395 400 " mac_filter_list: %pM vid=%d, is_netdev=%d is_vf=%d counter=%d\n", ··· 680 675 vsi->info.resp_reserved[8], vsi->info.resp_reserved[9], 681 676 vsi->info.resp_reserved[10], vsi->info.resp_reserved[11]); 682 677 if (vsi->back) 683 - dev_info(&pf->pdev->dev, " pf = %p\n", vsi->back); 678 + dev_info(&pf->pdev->dev, " PF = %p\n", vsi->back); 684 679 dev_info(&pf->pdev->dev, " idx = %d\n", vsi->idx); 685 680 dev_info(&pf->pdev->dev, 686 681 " tc_config: numtc = %d, enabled_tc = 0x%x\n", ··· 951 946 952 947 /** 953 948 * i40e_dbg_cmd_fd_ctrl - Enable/disable FD sideband/ATR 954 - * @pf: the pf that would be altered 949 + * @pf: the PF that would be altered 955 950 * @flag: flag that needs enabling or disabling 956 951 * @enable: Enable/disable FD SD/ATR 957 952 **/ ··· 963 958 pf->flags &= ~flag; 964 959 pf->auto_disable_flags |= flag; 965 960 } 966 - dev_info(&pf->pdev->dev, "requesting a pf reset\n"); 961 + dev_info(&pf->pdev->dev, "requesting a PF reset\n"); 967 962 i40e_do_reset_safe(pf, (1 << __I40E_PF_RESET_REQUESTED)); 968 963 } 969 964 ··· 1945 1940 * The netdev_ops entry in debugfs is for giving the driver commands 1946 1941 * to be executed from the netdev operations. 1947 1942 **************************************************************/ 1948 - static char i40e_dbg_netdev_ops_buf[256] = "hello world"; 1943 + static char i40e_dbg_netdev_ops_buf[256] = ""; 1949 1944 1950 1945 /** 1951 1946 * i40e_dbg_netdev_ops - read for netdev_ops datum ··· 2133 2128 }; 2134 2129 2135 2130 /** 2136 - * i40e_dbg_pf_init - setup the debugfs directory for the pf 2137 - * @pf: the pf that is starting up 2131 + * i40e_dbg_pf_init - setup the debugfs directory for the PF 2132 + * @pf: the PF that is starting up 2138 2133 **/ 2139 2134 void i40e_dbg_pf_init(struct i40e_pf *pf) 2140 2135 { ··· 2170 2165 } 2171 2166 2172 2167 /** 2173 - * i40e_dbg_pf_exit - clear out the pf's debugfs entries 2174 - * @pf: the pf that is stopping 2168 + * i40e_dbg_pf_exit - clear out the PF's debugfs entries 2169 + * @pf: the PF that is stopping 2175 2170 **/ 2176 2171 void i40e_dbg_pf_exit(struct i40e_pf *pf) 2177 2172 {
+115 -2
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
··· 917 917 918 918 cmd = (struct i40e_nvm_access *)eeprom; 919 919 ret_val = i40e_nvmupd_command(hw, cmd, bytes, &errno); 920 - if (ret_val) 920 + if (ret_val && 921 + ((hw->aq.asq_last_status != I40E_AQ_RC_EACCES) || 922 + (hw->debug_mask & I40E_DEBUG_NVM))) 921 923 dev_info(&pf->pdev->dev, 922 924 "NVMUpdate read failed err=%d status=0x%x errno=%d module=%d offset=0x%x size=%d\n", 923 925 ret_val, hw->aq.asq_last_status, errno, ··· 1023 1021 1024 1022 cmd = (struct i40e_nvm_access *)eeprom; 1025 1023 ret_val = i40e_nvmupd_command(hw, cmd, bytes, &errno); 1026 - if (ret_val && hw->aq.asq_last_status != I40E_AQ_RC_EBUSY) 1024 + if (ret_val && 1025 + ((hw->aq.asq_last_status != I40E_AQ_RC_EPERM && 1026 + hw->aq.asq_last_status != I40E_AQ_RC_EBUSY) || 1027 + (hw->debug_mask & I40E_DEBUG_NVM))) 1027 1028 dev_info(&pf->pdev->dev, 1028 1029 "NVMUpdate write failed err=%d status=0x%x errno=%d module=%d offset=0x%x size=%d\n", 1029 1030 ret_val, hw->aq.asq_last_status, errno, ··· 2375 2370 return -EINVAL; 2376 2371 } 2377 2372 2373 + #define I40E_HLUT_ARRAY_SIZE ((I40E_PFQF_HLUT_MAX_INDEX + 1) * 4) 2374 + /** 2375 + * i40e_get_rxfh_key_size - get the RSS hash key size 2376 + * @netdev: network interface device structure 2377 + * 2378 + * Returns the table size. 2379 + **/ 2380 + static u32 i40e_get_rxfh_key_size(struct net_device *netdev) 2381 + { 2382 + return I40E_HKEY_ARRAY_SIZE; 2383 + } 2384 + 2385 + /** 2386 + * i40e_get_rxfh_indir_size - get the rx flow hash indirection table size 2387 + * @netdev: network interface device structure 2388 + * 2389 + * Returns the table size. 2390 + **/ 2391 + static u32 i40e_get_rxfh_indir_size(struct net_device *netdev) 2392 + { 2393 + return I40E_HLUT_ARRAY_SIZE; 2394 + } 2395 + 2396 + static int i40e_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key, 2397 + u8 *hfunc) 2398 + { 2399 + struct i40e_netdev_priv *np = netdev_priv(netdev); 2400 + struct i40e_vsi *vsi = np->vsi; 2401 + struct i40e_pf *pf = vsi->back; 2402 + struct i40e_hw *hw = &pf->hw; 2403 + u32 reg_val; 2404 + int i, j; 2405 + 2406 + if (hfunc) 2407 + *hfunc = ETH_RSS_HASH_TOP; 2408 + 2409 + if (!indir) 2410 + return 0; 2411 + 2412 + for (i = 0, j = 0; i <= I40E_PFQF_HLUT_MAX_INDEX; i++) { 2413 + reg_val = rd32(hw, I40E_PFQF_HLUT(i)); 2414 + indir[j++] = reg_val & 0xff; 2415 + indir[j++] = (reg_val >> 8) & 0xff; 2416 + indir[j++] = (reg_val >> 16) & 0xff; 2417 + indir[j++] = (reg_val >> 24) & 0xff; 2418 + } 2419 + 2420 + if (key) { 2421 + for (i = 0, j = 0; i <= I40E_PFQF_HKEY_MAX_INDEX; i++) { 2422 + reg_val = rd32(hw, I40E_PFQF_HKEY(i)); 2423 + key[j++] = (u8)(reg_val & 0xff); 2424 + key[j++] = (u8)((reg_val >> 8) & 0xff); 2425 + key[j++] = (u8)((reg_val >> 16) & 0xff); 2426 + key[j++] = (u8)((reg_val >> 24) & 0xff); 2427 + } 2428 + } 2429 + return 0; 2430 + } 2431 + 2432 + /** 2433 + * i40e_set_rxfh - set the rx flow hash indirection table 2434 + * @netdev: network interface device structure 2435 + * @indir: indirection table 2436 + * @key: hash key 2437 + * 2438 + * Returns -EINVAL if the table specifies an inavlid queue id, otherwise 2439 + * returns 0 after programming the table. 2440 + **/ 2441 + static int i40e_set_rxfh(struct net_device *netdev, const u32 *indir, 2442 + const u8 *key, const u8 hfunc) 2443 + { 2444 + struct i40e_netdev_priv *np = netdev_priv(netdev); 2445 + struct i40e_vsi *vsi = np->vsi; 2446 + struct i40e_pf *pf = vsi->back; 2447 + struct i40e_hw *hw = &pf->hw; 2448 + u32 reg_val; 2449 + int i, j; 2450 + 2451 + if (hfunc != ETH_RSS_HASH_NO_CHANGE && hfunc != ETH_RSS_HASH_TOP) 2452 + return -EOPNOTSUPP; 2453 + 2454 + if (!indir) 2455 + return 0; 2456 + 2457 + for (i = 0, j = 0; i <= I40E_PFQF_HLUT_MAX_INDEX; i++) { 2458 + reg_val = indir[j++]; 2459 + reg_val |= indir[j++] << 8; 2460 + reg_val |= indir[j++] << 16; 2461 + reg_val |= indir[j++] << 24; 2462 + wr32(hw, I40E_PFQF_HLUT(i), reg_val); 2463 + } 2464 + 2465 + if (key) { 2466 + for (i = 0, j = 0; i <= I40E_PFQF_HKEY_MAX_INDEX; i++) { 2467 + reg_val = key[j++]; 2468 + reg_val |= key[j++] << 8; 2469 + reg_val |= key[j++] << 16; 2470 + reg_val |= key[j++] << 24; 2471 + wr32(hw, I40E_PFQF_HKEY(i), reg_val); 2472 + } 2473 + } 2474 + return 0; 2475 + } 2476 + 2378 2477 /** 2379 2478 * i40e_get_priv_flags - report device private flags 2380 2479 * @dev: network interface device structure ··· 2530 2421 .get_ethtool_stats = i40e_get_ethtool_stats, 2531 2422 .get_coalesce = i40e_get_coalesce, 2532 2423 .set_coalesce = i40e_set_coalesce, 2424 + .get_rxfh_key_size = i40e_get_rxfh_key_size, 2425 + .get_rxfh_indir_size = i40e_get_rxfh_indir_size, 2426 + .get_rxfh = i40e_get_rxfh, 2427 + .set_rxfh = i40e_set_rxfh, 2533 2428 .get_channels = i40e_get_channels, 2534 2429 .set_channels = i40e_set_channels, 2535 2430 .get_ts_info = i40e_get_ts_info,
+5 -5
drivers/net/ethernet/intel/i40e/i40e_fcoe.c
··· 149 149 150 150 /** 151 151 * i40e_fcoe_ddp_unmap - unmap the mapped sglist associated 152 - * @pf: pointer to pf 152 + * @pf: pointer to PF 153 153 * @ddp: sw DDP context 154 154 * 155 155 * Unmap the scatter-gather list associated with the given SW DDP context ··· 268 268 269 269 /** 270 270 * i40e_fcoe_sw_init - sets up the HW for FCoE 271 - * @pf: pointer to pf 271 + * @pf: pointer to PF 272 272 * 273 273 * Returns 0 if FCoE is supported otherwise the error code 274 274 **/ ··· 328 328 329 329 /** 330 330 * i40e_get_fcoe_tc_map - Return TC map for FCoE APP 331 - * @pf: pointer to pf 331 + * @pf: pointer to PF 332 332 * 333 333 **/ 334 334 u8 i40e_get_fcoe_tc_map(struct i40e_pf *pf) ··· 1531 1531 1532 1532 /** 1533 1533 * i40e_fcoe_vsi_setup - allocate and set up FCoE VSI 1534 - * @pf: the pf that VSI is associated with 1534 + * @pf: the PF that VSI is associated with 1535 1535 * 1536 1536 **/ 1537 1537 void i40e_fcoe_vsi_setup(struct i40e_pf *pf) ··· 1558 1558 vsi = i40e_vsi_setup(pf, I40E_VSI_FCOE, seid, 0); 1559 1559 if (vsi) { 1560 1560 dev_dbg(&pf->pdev->dev, 1561 - "Successfully created FCoE VSI seid %d id %d uplink_seid %d pf seid %d\n", 1561 + "Successfully created FCoE VSI seid %d id %d uplink_seid %d PF seid %d\n", 1562 1562 vsi->seid, vsi->id, vsi->uplink_seid, seid); 1563 1563 } else { 1564 1564 dev_info(&pf->pdev->dev, "Failed to create FCoE VSI\n");
+30 -30
drivers/net/ethernet/intel/i40e/i40e_main.c
··· 39 39 40 40 #define DRV_VERSION_MAJOR 1 41 41 #define DRV_VERSION_MINOR 2 42 - #define DRV_VERSION_BUILD 12 42 + #define DRV_VERSION_BUILD 37 43 43 #define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \ 44 44 __stringify(DRV_VERSION_MINOR) "." \ 45 45 __stringify(DRV_VERSION_BUILD) DRV_KERN ··· 450 450 } 451 451 452 452 /** 453 - * i40e_pf_reset_stats - Reset all of the stats for the given pf 453 + * i40e_pf_reset_stats - Reset all of the stats for the given PF 454 454 * @pf: the PF to be reset 455 455 **/ 456 456 void i40e_pf_reset_stats(struct i40e_pf *pf) ··· 896 896 } 897 897 898 898 /** 899 - * i40e_update_pf_stats - Update the pf statistics counters. 899 + * i40e_update_pf_stats - Update the PF statistics counters. 900 900 * @pf: the PF to be updated 901 901 **/ 902 902 static void i40e_update_pf_stats(struct i40e_pf *pf) ··· 1128 1128 * @vsi: the VSI to be searched 1129 1129 * @macaddr: the MAC address 1130 1130 * @vlan: the vlan 1131 - * @is_vf: make sure its a vf filter, else doesn't matter 1131 + * @is_vf: make sure its a VF filter, else doesn't matter 1132 1132 * @is_netdev: make sure its a netdev filter, else doesn't matter 1133 1133 * 1134 1134 * Returns ptr to the filter object or NULL ··· 1156 1156 * i40e_find_mac - Find a mac addr in the macvlan filters list 1157 1157 * @vsi: the VSI to be searched 1158 1158 * @macaddr: the MAC address we are searching for 1159 - * @is_vf: make sure its a vf filter, else doesn't matter 1159 + * @is_vf: make sure its a VF filter, else doesn't matter 1160 1160 * @is_netdev: make sure its a netdev filter, else doesn't matter 1161 1161 * 1162 1162 * Returns the first filter with the provided MAC address or NULL if ··· 1204 1204 * i40e_put_mac_in_vlan - Make macvlan filters from macaddrs and vlans 1205 1205 * @vsi: the VSI to be searched 1206 1206 * @macaddr: the mac address to be filtered 1207 - * @is_vf: true if it is a vf 1207 + * @is_vf: true if it is a VF 1208 1208 * @is_netdev: true if it is a netdev 1209 1209 * 1210 1210 * Goes through all the macvlan filters and adds a ··· 1265 1265 * @vsi: the VSI to be searched 1266 1266 * @macaddr: the MAC address 1267 1267 * @vlan: the vlan 1268 - * @is_vf: make sure its a vf filter, else doesn't matter 1268 + * @is_vf: make sure its a VF filter, else doesn't matter 1269 1269 * @is_netdev: make sure its a netdev filter, else doesn't matter 1270 1270 * 1271 1271 * Returns ptr to the filter object or NULL when no memory available. ··· 1325 1325 * @vsi: the VSI to be searched 1326 1326 * @macaddr: the MAC address 1327 1327 * @vlan: the vlan 1328 - * @is_vf: make sure it's a vf filter, else doesn't matter 1328 + * @is_vf: make sure it's a VF filter, else doesn't matter 1329 1329 * @is_netdev: make sure it's a netdev filter, else doesn't matter 1330 1330 **/ 1331 1331 void i40e_del_filter(struct i40e_vsi *vsi, ··· 1352 1352 f->counter--; 1353 1353 } 1354 1354 } else { 1355 - /* make sure we don't remove a filter in use by vf or netdev */ 1355 + /* make sure we don't remove a filter in use by VF or netdev */ 1356 1356 int min_f = 0; 1357 1357 min_f += (f->is_vf ? 1 : 0); 1358 1358 min_f += (f->is_netdev ? 1 : 0); ··· 4029 4029 #endif 4030 4030 /** 4031 4031 * i40e_get_iscsi_tc_map - Return TC map for iSCSI APP 4032 - * @pf: pointer to pf 4032 + * @pf: pointer to PF 4033 4033 * 4034 4034 * Get TC map for ISCSI PF type that will include iSCSI TC 4035 4035 * and LAN TC. ··· 4204 4204 aq_ret = i40e_aq_query_vsi_bw_config(hw, vsi->seid, &bw_config, NULL); 4205 4205 if (aq_ret) { 4206 4206 dev_info(&pf->pdev->dev, 4207 - "couldn't get pf vsi bw config, err %d, aq_err %d\n", 4207 + "couldn't get PF vsi bw config, err %d, aq_err %d\n", 4208 4208 aq_ret, pf->hw.aq.asq_last_status); 4209 4209 return -EINVAL; 4210 4210 } ··· 4214 4214 NULL); 4215 4215 if (aq_ret) { 4216 4216 dev_info(&pf->pdev->dev, 4217 - "couldn't get pf vsi ets bw config, err %d, aq_err %d\n", 4217 + "couldn't get PF vsi ets bw config, err %d, aq_err %d\n", 4218 4218 aq_ret, pf->hw.aq.asq_last_status); 4219 4219 return -EINVAL; 4220 4220 } ··· 4976 4976 4977 4977 /** 4978 4978 * i40e_fdir_filter_exit - Cleans up the Flow Director accounting 4979 - * @pf: Pointer to pf 4979 + * @pf: Pointer to PF 4980 4980 * 4981 4981 * This function destroys the hlist where all the Flow Director 4982 4982 * filters were saved. ··· 5941 5941 5942 5942 /** 5943 5943 * i40e_enable_pf_switch_lb 5944 - * @pf: pointer to the pf structure 5944 + * @pf: pointer to the PF structure 5945 5945 * 5946 5946 * enable switch loop back or die - no point in a return value 5947 5947 **/ ··· 5957 5957 aq_ret = i40e_aq_get_vsi_params(&pf->hw, &ctxt, NULL); 5958 5958 if (aq_ret) { 5959 5959 dev_info(&pf->pdev->dev, 5960 - "%s couldn't get pf vsi config, err %d, aq_err %d\n", 5960 + "%s couldn't get PF vsi config, err %d, aq_err %d\n", 5961 5961 __func__, aq_ret, pf->hw.aq.asq_last_status); 5962 5962 return; 5963 5963 } ··· 5975 5975 5976 5976 /** 5977 5977 * i40e_disable_pf_switch_lb 5978 - * @pf: pointer to the pf structure 5978 + * @pf: pointer to the PF structure 5979 5979 * 5980 5980 * disable switch loop back or die - no point in a return value 5981 5981 **/ ··· 5991 5991 aq_ret = i40e_aq_get_vsi_params(&pf->hw, &ctxt, NULL); 5992 5992 if (aq_ret) { 5993 5993 dev_info(&pf->pdev->dev, 5994 - "%s couldn't get pf vsi config, err %d, aq_err %d\n", 5994 + "%s couldn't get PF vsi config, err %d, aq_err %d\n", 5995 5995 __func__, aq_ret, pf->hw.aq.asq_last_status); 5996 5996 return; 5997 5997 } ··· 6245 6245 * i40e_prep_for_reset - prep for the core to reset 6246 6246 * @pf: board private structure 6247 6247 * 6248 - * Close up the VFs and other things in prep for pf Reset. 6248 + * Close up the VFs and other things in prep for PF Reset. 6249 6249 **/ 6250 6250 static void i40e_prep_for_reset(struct i40e_pf *pf) 6251 6251 { ··· 6471 6471 } 6472 6472 6473 6473 /** 6474 - * i40e_handle_reset_warning - prep for the pf to reset, reset and rebuild 6474 + * i40e_handle_reset_warning - prep for the PF to reset, reset and rebuild 6475 6475 * @pf: board private structure 6476 6476 * 6477 6477 * Close up the VFs and other things in prep for a Core Reset, ··· 6485 6485 6486 6486 /** 6487 6487 * i40e_handle_mdd_event 6488 - * @pf: pointer to the pf structure 6488 + * @pf: pointer to the PF structure 6489 6489 * 6490 6490 * Called from the MDD irq handler to identify possibly malicious vfs 6491 6491 **/ ··· 6514 6514 I40E_GL_MDET_TX_QUEUE_SHIFT) - 6515 6515 pf->hw.func_caps.base_queue; 6516 6516 if (netif_msg_tx_err(pf)) 6517 - dev_info(&pf->pdev->dev, "Malicious Driver Detection event 0x%02x on TX queue %d pf number 0x%02x vf number 0x%02x\n", 6517 + dev_info(&pf->pdev->dev, "Malicious Driver Detection event 0x%02x on TX queue %d PF number 0x%02x VF number 0x%02x\n", 6518 6518 event, queue, pf_num, vf_num); 6519 6519 wr32(hw, I40E_GL_MDET_TX, 0xffffffff); 6520 6520 mdd_detected = true; ··· 6917 6917 goto unlock_vsi; 6918 6918 } 6919 6919 6920 - /* updates the pf for this cleared vsi */ 6920 + /* updates the PF for this cleared vsi */ 6921 6921 i40e_put_lump(pf->qp_pile, vsi->base_queue, vsi->idx); 6922 6922 i40e_put_lump(pf->irq_pile, vsi->base_vector, vsi->idx); 6923 6923 ··· 7491 7491 struct i40e_aqc_configure_partition_bw_data bw_data; 7492 7492 i40e_status status; 7493 7493 7494 - /* Set the valid bit for this pf */ 7494 + /* Set the valid bit for this PF */ 7495 7495 bw_data.pf_valid_bits = cpu_to_le16(1 << pf->hw.pf_id); 7496 7496 bw_data.max_bw[pf->hw.pf_id] = pf->npar_max_bw & I40E_ALT_BW_VALUE_MASK; 7497 7497 bw_data.min_bw[pf->hw.pf_id] = pf->npar_min_bw & I40E_ALT_BW_VALUE_MASK; ··· 7649 7649 (pf->hw.func_caps.fd_filters_best_effort > 0)) { 7650 7650 pf->flags |= I40E_FLAG_FD_ATR_ENABLED; 7651 7651 pf->atr_sample_rate = I40E_DEFAULT_ATR_SAMPLE_RATE; 7652 - /* Setup a counter for fd_atr per pf */ 7652 + /* Setup a counter for fd_atr per PF */ 7653 7653 pf->fd_atr_cnt_idx = I40E_FD_ATR_STAT_IDX(pf->hw.pf_id); 7654 7654 if (!(pf->flags & I40E_FLAG_MFP_ENABLED)) { 7655 7655 pf->flags |= I40E_FLAG_FD_SB_ENABLED; 7656 - /* Setup a counter for fd_sb per pf */ 7656 + /* Setup a counter for fd_sb per PF */ 7657 7657 pf->fd_sb_cnt_idx = I40E_FD_SB_STAT_IDX(pf->hw.pf_id); 7658 7658 } else { 7659 7659 dev_info(&pf->pdev->dev, ··· 8257 8257 ctxt.flags = I40E_AQ_VSI_TYPE_PF; 8258 8258 if (ret) { 8259 8259 dev_info(&pf->pdev->dev, 8260 - "couldn't get pf vsi config, err %d, aq_err %d\n", 8260 + "couldn't get PF vsi config, err %d, aq_err %d\n", 8261 8261 ret, pf->hw.aq.asq_last_status); 8262 8262 return -ENOENT; 8263 8263 } ··· 9158 9158 } 9159 9159 9160 9160 /** 9161 - * i40e_setup_pf_switch_element - set pf vars based on switch type 9161 + * i40e_setup_pf_switch_element - set PF vars based on switch type 9162 9162 * @pf: board private structure 9163 9163 * @ele: element we are building info from 9164 9164 * @num_reported: total number of elements ··· 9491 9491 * i40e_setup_pf_filter_control - Setup PF static filter control 9492 9492 * @pf: PF to be setup 9493 9493 * 9494 - * i40e_setup_pf_filter_control sets up a pf's initial filter control 9494 + * i40e_setup_pf_filter_control sets up a PF's initial filter control 9495 9495 * settings. If PE/FCoE are enabled then it will also set the per PF 9496 9496 * based filter sizes required for them. It also enables Flow director, 9497 9497 * ethertype and macvlan type filter settings for the pf. ··· 9568 9568 * @pdev: PCI device information struct 9569 9569 * @ent: entry in i40e_pci_tbl 9570 9570 * 9571 - * i40e_probe initializes a pf identified by a pci_dev structure. 9572 - * The OS initialization, configuring of the pf private structure, 9571 + * i40e_probe initializes a PF identified by a pci_dev structure. 9572 + * The OS initialization, configuring of the PF private structure, 9573 9573 * and a hardware reset occur. 9574 9574 * 9575 9575 * Returns 0 on success, negative on failure
+2 -1
drivers/net/ethernet/intel/i40e/i40e_txrx.c
··· 45 45 * i40e_program_fdir_filter - Program a Flow Director filter 46 46 * @fdir_data: Packet data that will be filter parameters 47 47 * @raw_packet: the pre-allocated packet buffer for FDir 48 - * @pf: The pf pointer 48 + * @pf: The PF pointer 49 49 * @add: True for add/update, False for remove 50 50 **/ 51 51 int i40e_program_fdir_filter(struct i40e_fdir_filter *fdir_data, u8 *raw_packet, ··· 859 859 static void i40e_force_wb(struct i40e_vsi *vsi, struct i40e_q_vector *q_vector) 860 860 { 861 861 u32 val = I40E_PFINT_DYN_CTLN_INTENA_MASK | 862 + I40E_PFINT_DYN_CTLN_ITR_INDX_MASK | /* set noitr */ 862 863 I40E_PFINT_DYN_CTLN_SWINT_TRIG_MASK | 863 864 I40E_PFINT_DYN_CTLN_SW_ITR_INDX_ENA_MASK; 864 865 /* allow 00 to be written to the index */
+111 -111
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
··· 30 30 31 31 /** 32 32 * i40e_vc_disable_vf 33 - * @pf: pointer to the pf info 34 - * @vf: pointer to the vf info 33 + * @pf: pointer to the PF info 34 + * @vf: pointer to the VF info 35 35 * 36 36 * Disable the VF through a SW reset 37 37 **/ ··· 48 48 49 49 /** 50 50 * i40e_vc_isvalid_vsi_id 51 - * @vf: pointer to the vf info 52 - * @vsi_id: vf relative vsi id 51 + * @vf: pointer to the VF info 52 + * @vsi_id: VF relative VSI id 53 53 * 54 - * check for the valid vsi id 54 + * check for the valid VSI id 55 55 **/ 56 56 static inline bool i40e_vc_isvalid_vsi_id(struct i40e_vf *vf, u8 vsi_id) 57 57 { ··· 62 62 63 63 /** 64 64 * i40e_vc_isvalid_queue_id 65 - * @vf: pointer to the vf info 65 + * @vf: pointer to the VF info 66 66 * @vsi_id: vsi id 67 67 * @qid: vsi relative queue id 68 68 * ··· 78 78 79 79 /** 80 80 * i40e_vc_isvalid_vector_id 81 - * @vf: pointer to the vf info 82 - * @vector_id: vf relative vector id 81 + * @vf: pointer to the VF info 82 + * @vector_id: VF relative vector id 83 83 * 84 84 * check for the valid vector id 85 85 **/ ··· 94 94 95 95 /** 96 96 * i40e_vc_get_pf_queue_id 97 - * @vf: pointer to the vf info 97 + * @vf: pointer to the VF info 98 98 * @vsi_idx: index of VSI in PF struct 99 99 * @vsi_queue_id: vsi relative queue id 100 100 * 101 - * return pf relative queue id 101 + * return PF relative queue id 102 102 **/ 103 103 static u16 i40e_vc_get_pf_queue_id(struct i40e_vf *vf, u8 vsi_idx, 104 104 u8 vsi_queue_id) ··· 120 120 121 121 /** 122 122 * i40e_config_irq_link_list 123 - * @vf: pointer to the vf info 123 + * @vf: pointer to the VF info 124 124 * @vsi_idx: index of VSI in PF struct 125 125 * @vecmap: irq map info 126 126 * ··· 220 220 221 221 /** 222 222 * i40e_config_vsi_tx_queue 223 - * @vf: pointer to the vf info 223 + * @vf: pointer to the VF info 224 224 * @vsi_idx: index of VSI in PF struct 225 225 * @vsi_queue_id: vsi relative queue index 226 226 * @info: config. info ··· 287 287 288 288 /** 289 289 * i40e_config_vsi_rx_queue 290 - * @vf: pointer to the vf info 290 + * @vf: pointer to the VF info 291 291 * @vsi_idx: index of VSI in PF struct 292 292 * @vsi_queue_id: vsi relative queue index 293 293 * @info: config. info ··· 378 378 379 379 /** 380 380 * i40e_alloc_vsi_res 381 - * @vf: pointer to the vf info 381 + * @vf: pointer to the VF info 382 382 * @type: type of VSI to allocate 383 383 * 384 - * alloc vf vsi context & resources 384 + * alloc VF vsi context & resources 385 385 **/ 386 386 static int i40e_alloc_vsi_res(struct i40e_vf *vf, enum i40e_vsi_type type) 387 387 { ··· 394 394 395 395 if (!vsi) { 396 396 dev_err(&pf->pdev->dev, 397 - "add vsi failed for vf %d, aq_err %d\n", 397 + "add vsi failed for VF %d, aq_err %d\n", 398 398 vf->vf_id, pf->hw.aq.asq_last_status); 399 399 ret = -ENOENT; 400 400 goto error_alloc_vsi_res; ··· 443 443 444 444 /** 445 445 * i40e_enable_vf_mappings 446 - * @vf: pointer to the vf info 446 + * @vf: pointer to the VF info 447 447 * 448 - * enable vf mappings 448 + * enable VF mappings 449 449 **/ 450 450 static void i40e_enable_vf_mappings(struct i40e_vf *vf) 451 451 { ··· 493 493 494 494 /** 495 495 * i40e_disable_vf_mappings 496 - * @vf: pointer to the vf info 496 + * @vf: pointer to the VF info 497 497 * 498 - * disable vf mappings 498 + * disable VF mappings 499 499 **/ 500 500 static void i40e_disable_vf_mappings(struct i40e_vf *vf) 501 501 { ··· 513 513 514 514 /** 515 515 * i40e_free_vf_res 516 - * @vf: pointer to the vf info 516 + * @vf: pointer to the VF info 517 517 * 518 - * free vf resources 518 + * free VF resources 519 519 **/ 520 520 static void i40e_free_vf_res(struct i40e_vf *vf) 521 521 { ··· 568 568 569 569 /** 570 570 * i40e_alloc_vf_res 571 - * @vf: pointer to the vf info 571 + * @vf: pointer to the VF info 572 572 * 573 - * allocate vf resources 573 + * allocate VF resources 574 574 **/ 575 575 static int i40e_alloc_vf_res(struct i40e_vf *vf) 576 576 { ··· 586 586 set_bit(I40E_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps); 587 587 588 588 /* store the total qps number for the runtime 589 - * vf req validation 589 + * VF req validation 590 590 */ 591 591 vf->num_queue_pairs = total_queue_pairs; 592 592 593 - /* vf is now completely initialized */ 593 + /* VF is now completely initialized */ 594 594 set_bit(I40E_VF_STAT_INIT, &vf->vf_states); 595 595 596 596 error_alloc: ··· 604 604 #define VF_TRANS_PENDING_MASK 0x20 605 605 /** 606 606 * i40e_quiesce_vf_pci 607 - * @vf: pointer to the vf structure 607 + * @vf: pointer to the VF structure 608 608 * 609 609 * Wait for VF PCI transactions to be cleared after reset. Returns -EIO 610 610 * if the transactions never clear. ··· 631 631 632 632 /** 633 633 * i40e_reset_vf 634 - * @vf: pointer to the vf structure 634 + * @vf: pointer to the VF structure 635 635 * @flr: VFLR was issued or not 636 636 * 637 - * reset the vf 637 + * reset the VF 638 638 **/ 639 639 void i40e_reset_vf(struct i40e_vf *vf, bool flr) 640 640 { ··· 654 654 * just need to clean up, so don't hit the VFRTRIG register. 655 655 */ 656 656 if (!flr) { 657 - /* reset vf using VPGEN_VFRTRIG reg */ 657 + /* reset VF using VPGEN_VFRTRIG reg */ 658 658 reg = rd32(hw, I40E_VPGEN_VFRTRIG(vf->vf_id)); 659 659 reg |= I40E_VPGEN_VFRTRIG_VFSWR_MASK; 660 660 wr32(hw, I40E_VPGEN_VFRTRIG(vf->vf_id), reg); ··· 697 697 698 698 i40e_vsi_control_rings(pf->vsi[vf->lan_vsi_index], false); 699 699 complete_reset: 700 - /* reallocate vf resources to reset the VSI state */ 700 + /* reallocate VF resources to reset the VSI state */ 701 701 i40e_free_vf_res(vf); 702 702 i40e_alloc_vf_res(vf); 703 703 i40e_enable_vf_mappings(vf); ··· 711 711 712 712 /** 713 713 * i40e_free_vfs 714 - * @pf: pointer to the pf structure 714 + * @pf: pointer to the PF structure 715 715 * 716 - * free vf resources 716 + * free VF resources 717 717 **/ 718 718 void i40e_free_vfs(struct i40e_pf *pf) 719 719 { ··· 735 735 736 736 msleep(20); /* let any messages in transit get finished up */ 737 737 738 - /* free up vf resources */ 738 + /* free up VF resources */ 739 739 tmp = pf->num_alloc_vfs; 740 740 pf->num_alloc_vfs = 0; 741 741 for (i = 0; i < tmp; i++) { ··· 771 771 #ifdef CONFIG_PCI_IOV 772 772 /** 773 773 * i40e_alloc_vfs 774 - * @pf: pointer to the pf structure 775 - * @num_alloc_vfs: number of vfs to allocate 774 + * @pf: pointer to the PF structure 775 + * @num_alloc_vfs: number of VFs to allocate 776 776 * 777 - * allocate vf resources 777 + * allocate VF resources 778 778 **/ 779 779 int i40e_alloc_vfs(struct i40e_pf *pf, u16 num_alloc_vfs) 780 780 { ··· 811 811 /* assign default capabilities */ 812 812 set_bit(I40E_VIRTCHNL_VF_CAP_L2, &vfs[i].vf_caps); 813 813 vfs[i].spoofchk = true; 814 - /* vf resources get allocated during reset */ 814 + /* VF resources get allocated during reset */ 815 815 i40e_reset_vf(&vfs[i], false); 816 816 817 - /* enable vf vplan_qtable mappings */ 817 + /* enable VF vplan_qtable mappings */ 818 818 i40e_enable_vf_mappings(&vfs[i]); 819 819 } 820 820 pf->num_alloc_vfs = num_alloc_vfs; ··· 832 832 /** 833 833 * i40e_pci_sriov_enable 834 834 * @pdev: pointer to a pci_dev structure 835 - * @num_vfs: number of vfs to allocate 835 + * @num_vfs: number of VFs to allocate 836 836 * 837 837 * Enable or change the number of VFs 838 838 **/ ··· 872 872 /** 873 873 * i40e_pci_sriov_configure 874 874 * @pdev: pointer to a pci_dev structure 875 - * @num_vfs: number of vfs to allocate 875 + * @num_vfs: number of VFs to allocate 876 876 * 877 877 * Enable or change the number of VFs. Called when the user updates the number 878 878 * of VFs in sysfs. ··· 897 897 898 898 /** 899 899 * i40e_vc_send_msg_to_vf 900 - * @vf: pointer to the vf info 900 + * @vf: pointer to the VF info 901 901 * @v_opcode: virtual channel opcode 902 902 * @v_retval: virtual channel return value 903 903 * @msg: pointer to the msg buffer 904 904 * @msglen: msg length 905 905 * 906 - * send msg to vf 906 + * send msg to VF 907 907 **/ 908 908 static int i40e_vc_send_msg_to_vf(struct i40e_vf *vf, u32 v_opcode, 909 909 u32 v_retval, u8 *msg, u16 msglen) ··· 952 952 953 953 /** 954 954 * i40e_vc_send_resp_to_vf 955 - * @vf: pointer to the vf info 955 + * @vf: pointer to the VF info 956 956 * @opcode: operation code 957 957 * @retval: return value 958 958 * 959 - * send resp msg to vf 959 + * send resp msg to VF 960 960 **/ 961 961 static int i40e_vc_send_resp_to_vf(struct i40e_vf *vf, 962 962 enum i40e_virtchnl_ops opcode, ··· 967 967 968 968 /** 969 969 * i40e_vc_get_version_msg 970 - * @vf: pointer to the vf info 970 + * @vf: pointer to the VF info 971 971 * 972 - * called from the vf to request the API version used by the PF 972 + * called from the VF to request the API version used by the PF 973 973 **/ 974 974 static int i40e_vc_get_version_msg(struct i40e_vf *vf) 975 975 { ··· 985 985 986 986 /** 987 987 * i40e_vc_get_vf_resources_msg 988 - * @vf: pointer to the vf info 988 + * @vf: pointer to the VF info 989 989 * @msg: pointer to the msg buffer 990 990 * @msglen: msg length 991 991 * 992 - * called from the vf to request its resources 992 + * called from the VF to request its resources 993 993 **/ 994 994 static int i40e_vc_get_vf_resources_msg(struct i40e_vf *vf) 995 995 { ··· 1036 1036 set_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states); 1037 1037 1038 1038 err: 1039 - /* send the response back to the vf */ 1039 + /* send the response back to the VF */ 1040 1040 ret = i40e_vc_send_msg_to_vf(vf, I40E_VIRTCHNL_OP_GET_VF_RESOURCES, 1041 1041 aq_ret, (u8 *)vfres, len); 1042 1042 ··· 1046 1046 1047 1047 /** 1048 1048 * i40e_vc_reset_vf_msg 1049 - * @vf: pointer to the vf info 1049 + * @vf: pointer to the VF info 1050 1050 * @msg: pointer to the msg buffer 1051 1051 * @msglen: msg length 1052 1052 * 1053 - * called from the vf to reset itself, 1054 - * unlike other virtchnl messages, pf driver 1055 - * doesn't send the response back to the vf 1053 + * called from the VF to reset itself, 1054 + * unlike other virtchnl messages, PF driver 1055 + * doesn't send the response back to the VF 1056 1056 **/ 1057 1057 static void i40e_vc_reset_vf_msg(struct i40e_vf *vf) 1058 1058 { ··· 1062 1062 1063 1063 /** 1064 1064 * i40e_vc_config_promiscuous_mode_msg 1065 - * @vf: pointer to the vf info 1065 + * @vf: pointer to the VF info 1066 1066 * @msg: pointer to the msg buffer 1067 1067 * @msglen: msg length 1068 1068 * 1069 - * called from the vf to configure the promiscuous mode of 1070 - * vf vsis 1069 + * called from the VF to configure the promiscuous mode of 1070 + * VF vsis 1071 1071 **/ 1072 1072 static int i40e_vc_config_promiscuous_mode_msg(struct i40e_vf *vf, 1073 1073 u8 *msg, u16 msglen) ··· 1094 1094 allmulti, NULL); 1095 1095 1096 1096 error_param: 1097 - /* send the response to the vf */ 1097 + /* send the response to the VF */ 1098 1098 return i40e_vc_send_resp_to_vf(vf, 1099 1099 I40E_VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE, 1100 1100 aq_ret); ··· 1102 1102 1103 1103 /** 1104 1104 * i40e_vc_config_queues_msg 1105 - * @vf: pointer to the vf info 1105 + * @vf: pointer to the VF info 1106 1106 * @msg: pointer to the msg buffer 1107 1107 * @msglen: msg length 1108 1108 * 1109 - * called from the vf to configure the rx/tx 1109 + * called from the VF to configure the rx/tx 1110 1110 * queues 1111 1111 **/ 1112 1112 static int i40e_vc_config_queues_msg(struct i40e_vf *vf, u8 *msg, u16 msglen) ··· 1148 1148 goto error_param; 1149 1149 } 1150 1150 } 1151 - /* set vsi num_queue_pairs in use to num configured by vf */ 1151 + /* set vsi num_queue_pairs in use to num configured by VF */ 1152 1152 pf->vsi[vf->lan_vsi_index]->num_queue_pairs = qci->num_queue_pairs; 1153 1153 1154 1154 error_param: 1155 - /* send the response to the vf */ 1155 + /* send the response to the VF */ 1156 1156 return i40e_vc_send_resp_to_vf(vf, I40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES, 1157 1157 aq_ret); 1158 1158 } 1159 1159 1160 1160 /** 1161 1161 * i40e_vc_config_irq_map_msg 1162 - * @vf: pointer to the vf info 1162 + * @vf: pointer to the VF info 1163 1163 * @msg: pointer to the msg buffer 1164 1164 * @msglen: msg length 1165 1165 * 1166 - * called from the vf to configure the irq to 1166 + * called from the VF to configure the irq to 1167 1167 * queue map 1168 1168 **/ 1169 1169 static int i40e_vc_config_irq_map_msg(struct i40e_vf *vf, u8 *msg, u16 msglen) ··· 1215 1215 i40e_config_irq_link_list(vf, vsi_id, map); 1216 1216 } 1217 1217 error_param: 1218 - /* send the response to the vf */ 1218 + /* send the response to the VF */ 1219 1219 return i40e_vc_send_resp_to_vf(vf, I40E_VIRTCHNL_OP_CONFIG_IRQ_MAP, 1220 1220 aq_ret); 1221 1221 } 1222 1222 1223 1223 /** 1224 1224 * i40e_vc_enable_queues_msg 1225 - * @vf: pointer to the vf info 1225 + * @vf: pointer to the VF info 1226 1226 * @msg: pointer to the msg buffer 1227 1227 * @msglen: msg length 1228 1228 * 1229 - * called from the vf to enable all or specific queue(s) 1229 + * called from the VF to enable all or specific queue(s) 1230 1230 **/ 1231 1231 static int i40e_vc_enable_queues_msg(struct i40e_vf *vf, u8 *msg, u16 msglen) 1232 1232 { ··· 1253 1253 if (i40e_vsi_control_rings(pf->vsi[vsi_id], true)) 1254 1254 aq_ret = I40E_ERR_TIMEOUT; 1255 1255 error_param: 1256 - /* send the response to the vf */ 1256 + /* send the response to the VF */ 1257 1257 return i40e_vc_send_resp_to_vf(vf, I40E_VIRTCHNL_OP_ENABLE_QUEUES, 1258 1258 aq_ret); 1259 1259 } 1260 1260 1261 1261 /** 1262 1262 * i40e_vc_disable_queues_msg 1263 - * @vf: pointer to the vf info 1263 + * @vf: pointer to the VF info 1264 1264 * @msg: pointer to the msg buffer 1265 1265 * @msglen: msg length 1266 1266 * 1267 - * called from the vf to disable all or specific 1267 + * called from the VF to disable all or specific 1268 1268 * queue(s) 1269 1269 **/ 1270 1270 static int i40e_vc_disable_queues_msg(struct i40e_vf *vf, u8 *msg, u16 msglen) ··· 1293 1293 aq_ret = I40E_ERR_TIMEOUT; 1294 1294 1295 1295 error_param: 1296 - /* send the response to the vf */ 1296 + /* send the response to the VF */ 1297 1297 return i40e_vc_send_resp_to_vf(vf, I40E_VIRTCHNL_OP_DISABLE_QUEUES, 1298 1298 aq_ret); 1299 1299 } 1300 1300 1301 1301 /** 1302 1302 * i40e_vc_get_stats_msg 1303 - * @vf: pointer to the vf info 1303 + * @vf: pointer to the VF info 1304 1304 * @msg: pointer to the msg buffer 1305 1305 * @msglen: msg length 1306 1306 * 1307 - * called from the vf to get vsi stats 1307 + * called from the VF to get vsi stats 1308 1308 **/ 1309 1309 static int i40e_vc_get_stats_msg(struct i40e_vf *vf, u8 *msg, u16 msglen) 1310 1310 { ··· 1336 1336 stats = vsi->eth_stats; 1337 1337 1338 1338 error_param: 1339 - /* send the response back to the vf */ 1339 + /* send the response back to the VF */ 1340 1340 return i40e_vc_send_msg_to_vf(vf, I40E_VIRTCHNL_OP_GET_STATS, aq_ret, 1341 1341 (u8 *)&stats, sizeof(stats)); 1342 1342 } 1343 1343 1344 1344 /** 1345 1345 * i40e_check_vf_permission 1346 - * @vf: pointer to the vf info 1346 + * @vf: pointer to the VF info 1347 1347 * @macaddr: pointer to the MAC Address being checked 1348 1348 * 1349 1349 * Check if the VF has permission to add or delete unicast MAC address ··· 1377 1377 1378 1378 /** 1379 1379 * i40e_vc_add_mac_addr_msg 1380 - * @vf: pointer to the vf info 1380 + * @vf: pointer to the VF info 1381 1381 * @msg: pointer to the msg buffer 1382 1382 * @msglen: msg length 1383 1383 * ··· 1434 1434 dev_err(&pf->pdev->dev, "Unable to program VF MAC filters\n"); 1435 1435 1436 1436 error_param: 1437 - /* send the response to the vf */ 1437 + /* send the response to the VF */ 1438 1438 return i40e_vc_send_resp_to_vf(vf, I40E_VIRTCHNL_OP_ADD_ETHER_ADDRESS, 1439 1439 ret); 1440 1440 } 1441 1441 1442 1442 /** 1443 1443 * i40e_vc_del_mac_addr_msg 1444 - * @vf: pointer to the vf info 1444 + * @vf: pointer to the VF info 1445 1445 * @msg: pointer to the msg buffer 1446 1446 * @msglen: msg length 1447 1447 * ··· 1485 1485 dev_err(&pf->pdev->dev, "Unable to program VF MAC filters\n"); 1486 1486 1487 1487 error_param: 1488 - /* send the response to the vf */ 1488 + /* send the response to the VF */ 1489 1489 return i40e_vc_send_resp_to_vf(vf, I40E_VIRTCHNL_OP_DEL_ETHER_ADDRESS, 1490 1490 ret); 1491 1491 } 1492 1492 1493 1493 /** 1494 1494 * i40e_vc_add_vlan_msg 1495 - * @vf: pointer to the vf info 1495 + * @vf: pointer to the VF info 1496 1496 * @msg: pointer to the msg buffer 1497 1497 * @msglen: msg length 1498 1498 * ··· 1540 1540 } 1541 1541 1542 1542 error_param: 1543 - /* send the response to the vf */ 1543 + /* send the response to the VF */ 1544 1544 return i40e_vc_send_resp_to_vf(vf, I40E_VIRTCHNL_OP_ADD_VLAN, aq_ret); 1545 1545 } 1546 1546 1547 1547 /** 1548 1548 * i40e_vc_remove_vlan_msg 1549 - * @vf: pointer to the vf info 1549 + * @vf: pointer to the VF info 1550 1550 * @msg: pointer to the msg buffer 1551 1551 * @msglen: msg length 1552 1552 * ··· 1591 1591 } 1592 1592 1593 1593 error_param: 1594 - /* send the response to the vf */ 1594 + /* send the response to the VF */ 1595 1595 return i40e_vc_send_resp_to_vf(vf, I40E_VIRTCHNL_OP_DEL_VLAN, aq_ret); 1596 1596 } 1597 1597 1598 1598 /** 1599 1599 * i40e_vc_validate_vf_msg 1600 - * @vf: pointer to the vf info 1600 + * @vf: pointer to the VF info 1601 1601 * @msg: pointer to the msg buffer 1602 1602 * @msglen: msg length 1603 1603 * @msghndl: msg handle ··· 1703 1703 1704 1704 /** 1705 1705 * i40e_vc_process_vf_msg 1706 - * @pf: pointer to the pf structure 1707 - * @vf_id: source vf id 1706 + * @pf: pointer to the PF structure 1707 + * @vf_id: source VF id 1708 1708 * @msg: pointer to the msg buffer 1709 1709 * @msglen: msg length 1710 1710 * @msghndl: msg handle 1711 1711 * 1712 1712 * called from the common aeq/arq handler to 1713 - * process request from vf 1713 + * process request from VF 1714 1714 **/ 1715 1715 int i40e_vc_process_vf_msg(struct i40e_pf *pf, u16 vf_id, u32 v_opcode, 1716 1716 u32 v_retval, u8 *msg, u16 msglen) ··· 1728 1728 ret = i40e_vc_validate_vf_msg(vf, v_opcode, v_retval, msg, msglen); 1729 1729 1730 1730 if (ret) { 1731 - dev_err(&pf->pdev->dev, "Invalid message from vf %d, opcode %d, len %d\n", 1731 + dev_err(&pf->pdev->dev, "Invalid message from VF %d, opcode %d, len %d\n", 1732 1732 local_vf_id, v_opcode, msglen); 1733 1733 return ret; 1734 1734 } ··· 1776 1776 break; 1777 1777 case I40E_VIRTCHNL_OP_UNKNOWN: 1778 1778 default: 1779 - dev_err(&pf->pdev->dev, "Unsupported opcode %d from vf %d\n", 1779 + dev_err(&pf->pdev->dev, "Unsupported opcode %d from VF %d\n", 1780 1780 v_opcode, local_vf_id); 1781 1781 ret = i40e_vc_send_resp_to_vf(vf, v_opcode, 1782 1782 I40E_ERR_NOT_IMPLEMENTED); ··· 1788 1788 1789 1789 /** 1790 1790 * i40e_vc_process_vflr_event 1791 - * @pf: pointer to the pf structure 1791 + * @pf: pointer to the PF structure 1792 1792 * 1793 1793 * called from the vlfr irq handler to 1794 - * free up vf resources and state variables 1794 + * free up VF resources and state variables 1795 1795 **/ 1796 1796 int i40e_vc_process_vflr_event(struct i40e_pf *pf) 1797 1797 { ··· 1812 1812 for (vf_id = 0; vf_id < pf->num_alloc_vfs; vf_id++) { 1813 1813 reg_idx = (hw->func_caps.vf_base_id + vf_id) / 32; 1814 1814 bit_idx = (hw->func_caps.vf_base_id + vf_id) % 32; 1815 - /* read GLGEN_VFLRSTAT register to find out the flr vfs */ 1815 + /* read GLGEN_VFLRSTAT register to find out the flr VFs */ 1816 1816 vf = &pf->vf[vf_id]; 1817 1817 reg = rd32(hw, I40E_GLGEN_VFLRSTAT(reg_idx)); 1818 1818 if (reg & (1 << bit_idx)) { ··· 1829 1829 1830 1830 /** 1831 1831 * i40e_vc_vf_broadcast 1832 - * @pf: pointer to the pf structure 1832 + * @pf: pointer to the PF structure 1833 1833 * @opcode: operation code 1834 1834 * @retval: return value 1835 1835 * @msg: pointer to the msg buffer ··· 1848 1848 1849 1849 for (i = 0; i < pf->num_alloc_vfs; i++, vf++) { 1850 1850 int abs_vf_id = vf->vf_id + hw->func_caps.vf_base_id; 1851 - /* Not all vfs are enabled so skip the ones that are not */ 1851 + /* Not all VFs are enabled so skip the ones that are not */ 1852 1852 if (!test_bit(I40E_VF_STAT_INIT, &vf->vf_states) && 1853 1853 !test_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states)) 1854 1854 continue; ··· 1863 1863 1864 1864 /** 1865 1865 * i40e_vc_notify_link_state 1866 - * @pf: pointer to the pf structure 1866 + * @pf: pointer to the PF structure 1867 1867 * 1868 1868 * send a link status message to all VFs on a given PF 1869 1869 **/ ··· 1896 1896 1897 1897 /** 1898 1898 * i40e_vc_notify_reset 1899 - * @pf: pointer to the pf structure 1899 + * @pf: pointer to the PF structure 1900 1900 * 1901 1901 * indicate a pending reset to all VFs on a given PF 1902 1902 **/ ··· 1912 1912 1913 1913 /** 1914 1914 * i40e_vc_notify_vf_reset 1915 - * @vf: pointer to the vf structure 1915 + * @vf: pointer to the VF structure 1916 1916 * 1917 1917 * indicate a pending reset to the given VF 1918 1918 **/ ··· 1942 1942 /** 1943 1943 * i40e_ndo_set_vf_mac 1944 1944 * @netdev: network interface device structure 1945 - * @vf_id: vf identifier 1945 + * @vf_id: VF identifier 1946 1946 * @mac: mac address 1947 1947 * 1948 - * program vf mac address 1948 + * program VF mac address 1949 1949 **/ 1950 1950 int i40e_ndo_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac) 1951 1951 { ··· 2010 2010 /** 2011 2011 * i40e_ndo_set_vf_port_vlan 2012 2012 * @netdev: network interface device structure 2013 - * @vf_id: vf identifier 2013 + * @vf_id: VF identifier 2014 2014 * @vlan_id: mac address 2015 2015 * @qos: priority setting 2016 2016 * 2017 - * program vf vlan id and/or qos 2017 + * program VF vlan id and/or qos 2018 2018 **/ 2019 2019 int i40e_ndo_set_vf_port_vlan(struct net_device *netdev, 2020 2020 int vf_id, u16 vlan_id, u8 qos) ··· 2123 2123 /** 2124 2124 * i40e_ndo_set_vf_bw 2125 2125 * @netdev: network interface device structure 2126 - * @vf_id: vf identifier 2127 - * @tx_rate: tx rate 2126 + * @vf_id: VF identifier 2127 + * @tx_rate: Tx rate 2128 2128 * 2129 - * configure vf tx rate 2129 + * configure VF Tx rate 2130 2130 **/ 2131 2131 int i40e_ndo_set_vf_bw(struct net_device *netdev, int vf_id, int min_tx_rate, 2132 2132 int max_tx_rate) ··· 2146 2146 } 2147 2147 2148 2148 if (min_tx_rate) { 2149 - dev_err(&pf->pdev->dev, "Invalid min tx rate (%d) (greater than 0) specified for vf %d.\n", 2149 + dev_err(&pf->pdev->dev, "Invalid min tx rate (%d) (greater than 0) specified for VF %d.\n", 2150 2150 min_tx_rate, vf_id); 2151 2151 return -EINVAL; 2152 2152 } ··· 2174 2174 } 2175 2175 2176 2176 if (max_tx_rate > speed) { 2177 - dev_err(&pf->pdev->dev, "Invalid max tx rate %d specified for vf %d.", 2177 + dev_err(&pf->pdev->dev, "Invalid max tx rate %d specified for VF %d.", 2178 2178 max_tx_rate, vf->vf_id); 2179 2179 ret = -EINVAL; 2180 2180 goto error; ··· 2203 2203 /** 2204 2204 * i40e_ndo_get_vf_config 2205 2205 * @netdev: network interface device structure 2206 - * @vf_id: vf identifier 2207 - * @ivi: vf configuration structure 2206 + * @vf_id: VF identifier 2207 + * @ivi: VF configuration structure 2208 2208 * 2209 - * return vf configuration 2209 + * return VF configuration 2210 2210 **/ 2211 2211 int i40e_ndo_get_vf_config(struct net_device *netdev, 2212 2212 int vf_id, struct ifla_vf_info *ivi) ··· 2258 2258 /** 2259 2259 * i40e_ndo_set_vf_link_state 2260 2260 * @netdev: network interface device structure 2261 - * @vf_id: vf identifier 2261 + * @vf_id: VF identifier 2262 2262 * @link: required link state 2263 2263 * 2264 2264 * Set the link state of a specified VF, regardless of physical link state ··· 2321 2321 /** 2322 2322 * i40e_ndo_set_vf_spoofchk 2323 2323 * @netdev: network interface device structure 2324 - * @vf_id: vf identifier 2324 + * @vf_id: VF identifier 2325 2325 * @enable: flag to enable or disable feature 2326 2326 * 2327 2327 * Enable or disable VF spoof checking
+6 -6
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
··· 71 71 struct i40e_vf { 72 72 struct i40e_pf *pf; 73 73 74 - /* vf id in the pf space */ 74 + /* VF id in the PF space */ 75 75 u16 vf_id; 76 - /* all vf vsis connect to the same parent */ 76 + /* all VF vsis connect to the same parent */ 77 77 enum i40e_switch_element_types parent_type; 78 78 79 - /* vf Port Extender (PE) stag if used */ 79 + /* VF Port Extender (PE) stag if used */ 80 80 u16 stag; 81 81 82 82 struct i40e_virtchnl_ether_addr default_lan_addr; ··· 91 91 u8 lan_vsi_index; /* index into PF struct */ 92 92 u8 lan_vsi_id; /* ID as used by firmware */ 93 93 94 - u8 num_queue_pairs; /* num of qps assigned to vf vsis */ 94 + u8 num_queue_pairs; /* num of qps assigned to VF vsis */ 95 95 u64 num_mdd_events; /* num of mdd events detected */ 96 96 u64 num_invalid_msgs; /* num of malformed or invalid msgs detected */ 97 97 u64 num_valid_msgs; /* num of valid msgs detected */ ··· 100 100 unsigned long vf_states; /* vf's runtime states */ 101 101 unsigned int tx_rate; /* Tx bandwidth limit in Mbps */ 102 102 bool link_forced; 103 - bool link_up; /* only valid if vf link is forced */ 103 + bool link_up; /* only valid if VF link is forced */ 104 104 bool spoofchk; 105 105 }; 106 106 ··· 113 113 void i40e_reset_vf(struct i40e_vf *vf, bool flr); 114 114 void i40e_vc_notify_vf_reset(struct i40e_vf *vf); 115 115 116 - /* vf configuration related iplink handlers */ 116 + /* VF configuration related iplink handlers */ 117 117 int i40e_ndo_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac); 118 118 int i40e_ndo_set_vf_port_vlan(struct net_device *netdev, 119 119 int vf_id, u16 vlan_id, u8 qos);
+1
drivers/net/ethernet/intel/i40evf/i40e_txrx.c
··· 371 371 static void i40e_force_wb(struct i40e_vsi *vsi, struct i40e_q_vector *q_vector) 372 372 { 373 373 u32 val = I40E_VFINT_DYN_CTLN_INTENA_MASK | 374 + I40E_VFINT_DYN_CTLN1_ITR_INDX_MASK | /* set noitr */ 374 375 I40E_VFINT_DYN_CTLN_SWINT_TRIG_MASK | 375 376 I40E_VFINT_DYN_CTLN_SW_ITR_INDX_ENA_MASK; 376 377 /* allow 00 to be written to the index */
+10 -6
drivers/net/ethernet/intel/i40evf/i40evf_main.c
··· 36 36 static const char i40evf_driver_string[] = 37 37 "Intel(R) XL710/X710 Virtual Function Network Driver"; 38 38 39 - #define DRV_VERSION "1.2.6" 39 + #define DRV_VERSION "1.2.25" 40 40 const char i40evf_driver_version[] = DRV_VERSION; 41 41 static const char i40evf_copyright[] = 42 42 "Copyright (c) 2013 - 2014 Intel Corporation."; ··· 244 244 if (mask & (1 << (i - 1))) { 245 245 wr32(hw, I40E_VFINT_DYN_CTLN1(i - 1), 246 246 I40E_VFINT_DYN_CTLN1_INTENA_MASK | 247 + I40E_VFINT_DYN_CTLN1_ITR_INDX_MASK | 247 248 I40E_VFINT_DYN_CTLN_CLEARPBA_MASK); 248 249 } 249 250 } ··· 264 263 if (mask & 1) { 265 264 dyn_ctl = rd32(hw, I40E_VFINT_DYN_CTL01); 266 265 dyn_ctl |= I40E_VFINT_DYN_CTLN_SWINT_TRIG_MASK | 266 + I40E_VFINT_DYN_CTLN1_ITR_INDX_MASK | 267 267 I40E_VFINT_DYN_CTLN_CLEARPBA_MASK; 268 268 wr32(hw, I40E_VFINT_DYN_CTL01, dyn_ctl); 269 269 } ··· 272 270 if (mask & (1 << i)) { 273 271 dyn_ctl = rd32(hw, I40E_VFINT_DYN_CTLN1(i - 1)); 274 272 dyn_ctl |= I40E_VFINT_DYN_CTLN_SWINT_TRIG_MASK | 273 + I40E_VFINT_DYN_CTLN1_ITR_INDX_MASK | 275 274 I40E_VFINT_DYN_CTLN_CLEARPBA_MASK; 276 275 wr32(hw, I40E_VFINT_DYN_CTLN1(i - 1), dyn_ctl); 277 276 } ··· 1581 1578 adapter->flags &= ~I40EVF_FLAG_RESET_PENDING; 1582 1579 1583 1580 i40evf_irq_disable(adapter); 1584 - i40evf_napi_disable_all(adapter); 1585 1581 1586 - netif_tx_disable(netdev); 1582 + if (netif_running(adapter->netdev)) { 1583 + i40evf_napi_disable_all(adapter); 1584 + netif_tx_disable(netdev); 1585 + netif_tx_stop_all_queues(netdev); 1586 + netif_carrier_off(netdev); 1587 + } 1587 1588 1588 - netif_tx_stop_all_queues(netdev); 1589 - 1590 - netif_carrier_off(netdev); 1591 1589 adapter->state = __I40EVF_RESETTING; 1592 1590 1593 1591 /* kill and reinit the admin queue */