Skip to content

Commit 578fb09

Browse files
pgreenwaanguy11
authored andcommitted
ice: update ICE_PHY_TYPE_HIGH_MAX_INDEX
ICE_PHY_TYPE_HIGH_MAX_INDEX should be the maximum index value and not the length/number of ICE_PHY_TYPE_HIGH. This is not an issue because this define is only used when calling ice_get_link_speed_based_on_phy_type(), which will return ICE_AQ_LINK_SPEED_UNKNOWN for any invalid index. The caller of ice_get_link_speed_based_on_phy_type(), ice_update_phy_type() checks that the return value is a valid link speed before using it and ICE_AQ_LINK_SPEED_UNKNOWN is not. However, update the define to reflect the correct value. Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com> Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
1 parent af2eab1 commit 578fb09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/intel/ice/ice_adminq_cmd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,7 @@ struct ice_aqc_get_phy_caps {
10871087
#define ICE_PHY_TYPE_HIGH_100G_CAUI2 BIT_ULL(2)
10881088
#define ICE_PHY_TYPE_HIGH_100G_AUI2_AOC_ACC BIT_ULL(3)
10891089
#define ICE_PHY_TYPE_HIGH_100G_AUI2 BIT_ULL(4)
1090-
#define ICE_PHY_TYPE_HIGH_MAX_INDEX 5
1090+
#define ICE_PHY_TYPE_HIGH_MAX_INDEX 4
10911091

10921092
struct ice_aqc_get_phy_caps_data {
10931093
__le64 phy_type_low; /* Use values from ICE_PHY_TYPE_LOW_* */

0 commit comments

Comments
 (0)