]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_ethtool: Remove internal speeds from PTYS register
authorDanielle Ratson <danieller@mellanox.com>
Sun, 23 Aug 2020 08:06:28 +0000 (11:06 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Aug 2020 00:36:11 +0000 (17:36 -0700)
commit3a157828eaa635dcdb07f7e4486a08a85214f605
treee40d06f6beb8bf50acd858ac415880cd2a7db82a
parentc897a716862ba1d1bfe0af5a7b9caa76df11b946
mlxsw: spectrum_ethtool: Remove internal speeds from PTYS register

The PTYS register is used to report and configure the port type and
speed. Currently, internal bits in the register are used the same way
other bits are used.

Using the internal bits can cause bad parameter firmware errors. For
example, trying to write to internal bit 25 returns:

EMAD reg access failed (tid=53e2bffa00004310,reg_id=5004(ptys),type=write,status=7(bad parameter))

Remove the internal bits from the PTYS register, so that it is no longer
possible to pass them to firmware.

Signed-off-by: Danielle Ratson <danieller@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/reg.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c
drivers/net/ethernet/mellanox/mlxsw/switchx2.c