diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2017-04-05 02:12:26 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-04-05 20:49:12 +0300 |
commit | 172f638c93dd0b90b231d07662e64025b1e53e38 (patch) | |
tree | 0f6cc127d6004db39c8627585c20f9c2fdf4dbca /drivers/net/ethernet/netronome/nfp/nfp_main.h | |
parent | cee4295133ba3b85b2f22b542d8855232deba4a3 (diff) | |
download | linux-172f638c93dd0b90b231d07662e64025b1e53e38.tar.xz |
nfp: add port state refresh
We will need a way of refreshing port state for link settings
get/set. For get we need to refresh port speed and type.
When settings are changed the reconfiguration may require
reboot before it's effective. Unregister netdevs affected
by reconfiguration from a workqueue.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfp_main.h')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_main.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_main.h b/drivers/net/ethernet/netronome/nfp/nfp_main.h index b7ceec9a5783..b57de047b002 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_main.h +++ b/drivers/net/ethernet/netronome/nfp/nfp_main.h @@ -44,6 +44,7 @@ #include <linux/msi.h> #include <linux/mutex.h> #include <linux/pci.h> +#include <linux/workqueue.h> struct dentry; struct pci_dev; @@ -69,6 +70,7 @@ struct nfp_eth_table; * @num_netdevs: Number of netdevs spawned * @ports: Linked list of port structures (struct nfp_net) * @port_lock: Protects @ports, @num_ports, @num_netdevs + * @port_refresh_work: Work entry for taking netdevs out */ struct nfp_pf { struct pci_dev *pdev; @@ -94,6 +96,7 @@ struct nfp_pf { unsigned int num_netdevs; struct list_head ports; + struct work_struct port_refresh_work; struct mutex port_lock; }; |