ice: Don't reject odd values of usecs set by user
authorBrett Creeley <brett.creeley@intel.com>
Thu, 13 Feb 2020 21:31:23 +0000 (13:31 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 19 Feb 2020 19:50:41 +0000 (11:50 -0800)
commit840f8ad0aaf20044e2fb099095bbce27c02f58da
tree886827b24e7ee83599476c2a3f4511e683ea736a
parent33c4acbe2f4e8f2866914b1fb90ce74fc7216c21
ice: Don't reject odd values of usecs set by user

Currently if a user sets an odd [tx|rx]-usecs value through ethtool,
the request is denied because the hardware is set to have an ITR
granularity of 2us. This caused poor customer experience. Fix this by
aligning to a register allowed value, which results in rounding down.
Also, print a once per ring container type message to be clear about
our intentions.

Also, change the ITR_TO_REG define to be the bitwise and of the ITR
setting and the ICE_ITR_MASK. This makes the purpose of ITR_TO_REG more
obvious.

Signed-off-by: Brett Creeley <brett.creeley@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_ethtool.c
drivers/net/ethernet/intel/ice/ice_txrx.h