net/i40e/base: get PHY abilities for 25G
authorQi Zhang <qi.z.zhang@intel.com>
Thu, 25 Aug 2016 20:05:11 +0000 (16:05 -0400)
committerBruce Richardson <bruce.richardson@intel.com>
Fri, 30 Sep 2016 10:27:18 +0000 (12:27 +0200)
Add extended PHY types to get PHY abilities for 25G, then put
PHY types for 25G into the proper field when the PHY capabilities
are queried.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/i40e/base/i40e_adminq_cmd.h
drivers/net/i40e/base/i40e_common.c

index 2831593..4ae4315 100644 (file)
@@ -1733,7 +1733,13 @@ struct i40e_aq_get_phy_abilities_resp {
        __le32  eeer_val;
        u8      d3_lpan;
 #define I40E_AQ_SET_PHY_D3_LPAN_ENA    0x01
-       u8      reserved[3];
+       u8      phy_type_ext;
+#define I40E_AQ_PHY_TYPE_EXT_25G_KR    0X01
+#define I40E_AQ_PHY_TYPE_EXT_25G_CR    0X02
+#define I40E_AQ_PHY_TYPE_EXT_25G_SR    0x04
+#define I40E_AQ_PHY_TYPE_EXT_25G_LR    0x08
+       u8      mod_type_ext;
+       u8      ext_comp_code;
        u8      phy_id[4];
        u8      module_type[3];
        u8      qualified_module_count;
@@ -1755,7 +1761,12 @@ struct i40e_aq_set_phy_config { /* same bits as above in all */
        __le16  eee_capability;
        __le32  eeer;
        u8      low_power_ctrl;
-       u8      reserved[3];
+       u8      phy_type_ext;
+#define I40E_AQ_PHY_TYPE_EXT_25G_KR    0X01
+#define I40E_AQ_PHY_TYPE_EXT_25G_CR    0X02
+#define I40E_AQ_PHY_TYPE_EXT_25G_SR    0x04
+#define I40E_AQ_PHY_TYPE_EXT_25G_LR    0x08
+       u8      reserved[2];
 };
 
 I40E_CHECK_CMD_LENGTH(i40e_aq_set_phy_config);
index 1de0e39..ff64dca 100644 (file)
@@ -1670,8 +1670,10 @@ enum i40e_status_code i40e_aq_get_phy_capabilities(struct i40e_hw *hw,
        if (hw->aq.asq_last_status == I40E_AQ_RC_EIO)
                status = I40E_ERR_UNKNOWN_PHY;
 
-       if (report_init)
+       if (report_init) {
                hw->phy.phy_types = LE32_TO_CPU(abilities->phy_type);
+               hw->phy.phy_types |= ((u64)abilities->phy_type_ext << 32);
+       }
 
        return status;
 }