mlxsw: spectrum_span: Wrap buffer change in a function
authorIdo Schimmel <idosch@mellanox.com>
Thu, 30 Apr 2020 17:01:11 +0000 (20:01 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Apr 2020 20:02:32 +0000 (13:02 -0700)
commit14366da6b59203ef5fc3cf21660113b60c2f1421
treea7c36b6b4607436581fc96db3ff765603534699a
parenteb773c3a2d98e1e1cb9076419f14ebb0a2f40951
mlxsw: spectrum_span: Wrap buffer change in a function

The code that adjusts the egress buffer size is not symmetric at the
moment. The update is done via a call to
mlxsw_sp_span_port_buffer_update(), but the disablement is done inline
by invoking the write to SBIB register directly.

Wrap the disablement code in mlxsw_sp_span_port_buffer_disable().

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Suggested-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c