]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit5bf01b571cf45db12a34f53b1ce96e044c030ae6
treee40d06f6beb8bf50acd858ac415880cd2a7db82a
parentffff9c9cb451d16c42cea79adbaaafa423902113
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