Files
Linux/drivers
Petr Machata 289460404f mlxsw: __mlxsw_sp_port_headroom_set(): Fix a use of local variable
The function-local variable "delay" enters the loop interpreted as delay
in bits. However, inside the loop it gets overwritten by the result of
mlxsw_sp_pg_buf_delay_get(), and thus leaves the loop as quantity in
cells. Thus on second and further loop iterations, the headroom for a
given priority is configured with a wrong size.

Fix by introducing a loop-local variable, delay_cells. Rename thres to
thres_cells for consistency.

Fixes: f417f04da5 ("mlxsw: spectrum: Refactor port buffer configuration")
Signed-off-by: Petr Machata <[email protected]>
Acked-by: Jiri Pirko <[email protected]>
Signed-off-by: Ido Schimmel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2019-02-17 10:13:46 -08:00
..
…
…
2018-12-29 08:20:44 -07:00
…
…
…
…
…
…
…
2019-01-09 19:20:31 -05:00
2019-01-26 11:14:25 +01:00
…
…
2019-02-01 15:53:54 +01:00
2019-02-13 08:41:15 +01:00
…
…
…
2018-12-24 12:06:56 +01:00
…
…
…
…
…
…
…
…
2019-01-28 22:53:09 -08:00
…
…
…