diff options
author | Jacob Keller <jacob.e.keller@intel.com> | 2022-02-16 13:37:32 -0800 |
---|---|---|
committer | Tony Nguyen <anthony.l.nguyen@intel.com> | 2022-03-03 08:46:48 -0800 |
commit | 44efe75f736f489892a71fb5b69e6f2271327613 (patch) | |
tree | fc74ac5852dfa58bd3ffa3bb1ea26b52690b6d07 /drivers/net/ethernet/intel/ice/ice_ethtool.c | |
parent | 294627a67e964d3000357e8ac57cc26f049da296 (diff) | |
download | linux-44efe75f736f489892a71fb5b69e6f2271327613.tar.gz linux-44efe75f736f489892a71fb5b69e6f2271327613.tar.bz2 linux-44efe75f736f489892a71fb5b69e6f2271327613.zip |
ice: move VFLR acknowledge during ice_free_vfs
After removing all VFs, the driver clears the VFLR indication for VFs.
This has been in ice since the beginning of SR-IOV support in the ice
driver.
The implementation was copied from i40e, and the motivation for the VFLR
indication clearing is described in the commit f7414531a0cf ("i40e:
acknowledge VFLR when disabling SR-IOV")
The commit explains that we need to clear the VFLR indication because
the virtual function undergoes a VFLR event. If we don't indicate that
it is complete it can cause an issue when VFs are re-enabled due to
a "phantom" VFLR.
The register block read was added under a pci_vfs_assigned check
originally. This was done because we added the check after calling
pci_disable_sriov. This was later moved to disable SRIOV earlier in the
flow so that the VF drivers could be torn down before we removed
functionality.
Move the VFLR acknowledge into the main loop that tears down VF
resources. This avoids using the tmp value for iterating over VFs
multiple times. The result will make it easier to refactor the VF array
in a future change.
It's possible we might want to modify this flow to also stop checking
pci_vfs_assigned. However, it seems reasonable to keep this change: we
should only clear the VFLR if we actually disabled SR-IOV.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_ethtool.c')
0 files changed, 0 insertions, 0 deletions