Skip to content

Commit 9cf9b92

Browse files
pmachatadavem330
authored andcommitted
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: Petr Machata <[email protected]> Acked-by: Jiri Pirko <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5bc146c commit 9cf9b92

File tree

3 files changed

+18
-20
lines changed

3 files changed

+18
-20
lines changed

drivers/net/ethernet/mellanox/mlxsw/reg.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3477,10 +3477,10 @@ MLXSW_REG_DEFINE(qeec, MLXSW_REG_QEEC_ID, MLXSW_REG_QEEC_LEN);
34773477
MLXSW_ITEM32(reg, qeec, local_port, 0x00, 16, 8);
34783478

34793479
enum mlxsw_reg_qeec_hr {
3480-
MLXSW_REG_QEEC_HIERARCY_PORT,
3481-
MLXSW_REG_QEEC_HIERARCY_GROUP,
3482-
MLXSW_REG_QEEC_HIERARCY_SUBGROUP,
3483-
MLXSW_REG_QEEC_HIERARCY_TC,
3480+
MLXSW_REG_QEEC_HR_PORT,
3481+
MLXSW_REG_QEEC_HR_GROUP,
3482+
MLXSW_REG_QEEC_HR_SUBGROUP,
3483+
MLXSW_REG_QEEC_HR_TC,
34843484
};
34853485

34863486
/* reg_qeec_element_hierarchy
@@ -3618,8 +3618,7 @@ static inline void mlxsw_reg_qeec_ptps_pack(char *payload, u8 local_port,
36183618
{
36193619
MLXSW_REG_ZERO(qeec, payload);
36203620
mlxsw_reg_qeec_local_port_set(payload, local_port);
3621-
mlxsw_reg_qeec_element_hierarchy_set(payload,
3622-
MLXSW_REG_QEEC_HIERARCY_PORT);
3621+
mlxsw_reg_qeec_element_hierarchy_set(payload, MLXSW_REG_QEEC_HR_PORT);
36233622
mlxsw_reg_qeec_ptps_set(payload, ptps);
36243623
}
36253624

drivers/net/ethernet/mellanox/mlxsw/spectrum.c

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3602,26 +3602,25 @@ static int mlxsw_sp_port_ets_init(struct mlxsw_sp_port *mlxsw_sp_port)
36023602
* one subgroup, which are all member in the same group.
36033603
*/
36043604
err = mlxsw_sp_port_ets_set(mlxsw_sp_port,
3605-
MLXSW_REG_QEEC_HIERARCY_GROUP, 0, 0, false,
3606-
0);
3605+
MLXSW_REG_QEEC_HR_GROUP, 0, 0, false, 0);
36073606
if (err)
36083607
return err;
36093608
for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
36103609
err = mlxsw_sp_port_ets_set(mlxsw_sp_port,
3611-
MLXSW_REG_QEEC_HIERARCY_SUBGROUP, i,
3610+
MLXSW_REG_QEEC_HR_SUBGROUP, i,
36123611
0, false, 0);
36133612
if (err)
36143613
return err;
36153614
}
36163615
for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
36173616
err = mlxsw_sp_port_ets_set(mlxsw_sp_port,
3618-
MLXSW_REG_QEEC_HIERARCY_TC, i, i,
3617+
MLXSW_REG_QEEC_HR_TC, i, i,
36193618
false, 0);
36203619
if (err)
36213620
return err;
36223621

36233622
err = mlxsw_sp_port_ets_set(mlxsw_sp_port,
3624-
MLXSW_REG_QEEC_HIERARCY_TC,
3623+
MLXSW_REG_QEEC_HR_TC,
36253624
i + 8, i,
36263625
true, 100);
36273626
if (err)
@@ -3633,28 +3632,28 @@ static int mlxsw_sp_port_ets_init(struct mlxsw_sp_port *mlxsw_sp_port)
36333632
* for the initial configuration.
36343633
*/
36353634
err = mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port,
3636-
MLXSW_REG_QEEC_HIERARCY_PORT, 0, 0,
3635+
MLXSW_REG_QEEC_HR_PORT, 0, 0,
36373636
MLXSW_REG_QEEC_MAS_DIS);
36383637
if (err)
36393638
return err;
36403639
for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
36413640
err = mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port,
3642-
MLXSW_REG_QEEC_HIERARCY_SUBGROUP,
3641+
MLXSW_REG_QEEC_HR_SUBGROUP,
36433642
i, 0,
36443643
MLXSW_REG_QEEC_MAS_DIS);
36453644
if (err)
36463645
return err;
36473646
}
36483647
for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
36493648
err = mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port,
3650-
MLXSW_REG_QEEC_HIERARCY_TC,
3649+
MLXSW_REG_QEEC_HR_TC,
36513650
i, i,
36523651
MLXSW_REG_QEEC_MAS_DIS);
36533652
if (err)
36543653
return err;
36553654

36563655
err = mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port,
3657-
MLXSW_REG_QEEC_HIERARCY_TC,
3656+
MLXSW_REG_QEEC_HR_TC,
36583657
i + 8, i,
36593658
MLXSW_REG_QEEC_MAS_DIS);
36603659
if (err)
@@ -3664,7 +3663,7 @@ static int mlxsw_sp_port_ets_init(struct mlxsw_sp_port *mlxsw_sp_port)
36643663
/* Configure the min shaper for multicast TCs. */
36653664
for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
36663665
err = mlxsw_sp_port_min_bw_set(mlxsw_sp_port,
3667-
MLXSW_REG_QEEC_HIERARCY_TC,
3666+
MLXSW_REG_QEEC_HR_TC,
36683667
i + 8, i,
36693668
MLXSW_REG_QEEC_MIS_MIN);
36703669
if (err)

drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ static int __mlxsw_sp_dcbnl_ieee_setets(struct mlxsw_sp_port *mlxsw_sp_port,
160160
u8 weight = ets->tc_tx_bw[i];
161161

162162
err = mlxsw_sp_port_ets_set(mlxsw_sp_port,
163-
MLXSW_REG_QEEC_HIERARCY_SUBGROUP, i,
163+
MLXSW_REG_QEEC_HR_SUBGROUP, i,
164164
0, dwrr, weight);
165165
if (err) {
166166
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,
198198
u8 weight = my_ets->tc_tx_bw[i];
199199

200200
err = mlxsw_sp_port_ets_set(mlxsw_sp_port,
201-
MLXSW_REG_QEEC_HIERARCY_SUBGROUP, i,
201+
MLXSW_REG_QEEC_HR_SUBGROUP, i,
202202
0, dwrr, weight);
203203
}
204204
return err;
@@ -507,7 +507,7 @@ static int mlxsw_sp_dcbnl_ieee_setmaxrate(struct net_device *dev,
507507

508508
for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
509509
err = mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port,
510-
MLXSW_REG_QEEC_HIERARCY_SUBGROUP,
510+
MLXSW_REG_QEEC_HR_SUBGROUP,
511511
i, 0,
512512
maxrate->tc_maxrate[i]);
513513
if (err) {
@@ -523,7 +523,7 @@ static int mlxsw_sp_dcbnl_ieee_setmaxrate(struct net_device *dev,
523523
err_port_ets_maxrate_set:
524524
for (i--; i >= 0; i--)
525525
mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port,
526-
MLXSW_REG_QEEC_HIERARCY_SUBGROUP,
526+
MLXSW_REG_QEEC_HR_SUBGROUP,
527527
i, 0, my_maxrate->tc_maxrate[i]);
528528
return err;
529529
}

0 commit comments

Comments
 (0)