ice: fix rate limit update after coalesce change
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Mon, 20 Sep 2021 19:30:13 +0000 (12:30 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 19 Oct 2021 17:45:16 +0000 (10:45 -0700)
commitd16a4f45f3a3afcb56910a7242cc621c071e80e4
tree5e4a449728d3bf9cdc8f525636ad48a8556bcd69
parentd8eb7ad5e46c65d57fa72571cf2ccca7da1e7196
ice: fix rate limit update after coalesce change

If the adaptive settings are changed with
ethtool -C ethx adaptive-rx off adaptive-tx off
then the interrupt rate limit should be maintained as a user set value,
but only if BOTH adaptive settings are off. Fix a bug where the rate
limit that was being used in adaptive mode was staying set in the
register but was not reported correctly by ethtool -c ethx. Due to long
lines include a small refactor of q_vector variable.

Fixes: b8b4772377dd ("ice: refactor interrupt moderation writes")
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_lib.c