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

Merge branch 'ixgbe'

Aaron Brown says:

====================
Intel Wired LAN Driver Updates

This series contains updates to ixgbe Ethan Zhao. The first one replaces
the magic number "63" with a macro, IXGBE_MAX_VFS_DRV_LIMIT, the second
moves the call to set driver_max_VFS to before SRIOV is enabled.

The code of these patches match the v3 (1/2) and v2 (2/2) versions sent
to the e1000-devel and netdev mailing lists. The intermediate versions
(v4, v5) are from sorting out style issues, mostly tabs to spaces and
split lines probably introduced via mailer.
====================

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

+9 -4
+2 -2
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
··· 5067 5067 5068 5068 /* assign number of SR-IOV VFs */ 5069 5069 if (hw->mac.type != ixgbe_mac_82598EB) { 5070 - if (max_vfs > 63) { 5070 + if (max_vfs > IXGBE_MAX_VFS_DRV_LIMIT) { 5071 5071 adapter->num_vfs = 0; 5072 5072 e_dev_warn("max_vfs parameter out of range. Not assigning any SR-IOV VFs\n"); 5073 5073 } else { ··· 8019 8019 /* Mailbox */ 8020 8020 ixgbe_init_mbx_params_pf(hw); 8021 8021 memcpy(&hw->mbx.ops, ii->mbx_ops, sizeof(hw->mbx.ops)); 8022 + pci_sriov_set_totalvfs(pdev, IXGBE_MAX_VFS_DRV_LIMIT); 8022 8023 ixgbe_enable_sriov(adapter); 8023 - pci_sriov_set_totalvfs(pdev, 63); 8024 8024 skip_sriov: 8025 8025 8026 8026 #endif
+2 -2
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
··· 148 148 * physical function. If the user requests greater thn 149 149 * 63 VFs then it is an error - reset to default of zero. 150 150 */ 151 - adapter->num_vfs = min_t(unsigned int, adapter->num_vfs, 63); 151 + adapter->num_vfs = min_t(unsigned int, adapter->num_vfs, IXGBE_MAX_VFS_DRV_LIMIT); 152 152 153 153 err = pci_enable_sriov(adapter->pdev, adapter->num_vfs); 154 154 if (err) { ··· 257 257 * PF. The PCI bus driver already checks for other values out of 258 258 * range. 259 259 */ 260 - if (num_vfs > 63) { 260 + if (num_vfs > IXGBE_MAX_VFS_DRV_LIMIT) { 261 261 err = -EPERM; 262 262 goto err_out; 263 263 }
+5
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h
··· 28 28 #ifndef _IXGBE_SRIOV_H_ 29 29 #define _IXGBE_SRIOV_H_ 30 30 31 + /* ixgbe driver limit the max number of VFs could be enabled to 32 + * 63 (IXGBE_MAX_VF_FUNCTIONS - 1) 33 + */ 34 + #define IXGBE_MAX_VFS_DRV_LIMIT (IXGBE_MAX_VF_FUNCTIONS - 1) 35 + 31 36 void ixgbe_restore_vf_multicasts(struct ixgbe_adapter *adapter); 32 37 void ixgbe_msg_task(struct ixgbe_adapter *adapter); 33 38 int ixgbe_vf_configuration(struct pci_dev *pdev, unsigned int event_mask);