@@ -578,7 +578,8 @@ ice_aq_get_netlist_node(struct ice_hw *hw, struct ice_aqc_get_link_topo *cmd,
578578/**
579579 * ice_find_netlist_node
580580 * @hw: pointer to the hw struct
581- * @node_type_ctx: type of netlist node to look for
581+ * @node_type: type of netlist node to look for
582+ * @ctx: context of the search
582583 * @node_part_number: node part number to look for
583584 * @node_handle: output parameter if node found - optional
584585 *
@@ -588,10 +589,12 @@ ice_aq_get_netlist_node(struct ice_hw *hw, struct ice_aqc_get_link_topo *cmd,
588589 * valid if the function returns zero, and should be ignored on any non-zero
589590 * return value.
590591 *
591- * Returns: 0 if the node is found, -ENOENT if no handle was found, and
592- * a negative error code on failure to access the AQ.
592+ * Return:
593+ * * 0 if the node is found,
594+ * * -ENOENT if no handle was found,
595+ * * negative error code on failure to access the AQ.
593596 */
594- static int ice_find_netlist_node (struct ice_hw * hw , u8 node_type_ctx ,
597+ static int ice_find_netlist_node (struct ice_hw * hw , u8 node_type , u8 ctx ,
595598 u8 node_part_number , u16 * node_handle )
596599{
597600 u8 idx ;
@@ -602,8 +605,8 @@ static int ice_find_netlist_node(struct ice_hw *hw, u8 node_type_ctx,
602605 int status ;
603606
604607 cmd .addr .topo_params .node_type_ctx =
605- FIELD_PREP (ICE_AQC_LINK_TOPO_NODE_TYPE_M ,
606- node_type_ctx );
608+ FIELD_PREP (ICE_AQC_LINK_TOPO_NODE_TYPE_M , node_type ) |
609+ FIELD_PREP ( ICE_AQC_LINK_TOPO_NODE_CTX_M , ctx );
607610 cmd .addr .topo_params .index = idx ;
608611
609612 status = ice_aq_get_netlist_node (hw , & cmd ,
@@ -2769,9 +2772,11 @@ ice_parse_dev_caps(struct ice_hw *hw, struct ice_hw_dev_caps *dev_p,
27692772 */
27702773bool ice_is_phy_rclk_in_netlist (struct ice_hw * hw )
27712774{
2772- if (ice_find_netlist_node (hw , ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_CTRL ,
2775+ if (ice_find_netlist_node (hw , ICE_AQC_LINK_TOPO_NODE_TYPE_PHY ,
2776+ ICE_AQC_LINK_TOPO_NODE_CTX_PORT ,
27732777 ICE_AQC_GET_LINK_TOPO_NODE_NR_C827 , NULL ) &&
2774- ice_find_netlist_node (hw , ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_CTRL ,
2778+ ice_find_netlist_node (hw , ICE_AQC_LINK_TOPO_NODE_TYPE_PHY ,
2779+ ICE_AQC_LINK_TOPO_NODE_CTX_PORT ,
27752780 ICE_AQC_GET_LINK_TOPO_NODE_NR_E822_PHY , NULL ))
27762781 return false;
27772782
@@ -2787,6 +2792,7 @@ bool ice_is_phy_rclk_in_netlist(struct ice_hw *hw)
27872792bool ice_is_clock_mux_in_netlist (struct ice_hw * hw )
27882793{
27892794 if (ice_find_netlist_node (hw , ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_MUX ,
2795+ ICE_AQC_LINK_TOPO_NODE_CTX_GLOBAL ,
27902796 ICE_AQC_GET_LINK_TOPO_NODE_NR_GEN_CLK_MUX ,
27912797 NULL ))
27922798 return false;
@@ -2807,12 +2813,14 @@ bool ice_is_clock_mux_in_netlist(struct ice_hw *hw)
28072813bool ice_is_cgu_in_netlist (struct ice_hw * hw )
28082814{
28092815 if (!ice_find_netlist_node (hw , ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_CTRL ,
2816+ ICE_AQC_LINK_TOPO_NODE_CTX_GLOBAL ,
28102817 ICE_AQC_GET_LINK_TOPO_NODE_NR_ZL30632_80032 ,
28112818 NULL )) {
28122819 hw -> cgu_part_number = ICE_AQC_GET_LINK_TOPO_NODE_NR_ZL30632_80032 ;
28132820 return true;
28142821 } else if (!ice_find_netlist_node (hw ,
28152822 ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_CTRL ,
2823+ ICE_AQC_LINK_TOPO_NODE_CTX_GLOBAL ,
28162824 ICE_AQC_GET_LINK_TOPO_NODE_NR_SI5383_5384 ,
28172825 NULL )) {
28182826 hw -> cgu_part_number = ICE_AQC_GET_LINK_TOPO_NODE_NR_SI5383_5384 ;
@@ -2831,6 +2839,7 @@ bool ice_is_cgu_in_netlist(struct ice_hw *hw)
28312839bool ice_is_gps_in_netlist (struct ice_hw * hw )
28322840{
28332841 if (ice_find_netlist_node (hw , ICE_AQC_LINK_TOPO_NODE_TYPE_GPS ,
2842+ ICE_AQC_LINK_TOPO_NODE_CTX_GLOBAL ,
28342843 ICE_AQC_GET_LINK_TOPO_NODE_NR_GEN_GPS , NULL ))
28352844 return false;
28362845
0 commit comments