OSDN Git Service

ice: Call pci_disable_sriov before stopping queues for VF
authorBrett Creeley <brett.creeley@intel.com>
Fri, 26 Oct 2018 18:44:34 +0000 (11:44 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 13 Nov 2018 17:09:26 +0000 (09:09 -0800)
commit99fc1057b4d4e2a95c24b3b1ea4d6140eb2712a2
tree87f8189ab56b4d661325f1919addb1ff51f70c53
parent7b8ff0f9cc531ce4367827e335c8bf0488d245f8
ice: Call pci_disable_sriov before stopping queues for VF

Previous to this commit the driver was immediately stopping Tx/Rx
queues when doing the following "echo 0 > sriov_numvfs" and then it was
calling pci_disable_sriov if the VFs are not assigned. This was causing
the VIRTCHNL_OP_DISABLE_QUEUES to fail because it was trying to stop
the queues for a second time.

Fix this by calling pci_disable_sriov before stopping the Tx/Rx queues.
This allows the VIRTCHNL_OP_DISABLE_QUEUES to get processed before the
driver tries to stop the Rx/Tx queues in ice_free_vfs.

Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c