提交 24a768cf 编写于 作者: C Christopher Pau 提交者: Jeff Kirsher

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: NChristopher Pau <christopher.pau@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 3efbbb20
...@@ -669,8 +669,10 @@ void i40e_pre_tx_queue_cfg(struct i40e_hw *hw, u32 queue, bool enable) ...@@ -669,8 +669,10 @@ void i40e_pre_tx_queue_cfg(struct i40e_hw *hw, u32 queue, bool enable)
u32 reg_block = 0; u32 reg_block = 0;
u32 reg_val; u32 reg_val;
if (abs_queue_idx >= 128) if (abs_queue_idx >= 128) {
reg_block = 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 = rd32(hw, I40E_GLLAN_TXPRE_QDIS(reg_block));
reg_val &= ~I40E_GLLAN_TXPRE_QDIS_QINDX_MASK; reg_val &= ~I40E_GLLAN_TXPRE_QDIS_QINDX_MASK;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册