Skip to content

Commit aaab307

Browse files
committed
Merge branch 'mlxsw-fixes'
Merge branch 'mlxsw-fixes' Ido Schimmel says: ==================== mlxsw: Thermal and qdisc fixes Patches #1-#2 fix wrong validation of burst size in qdisc code and a user triggerable WARN_ON(). Patch Rust-for-Linux#3 fixes a regression in thermal monitoring of transceiver modules and gearboxes. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 51c96a5 + 2fd8d84 commit aaab307

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,8 @@ mlxsw_thermal_module_tz_init(struct mlxsw_thermal_module *module_tz)
693693
MLXSW_THERMAL_TRIP_MASK,
694694
module_tz,
695695
&mlxsw_thermal_module_ops,
696-
NULL, 0, 0);
696+
NULL, 0,
697+
module_tz->parent->polling_delay);
697698
if (IS_ERR(module_tz->tzdev)) {
698699
err = PTR_ERR(module_tz->tzdev);
699700
return err;
@@ -815,7 +816,8 @@ mlxsw_thermal_gearbox_tz_init(struct mlxsw_thermal_module *gearbox_tz)
815816
MLXSW_THERMAL_TRIP_MASK,
816817
gearbox_tz,
817818
&mlxsw_thermal_gearbox_ops,
818-
NULL, 0, 0);
819+
NULL, 0,
820+
gearbox_tz->parent->polling_delay);
819821
if (IS_ERR(gearbox_tz->tzdev))
820822
return PTR_ERR(gearbox_tz->tzdev);
821823

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -3907,7 +3907,7 @@ MLXSW_ITEM32(reg, qeec, max_shaper_bs, 0x1C, 0, 6);
39073907
#define MLXSW_REG_QEEC_HIGHEST_SHAPER_BS 25
39083908
#define MLXSW_REG_QEEC_LOWEST_SHAPER_BS_SP1 5
39093909
#define MLXSW_REG_QEEC_LOWEST_SHAPER_BS_SP2 11
3910-
#define MLXSW_REG_QEEC_LOWEST_SHAPER_BS_SP3 5
3910+
#define MLXSW_REG_QEEC_LOWEST_SHAPER_BS_SP3 11
39113911

39123912
static inline void mlxsw_reg_qeec_pack(char *payload, u8 local_port,
39133913
enum mlxsw_reg_qeec_hr hr, u8 index,

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -1332,6 +1332,7 @@ __mlxsw_sp_qdisc_ets_graft(struct mlxsw_sp_port *mlxsw_sp_port,
13321332
u8 band, u32 child_handle)
13331333
{
13341334
struct mlxsw_sp_qdisc *old_qdisc;
1335+
u32 parent;
13351336

13361337
if (band < mlxsw_sp_qdisc->num_classes &&
13371338
mlxsw_sp_qdisc->qdiscs[band].handle == child_handle)
@@ -1352,7 +1353,9 @@ __mlxsw_sp_qdisc_ets_graft(struct mlxsw_sp_port *mlxsw_sp_port,
13521353
if (old_qdisc)
13531354
mlxsw_sp_qdisc_destroy(mlxsw_sp_port, old_qdisc);
13541355

1355-
mlxsw_sp_qdisc = mlxsw_sp_qdisc->ops->find_class(mlxsw_sp_qdisc, band);
1356+
parent = TC_H_MAKE(mlxsw_sp_qdisc->handle, band + 1);
1357+
mlxsw_sp_qdisc = mlxsw_sp_qdisc->ops->find_class(mlxsw_sp_qdisc,
1358+
parent);
13561359
if (!WARN_ON(!mlxsw_sp_qdisc))
13571360
mlxsw_sp_qdisc_destroy(mlxsw_sp_port, mlxsw_sp_qdisc);
13581361

0 commit comments

Comments
 (0)