ice: tighter control over VSI_DOWN state
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Tue, 26 Oct 2021 00:08:25 +0000 (17:08 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 15 Dec 2021 16:48:26 +0000 (08:48 -0800)
commit21c6e36b1e556af2a6eaf15faa14c51e3b4c854e
treeb1eb63facd9ea55720e01e975c20b07adb81f22e
parentcc14db11c8a40f930fc1e4b254a37e0fce745236
ice: tighter control over VSI_DOWN state

The driver had comments to the effect of: This flag should be set before
calling this function. While reviewing code it was found that there were
several violations of this policy, which could introduce hard to find
bugs or races.

Fix the violations of the "VSI DOWN state must be set before calling
ice_down" and make checking the state into code with a WARN_ON.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_ethtool.c
drivers/net/ethernet/intel/ice/ice_main.c