]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit6f50bb75e7ca41c75d3de0c30d53f85f46d4e9af
treeb1eb63facd9ea55720e01e975c20b07adb81f22e
parentb37639ef3c090677e836081c96edd2b25df8e9b2
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