diff options
author | Jakub Kicinski | 2017-08-23 08:22:42 +0200 |
---|---|---|
committer | David S. Miller | 2017-08-24 05:39:44 +0200 |
commit | d6e1ab9ea3514840e4f32957c457b094646c2e9d (patch) | |
tree | 1cd1a376d6902098d629ba0d83bcad2408064b76 /drivers/net/ethernet/netronome/nfp/nfp_net_main.c | |
parent | Merge branch 'dst-tag-ksz-fix' (diff) | |
download | kernel-qcow2-linux-d6e1ab9ea3514840e4f32957c457b094646c2e9d.tar.gz kernel-qcow2-linux-d6e1ab9ea3514840e4f32957c457b094646c2e9d.tar.xz kernel-qcow2-linux-d6e1ab9ea3514840e4f32957c457b094646c2e9d.zip |
nfp: don't hold PF lock while enabling SR-IOV
Enabling SR-IOV VFs will cause the PCI subsystem to schedule a
work and flush its workqueue. Since the nfp driver schedules its
own work we can't enable VFs while holding driver load. Commit
6d48ceb27af1 ("nfp: allocate a private workqueue for driver work")
tried to avoid this deadlock by creating a separate workqueue.
Unfortunately, due to the architecture of workqueue subsystem this
does not guarantee a separate thread of execution. Luckily
we can simply take pci_enable_sriov() from under the driver lock.
Take pci_disable_sriov() from under the lock too for symmetry.
Fixes: 6d48ceb27af1 ("nfp: allocate a private workqueue for driver work")
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_net_main.c')
0 files changed, 0 insertions, 0 deletions