diff options
author | Christopher Pau <christopher.pau@intel.com> | 2014-06-05 00:41:59 +0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2014-07-01 11:21:25 +0400 |
commit | 24a768cfc4f8cbbb3eaf56284610e652ef05fc5b (patch) | |
tree | 7bc64a5e1b4c198b3cd3837647e87cc4b0221234 /drivers | |
parent | 3efbbb202b6a6f553d40cc7e779e5c375f20efa6 (diff) | |
download | linux-24a768cfc4f8cbbb3eaf56284610e652ef05fc5b.tar.xz |
i40e: limit GLLAN_TXPRE_QDIS to QINDX 0-127
Prevent writing to reserved bits, queue index is 0-127
Change-ID: Ic923e1c92012a265983414acd8f547c4bdac2e34
Signed-off-by: Christopher Pau <christopher.pau@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_common.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c index 8305c8a4a0d8..9d09ab31ec89 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_common.c +++ b/drivers/net/ethernet/intel/i40e/i40e_common.c @@ -669,8 +669,10 @@ void i40e_pre_tx_queue_cfg(struct i40e_hw *hw, u32 queue, bool enable) u32 reg_block = 0; u32 reg_val; - if (abs_queue_idx >= 128) + if (abs_queue_idx >= 128) { reg_block = abs_queue_idx / 128; + abs_queue_idx %= 128; + } reg_val = rd32(hw, I40E_GLLAN_TXPRE_QDIS(reg_block)); reg_val &= ~I40E_GLLAN_TXPRE_QDIS_QINDX_MASK; |