net/i40e/base: control register read/write on X722
The X722 doesn't support the AQ command to read/write the control register so enable it to bypass the check and use the direct read/write method. Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
This commit is contained in:
parent
dc7b23c245
commit
d1b4c30b24
@ -6634,7 +6634,9 @@ u32 i40e_read_rx_ctl(struct i40e_hw *hw, u32 reg_addr)
|
||||
int retry = 5;
|
||||
u32 val = 0;
|
||||
|
||||
use_register = (hw->aq.api_maj_ver == 1) && (hw->aq.api_min_ver < 5);
|
||||
use_register = (((hw->aq.api_maj_ver == 1) &&
|
||||
(hw->aq.api_min_ver < 5)) ||
|
||||
(hw->mac.type == I40E_MAC_X722));
|
||||
if (!use_register) {
|
||||
do_retry:
|
||||
status = i40e_aq_rx_ctl_read_register(hw, reg_addr, &val, NULL);
|
||||
@ -6693,7 +6695,9 @@ void i40e_write_rx_ctl(struct i40e_hw *hw, u32 reg_addr, u32 reg_val)
|
||||
bool use_register;
|
||||
int retry = 5;
|
||||
|
||||
use_register = (hw->aq.api_maj_ver == 1) && (hw->aq.api_min_ver < 5);
|
||||
use_register = (((hw->aq.api_maj_ver == 1) &&
|
||||
(hw->aq.api_min_ver < 5)) ||
|
||||
(hw->mac.type == I40E_MAC_X722));
|
||||
if (!use_register) {
|
||||
do_retry:
|
||||
status = i40e_aq_rx_ctl_write_register(hw, reg_addr,
|
||||
|
Loading…
Reference in New Issue
Block a user