The X722 FW API version 1.9 adds support for accessing PHY registers with Admin Queue Command. This enables reading EEPROM data from (Q)SFP+ transceivers, what was previously possible only on X710 devices.
Signed-off-by: Adam Ludkiewicz <adam.ludkiew...@intel.com> Reviewed-by: Aleksandr Loktionov <aleksandr.loktio...@intel.com> Reviewed-by: Piotr Kwapulinski <piotr.kwapulin...@intel.com> Reviewed-by: Arkadiusz Kubalewski <arkadiusz.kubalew...@intel.com> Reviewed-by: Galazka Krzysztof <krzysztof.gala...@intel.com> Reviewed-by: Kirsher Jeffrey T <jeffrey.t.kirs...@intel.com> Reviewed-by: Michael Alice <alice.mich...@intel.com> Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> --- drivers/net/i40e/base/i40e_adminq.c | 5 +++++ drivers/net/i40e/base/i40e_adminq_cmd.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c index 64b3b50b5..85e313e2b 100644 --- a/drivers/net/i40e/base/i40e_adminq.c +++ b/drivers/net/i40e/base/i40e_adminq.c @@ -677,6 +677,11 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw) (aq->api_maj_ver == 1 && aq->api_min_ver >= I40E_MINOR_VER_FW_LLDP_STOPPABLE_X722)) hw->flags |= I40E_HW_FLAG_FW_LLDP_STOPPABLE; + + if (aq->api_maj_ver > 1 || + (aq->api_maj_ver == 1 && + aq->api_min_ver >= I40E_MINOR_VER_GET_LINK_INFO_X722)) + hw->flags |= I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE; /* fall through */ default: break; diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index 5f36a61a7..7e58a0ead 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -21,6 +21,8 @@ /* API version 1.7 implements additional link and PHY-specific APIs */ #define I40E_MINOR_VER_GET_LINK_INFO_XL710 0x0007 +/* API version 1.9 for X722 implements additional link and PHY-specific APIs */ +#define I40E_MINOR_VER_GET_LINK_INFO_X722 0x0009 /* API version 1.6 for X722 devices adds ability to stop FW LLDP agent */ #define I40E_MINOR_VER_FW_LLDP_STOPPABLE_X722 0x0006 -- 2.17.1