linux-stable/drivers/net/ethernet/netronome
Jakub Kicinski d6e1ab9ea3 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
6d48ceb27a ("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: 6d48ceb27a ("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>
2017-08-23 20:39:44 -07:00
..
nfp nfp: don't hold PF lock while enabling SR-IOV 2017-08-23 20:39:44 -07:00
Kconfig nfp: flower: add Kconfig for flower app 2017-06-27 15:48:50 -04:00
Makefile nfp: rename the driver and add new main file 2017-02-10 15:52:24 -05:00