summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorPetr Machata <petrm@mellanox.com>2019-02-17 07:18:41 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-23 09:06:42 +0100
commit052d09258f0d33e96a1d2ec63a6763046d3d9160 (patch)
tree6858df272bfbf04737be7dd1956761cb892e31ff /crypto
parent48dc41afef9fe5b63a5fbc82852bb6a913f5a99c (diff)
downloadlinux-stable-052d09258f0d33e96a1d2ec63a6763046d3d9160.tar.gz
linux-stable-052d09258f0d33e96a1d2ec63a6763046d3d9160.tar.bz2
linux-stable-052d09258f0d33e96a1d2ec63a6763046d3d9160.zip
mlxsw: __mlxsw_sp_port_headroom_set(): Fix a use of local variable
[ Upstream commit 289460404f6947ef1c38e67d680be9a84161250b ] 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: f417f04da589 ("mlxsw: spectrum: Refactor port buffer configuration") Signed-off-by: Petr Machata <petrm@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions