From: Jingjing Wu Date: Wed, 22 Mar 2017 09:24:54 +0000 (+0800) Subject: net/i40e/base: control register read/write on X722 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d1b4c30b2422ac497eb89ccad39c18fd8ac4b96f;p=dpdk.git 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 --- diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index b8d81651e6..cabf7d58e3 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -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,