mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
mlxsw: reg: Fix SPVM max record count
[ Upstream commitf004ec065b] The num_rec field is 8 bit, so the maximal count number is 255. This fixes vlans not being enabled for wider ranges than 255. Fixes:b2e345f9a4("mlxsw: reg: Add Switch Port VID and Switch Port VLAN Membership registers definitions") Signed-off-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6c548e90a0
commit
4c8b4e60b5
@@ -788,7 +788,7 @@ static inline void mlxsw_reg_spvid_pack(char *payload, u8 local_port, u16 pvid)
|
||||
#define MLXSW_REG_SPVM_ID 0x200F
|
||||
#define MLXSW_REG_SPVM_BASE_LEN 0x04 /* base length, without records */
|
||||
#define MLXSW_REG_SPVM_REC_LEN 0x04 /* record length */
|
||||
#define MLXSW_REG_SPVM_REC_MAX_COUNT 256
|
||||
#define MLXSW_REG_SPVM_REC_MAX_COUNT 255
|
||||
#define MLXSW_REG_SPVM_LEN (MLXSW_REG_SPVM_BASE_LEN + \
|
||||
MLXSW_REG_SPVM_REC_LEN * MLXSW_REG_SPVM_REC_MAX_COUNT)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user