summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/netronome/nfp/nfp_main.h
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2017-06-27 10:50:27 +0300
committerDavid S. Miller <davem@davemloft.net>2017-06-27 22:48:49 +0300
commit6d48ceb27af1420882f092495fc796cfcbf92a14 (patch)
tree767ddea3dd839ce2627cd6b8ef814f97730fdcd3 /drivers/net/ethernet/netronome/nfp/nfp_main.h
parente3f28473b8ed348f7c052fa1bf79edfde5efba48 (diff)
downloadlinux-6d48ceb27af1420882f092495fc796cfcbf92a14.tar.xz
nfp: allocate a private workqueue for driver work
Since we grab pf->lock around pci_enable_sriov() we can no longer safely queue work which may also grab that lock onto system workqueue. pci_enable_sriov() will flush system workqueue as part to wait for VF probing. 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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_main.h b/drivers/net/ethernet/netronome/nfp/nfp_main.h
index edc14dc78674..a08cfba7e68e 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_main.h
+++ b/drivers/net/ethernet/netronome/nfp/nfp_main.h
@@ -89,6 +89,7 @@ struct nfp_rtsym_table;
* @num_vnics: Number of vNICs spawned
* @vnics: Linked list of vNIC structures (struct nfp_net)
* @ports: Linked list of port structures (struct nfp_port)
+ * @wq: Workqueue for running works which need to grab @lock
* @port_refresh_work: Work entry for taking netdevs out
* @lock: Protects all fields which may change after probe
*/
@@ -131,7 +132,10 @@ struct nfp_pf {
struct list_head vnics;
struct list_head ports;
+
+ struct workqueue_struct *wq;
struct work_struct port_refresh_work;
+
struct mutex lock;
};