mlxsw: Extend MRSR pack() function to support new commands
authorAmit Cohen <amcohen@nvidia.com>
Wed, 15 Nov 2023 12:17:18 +0000 (13:17 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 18 Nov 2023 17:38:51 +0000 (17:38 +0000)
commite6dbab40fa096ed5e882e25cab54c3bdad57762c
tree12979323f5353a515f3269db29d27a02b787fd8a
parent0a5ef95923e01aa93210d22e0d62d66b601238d7
mlxsw: Extend MRSR pack() function to support new commands

Currently mlxsw_reg_mrsr_pack() always sets 'command=1'. As preparation for
support of new reset flow, pass the command as an argument to the
function and add an enum for this field.

For now, always pass 'command=1' to the pack() function.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/pci.c
drivers/net/ethernet/mellanox/mlxsw/reg.h