Commit 9cf9b925 authored by Petr Machata's avatar Petr Machata Committed by David S. Miller

mlxsw: spectrum: Rename MLXSW_REG_QEEC_HIERARCY_* enumerators

These enums want to be named MLXSW_REG_QEEC_HIERARCHY_, but due to a typo
lack the second H. That is confusing and complicates searching.

But actually the enumerators should be named _HR_, because that is how
their enum type is called. So rename them as appropriate.
Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5bc146c9
...@@ -3477,10 +3477,10 @@ MLXSW_REG_DEFINE(qeec, MLXSW_REG_QEEC_ID, MLXSW_REG_QEEC_LEN); ...@@ -3477,10 +3477,10 @@ MLXSW_REG_DEFINE(qeec, MLXSW_REG_QEEC_ID, MLXSW_REG_QEEC_LEN);
MLXSW_ITEM32(reg, qeec, local_port, 0x00, 16, 8); MLXSW_ITEM32(reg, qeec, local_port, 0x00, 16, 8);
enum mlxsw_reg_qeec_hr { enum mlxsw_reg_qeec_hr {
MLXSW_REG_QEEC_HIERARCY_PORT, MLXSW_REG_QEEC_HR_PORT,
MLXSW_REG_QEEC_HIERARCY_GROUP, MLXSW_REG_QEEC_HR_GROUP,
MLXSW_REG_QEEC_HIERARCY_SUBGROUP, MLXSW_REG_QEEC_HR_SUBGROUP,
MLXSW_REG_QEEC_HIERARCY_TC, MLXSW_REG_QEEC_HR_TC,
}; };
/* reg_qeec_element_hierarchy /* reg_qeec_element_hierarchy
...@@ -3618,8 +3618,7 @@ static inline void mlxsw_reg_qeec_ptps_pack(char *payload, u8 local_port, ...@@ -3618,8 +3618,7 @@ static inline void mlxsw_reg_qeec_ptps_pack(char *payload, u8 local_port,
{ {
MLXSW_REG_ZERO(qeec, payload); MLXSW_REG_ZERO(qeec, payload);
mlxsw_reg_qeec_local_port_set(payload, local_port); mlxsw_reg_qeec_local_port_set(payload, local_port);
mlxsw_reg_qeec_element_hierarchy_set(payload, mlxsw_reg_qeec_element_hierarchy_set(payload, MLXSW_REG_QEEC_HR_PORT);
MLXSW_REG_QEEC_HIERARCY_PORT);
mlxsw_reg_qeec_ptps_set(payload, ptps); mlxsw_reg_qeec_ptps_set(payload, ptps);
} }
......
...@@ -3602,26 +3602,25 @@ static int mlxsw_sp_port_ets_init(struct mlxsw_sp_port *mlxsw_sp_port) ...@@ -3602,26 +3602,25 @@ static int mlxsw_sp_port_ets_init(struct mlxsw_sp_port *mlxsw_sp_port)
* one subgroup, which are all member in the same group. * one subgroup, which are all member in the same group.
*/ */
err = mlxsw_sp_port_ets_set(mlxsw_sp_port, err = mlxsw_sp_port_ets_set(mlxsw_sp_port,
MLXSW_REG_QEEC_HIERARCY_GROUP, 0, 0, false, MLXSW_REG_QEEC_HR_GROUP, 0, 0, false, 0);
0);
if (err) if (err)
return err; return err;
for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) { for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
err = mlxsw_sp_port_ets_set(mlxsw_sp_port, err = mlxsw_sp_port_ets_set(mlxsw_sp_port,
MLXSW_REG_QEEC_HIERARCY_SUBGROUP, i, MLXSW_REG_QEEC_HR_SUBGROUP, i,
0, false, 0); 0, false, 0);
if (err) if (err)
return err; return err;
} }
for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) { for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
err = mlxsw_sp_port_ets_set(mlxsw_sp_port, err = mlxsw_sp_port_ets_set(mlxsw_sp_port,
MLXSW_REG_QEEC_HIERARCY_TC, i, i, MLXSW_REG_QEEC_HR_TC, i, i,
false, 0); false, 0);
if (err) if (err)
return err; return err;
err = mlxsw_sp_port_ets_set(mlxsw_sp_port, err = mlxsw_sp_port_ets_set(mlxsw_sp_port,
MLXSW_REG_QEEC_HIERARCY_TC, MLXSW_REG_QEEC_HR_TC,
i + 8, i, i + 8, i,
true, 100); true, 100);
if (err) if (err)
...@@ -3633,13 +3632,13 @@ static int mlxsw_sp_port_ets_init(struct mlxsw_sp_port *mlxsw_sp_port) ...@@ -3633,13 +3632,13 @@ static int mlxsw_sp_port_ets_init(struct mlxsw_sp_port *mlxsw_sp_port)
* for the initial configuration. * for the initial configuration.
*/ */
err = mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port, err = mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port,
MLXSW_REG_QEEC_HIERARCY_PORT, 0, 0, MLXSW_REG_QEEC_HR_PORT, 0, 0,
MLXSW_REG_QEEC_MAS_DIS); MLXSW_REG_QEEC_MAS_DIS);
if (err) if (err)
return err; return err;
for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) { for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
err = mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port, err = mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port,
MLXSW_REG_QEEC_HIERARCY_SUBGROUP, MLXSW_REG_QEEC_HR_SUBGROUP,
i, 0, i, 0,
MLXSW_REG_QEEC_MAS_DIS); MLXSW_REG_QEEC_MAS_DIS);
if (err) if (err)
...@@ -3647,14 +3646,14 @@ static int mlxsw_sp_port_ets_init(struct mlxsw_sp_port *mlxsw_sp_port) ...@@ -3647,14 +3646,14 @@ static int mlxsw_sp_port_ets_init(struct mlxsw_sp_port *mlxsw_sp_port)
} }
for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) { for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
err = mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port, err = mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port,
MLXSW_REG_QEEC_HIERARCY_TC, MLXSW_REG_QEEC_HR_TC,
i, i, i, i,
MLXSW_REG_QEEC_MAS_DIS); MLXSW_REG_QEEC_MAS_DIS);
if (err) if (err)
return err; return err;
err = mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port, err = mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port,
MLXSW_REG_QEEC_HIERARCY_TC, MLXSW_REG_QEEC_HR_TC,
i + 8, i, i + 8, i,
MLXSW_REG_QEEC_MAS_DIS); MLXSW_REG_QEEC_MAS_DIS);
if (err) if (err)
...@@ -3664,7 +3663,7 @@ static int mlxsw_sp_port_ets_init(struct mlxsw_sp_port *mlxsw_sp_port) ...@@ -3664,7 +3663,7 @@ static int mlxsw_sp_port_ets_init(struct mlxsw_sp_port *mlxsw_sp_port)
/* Configure the min shaper for multicast TCs. */ /* Configure the min shaper for multicast TCs. */
for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) { for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
err = mlxsw_sp_port_min_bw_set(mlxsw_sp_port, err = mlxsw_sp_port_min_bw_set(mlxsw_sp_port,
MLXSW_REG_QEEC_HIERARCY_TC, MLXSW_REG_QEEC_HR_TC,
i + 8, i, i + 8, i,
MLXSW_REG_QEEC_MIS_MIN); MLXSW_REG_QEEC_MIS_MIN);
if (err) if (err)
......
...@@ -160,7 +160,7 @@ static int __mlxsw_sp_dcbnl_ieee_setets(struct mlxsw_sp_port *mlxsw_sp_port, ...@@ -160,7 +160,7 @@ static int __mlxsw_sp_dcbnl_ieee_setets(struct mlxsw_sp_port *mlxsw_sp_port,
u8 weight = ets->tc_tx_bw[i]; u8 weight = ets->tc_tx_bw[i];
err = mlxsw_sp_port_ets_set(mlxsw_sp_port, err = mlxsw_sp_port_ets_set(mlxsw_sp_port,
MLXSW_REG_QEEC_HIERARCY_SUBGROUP, i, MLXSW_REG_QEEC_HR_SUBGROUP, i,
0, dwrr, weight); 0, dwrr, weight);
if (err) { if (err) {
netdev_err(dev, "Failed to link subgroup ETS element %d to group\n", netdev_err(dev, "Failed to link subgroup ETS element %d to group\n",
...@@ -198,7 +198,7 @@ static int __mlxsw_sp_dcbnl_ieee_setets(struct mlxsw_sp_port *mlxsw_sp_port, ...@@ -198,7 +198,7 @@ static int __mlxsw_sp_dcbnl_ieee_setets(struct mlxsw_sp_port *mlxsw_sp_port,
u8 weight = my_ets->tc_tx_bw[i]; u8 weight = my_ets->tc_tx_bw[i];
err = mlxsw_sp_port_ets_set(mlxsw_sp_port, err = mlxsw_sp_port_ets_set(mlxsw_sp_port,
MLXSW_REG_QEEC_HIERARCY_SUBGROUP, i, MLXSW_REG_QEEC_HR_SUBGROUP, i,
0, dwrr, weight); 0, dwrr, weight);
} }
return err; return err;
...@@ -507,7 +507,7 @@ static int mlxsw_sp_dcbnl_ieee_setmaxrate(struct net_device *dev, ...@@ -507,7 +507,7 @@ static int mlxsw_sp_dcbnl_ieee_setmaxrate(struct net_device *dev,
for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) { for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
err = mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port, err = mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port,
MLXSW_REG_QEEC_HIERARCY_SUBGROUP, MLXSW_REG_QEEC_HR_SUBGROUP,
i, 0, i, 0,
maxrate->tc_maxrate[i]); maxrate->tc_maxrate[i]);
if (err) { if (err) {
...@@ -523,7 +523,7 @@ static int mlxsw_sp_dcbnl_ieee_setmaxrate(struct net_device *dev, ...@@ -523,7 +523,7 @@ static int mlxsw_sp_dcbnl_ieee_setmaxrate(struct net_device *dev,
err_port_ets_maxrate_set: err_port_ets_maxrate_set:
for (i--; i >= 0; i--) for (i--; i >= 0; i--)
mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port, mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port,
MLXSW_REG_QEEC_HIERARCY_SUBGROUP, MLXSW_REG_QEEC_HR_SUBGROUP,
i, 0, my_maxrate->tc_maxrate[i]); i, 0, my_maxrate->tc_maxrate[i]);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment