summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40e/i40e_main.c
diff options
context:
space:
mode:
authorGreg Rose2015-02-06 09:52:13 +0100
committerJeff Kirsher2015-02-25 06:42:40 +0100
commit96664483a38d25b37de8911e2058b1d10af3d113 (patch)
tree66ef8ada970263d967d2c042e468ba203c2517a2 /drivers/net/ethernet/intel/i40e/i40e_main.c
parenti40e: Add NPAR BW get and set functions (diff)
downloadkernel-qcow2-linux-96664483a38d25b37de8911e2058b1d10af3d113.tar.gz
kernel-qcow2-linux-96664483a38d25b37de8911e2058b1d10af3d113.tar.xz
kernel-qcow2-linux-96664483a38d25b37de8911e2058b1d10af3d113.zip
i40e: Implement configfs for NPAR BW configuration
Add configfs controls to get, set and commit NPAR BW configurations. We export three controls: min_bw - Can take a value from 0 to 100 inclusive max_bw - Can take a value from 1 to 100 inclusive commit - A write-only control that accepts only a value of 1 and will cause the BW settings to be permanently committed to NVM so that they are persistent across power cycles and system resets The BW values are relative and are expressed as percentages. For more information on the interpretation of the BW settings see the Dell specifications for NPAR. Also update the copyright year. Change-ID: Id7496ca65630b5037e32ba6a5a748fbc1632881b Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-By: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_main.c')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index e3e48c3ae24a..eb2655f464b3 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -4835,11 +4835,7 @@ exit:
*
* Returns 0 on success, negative value on failure
**/
-#ifdef I40E_FCOE
int i40e_open(struct net_device *netdev)
-#else
-static int i40e_open(struct net_device *netdev)
-#endif
{
struct i40e_netdev_priv *np = netdev_priv(netdev);
struct i40e_vsi *vsi = np->vsi;
@@ -7741,7 +7737,7 @@ static int i40e_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
return err;
}
-static const struct net_device_ops i40e_netdev_ops = {
+const struct net_device_ops i40e_netdev_ops = {
.ndo_open = i40e_open,
.ndo_stop = i40e_close,
.ndo_start_xmit = i40e_lan_xmit_frame,
@@ -9943,6 +9939,10 @@ static int __init i40e_init_module(void)
pr_info("%s: %s - version %s\n", i40e_driver_name,
i40e_driver_string, i40e_driver_version_str);
pr_info("%s: %s\n", i40e_driver_name, i40e_copyright);
+
+#if IS_ENABLED(CONFIG_CONFIGFS_FS)
+ i40e_configfs_init();
+#endif /* CONFIG_CONFIGFS_FS */
i40e_dbg_init();
return pci_register_driver(&i40e_driver);
}
@@ -9958,5 +9958,8 @@ static void __exit i40e_exit_module(void)
{
pci_unregister_driver(&i40e_driver);
i40e_dbg_exit();
+#if IS_ENABLED(CONFIG_CONFIGFS_FS)
+ i40e_configfs_exit();
+#endif /* CONFIG_CONFIGFS_FS */
}
module_exit(i40e_exit_module);