[12/28] net/ice/base: add E810T check function
Checks
Commit Message
Add function ice_is_e810t() to be able to distinguish if hardware is E810T
based or not.
Signed-off-by: Michal Michalik <michal.michalik@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/base/ice_common.c | 12 ++++++++++++
drivers/net/ice/base/ice_common.h | 1 +
drivers/net/ice/base/ice_devids.h | 1 +
3 files changed, 14 insertions(+)
Comments
> -----Original Message-----
> From: Zhang, Qi Z <qi.z.zhang@intel.com>
> Sent: Tuesday, August 10, 2021 10:51
> To: Yang, Qiming <qiming.yang@intel.com>
> Cc: Guo, Junfeng <junfeng.guo@intel.com>; dev@dpdk.org; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Michalik, Michal <Michal.Michalik@intel.com>
> Subject: [PATCH 12/28] net/ice/base: add E810T check function
>
> Add function ice_is_e810t() to be able to distinguish if hardware is E810T
> based or not.
>
> Signed-off-by: Michal Michalik <michal.michalik@intel.com>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
> drivers/net/ice/base/ice_common.c | 12 ++++++++++++
> drivers/net/ice/base/ice_common.h | 1 +
> drivers/net/ice/base/ice_devids.h | 1 +
> 3 files changed, 14 insertions(+)
>
> --
> 2.26.2
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Regards,
Junfeng Guo
@@ -200,6 +200,18 @@ bool ice_is_e810(struct ice_hw *hw)
return hw->mac_type == ICE_MAC_E810;
}
+/**
+ * ice_is_e810t
+ * @hw: pointer to the hardware structure
+ *
+ * returns true if the device is E810T based, false if not.
+ */
+bool ice_is_e810t(struct ice_hw *hw)
+{
+ return (hw->device_id == ICE_DEV_ID_E810C_SFP &&
+ hw->subsystem_device_id == ICE_SUBDEV_ID_E810T);
+}
+
/**
* ice_clear_pf_cfg - Clear PF configuration
* @hw: pointer to the hardware structure
@@ -237,6 +237,7 @@ enum ice_fw_modes ice_get_fw_mode(struct ice_hw *hw);
void ice_print_rollback_msg(struct ice_hw *hw);
bool ice_is_generic_mac(struct ice_hw *hw);
bool ice_is_e810(struct ice_hw *hw);
+bool ice_is_e810t(struct ice_hw *hw);
enum ice_status
ice_sched_query_elem(struct ice_hw *hw, u32 node_teid,
struct ice_aqc_txsched_elem_data *buf);
@@ -22,6 +22,7 @@
#define ICE_DEV_ID_E810C_QSFP 0x1592
/* Intel(R) Ethernet Controller E810-C for SFP */
#define ICE_DEV_ID_E810C_SFP 0x1593
+#define ICE_SUBDEV_ID_E810T 0x000E
/* Intel(R) Ethernet Controller E810-XXV for backplane */
#define ICE_DEV_ID_E810_XXV_BACKPLANE 0x1599
/* Intel(R) Ethernet Controller E810-XXV for QSFP */